diff --git a/deploy/helm/sentry/templates/clickhouse.yaml b/deploy/helm/sentry/templates/clickhouse.yaml index 88c59ec..9166aeb 100644 --- a/deploy/helm/sentry/templates/clickhouse.yaml +++ b/deploy/helm/sentry/templates/clickhouse.yaml @@ -29,6 +29,16 @@ spec: secretKeyRef: name: {{ .Release.Name }}-clickhouse key: password + # Same reasoning as docker-compose.yml's identical setting -- + # enterprise/internal/tenantprovision needs CREATE USER/GRANT + # on this admin connection, which the official image's + # default user doesn't have without this. Confirmed the hard + # way: -provision-tenant failed with "Not enough + # privileges... grant CREATE USER ON *.*" against a real kind + # cluster before this was added -- this chart had never + # actually been exercised against a live cluster before that. + - name: CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT + value: "1" ports: - name: http containerPort: 8123 diff --git a/deploy/helm/sentry/templates/enterprise-auth.yaml b/deploy/helm/sentry/templates/enterprise-auth.yaml index ba6f4d0..e1a99e3 100644 --- a/deploy/helm/sentry/templates/enterprise-auth.yaml +++ b/deploy/helm/sentry/templates/enterprise-auth.yaml @@ -16,6 +16,8 @@ spec: labels: {{- include "sentry.selectorLabels" (list $ "enterprise-auth") | nindent 8 }} spec: + initContainers: + {{- include "sentry.waitForTCP" (list "postgres" (printf "%s-postgres" .Release.Name) "5432") | nindent 8 }} containers: - name: enterprise-auth image: "{{ .Values.enterprise.image.repository }}:{{ .Values.enterprise.image.tag }}" @@ -26,6 +28,17 @@ spec: secretKeyRef: name: {{ .Release.Name }}-enterprise-auth key: sessionSigningKey + - name: POSTGRES_ADDR + value: "{{ .Release.Name }}-postgres:5432" + - name: POSTGRES_DATABASE + value: sentry_metadata + - name: POSTGRES_USERNAME + value: sentry + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Release.Name }}-postgres + key: password {{- if .Values.enterprise.oidc.issuerURL }} - name: OIDC_ISSUER_URL value: {{ .Values.enterprise.oidc.issuerURL | quote }}