Skip to content

Commit aea6352

Browse files
author
Yuriy Bezsonov
committed
fix(perf-platform): add Helm adoption metadata to Pyroscope ServiceAccount
1 parent 71ee50c commit aea6352

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

infra/scripts/setup/perf-platform.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,15 @@ fi
5454
# =============================================================================
5555
# Pyroscope Pod Identity — bind the Pyroscope ServiceAccount to the CDK-managed
5656
# pyroscope-eks-pod-role BEFORE installing Pyroscope, so the very first pod
57-
# boot has S3 creds available.
57+
# boot has S3 creds available. Pyroscope writes blocks to S3 from boot, so
58+
# it cannot follow the Grafana pattern (install first, attach identity, restart)
59+
# — it would fail health checks before the restart.
5860
# =============================================================================
5961

6062
log_info "Binding Pyroscope ServiceAccount to pyroscope-eks-pod-role..."
61-
# Create the ServiceAccount up front so the pod identity webhook has something
62-
# to bind to. Helm will adopt it on install because names/namespaces match.
63+
# Pre-create the ServiceAccount with Helm 3 adoption metadata so the
64+
# subsequent `helm install pyroscope` adopts it instead of erroring on
65+
# "invalid ownership metadata; missing key app.kubernetes.io/managed-by".
6366
kubectl apply -f - <<EOF
6467
apiVersion: v1
6568
kind: ServiceAccount
@@ -68,6 +71,10 @@ metadata:
6871
namespace: ${NAMESPACE}
6972
labels:
7073
app.kubernetes.io/name: pyroscope
74+
app.kubernetes.io/managed-by: Helm
75+
annotations:
76+
meta.helm.sh/release-name: pyroscope
77+
meta.helm.sh/release-namespace: ${NAMESPACE}
7178
EOF
7279

7380
if ! aws eks list-pod-identity-associations --cluster-name "${CLUSTER_NAME}" \

0 commit comments

Comments
 (0)