infrastructure/pomerium/templates/redis/password-secret.yaml
Infrastructure Admin d770504fa5 Initial infrastructure as code deployment
This commit includes the complete Kubernetes infrastructure deployment for NGE6:

- Crossplane setup with providers (Kubernetes, Helm, Civo)
- Ambassador/Emissary ingress controller with SSL termination
- Cert-manager with Let's Encrypt and Gandi webhook for DNS01 challenges
- ExternalDNS integration with Gandi for automatic DNS management
- Keycloak authentication server with PostgreSQL
- Pomerium identity-aware proxy with OIDC integration
- Forgejo Git server with persistent storage and authentication
- Spire/SPIFFE for secure service communication

All services are deployed using Infrastructure as Code principles with
Crossplane managing Kubernetes and Helm resources declaratively.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-23 08:43:06 -04:00

20 lines
1.1 KiB
YAML

{{- if and .Values.redis.enabled .Values.redis.auth.createSecret -}}
{{- $redisPassword := coalesce .Values.redis.password (randAlphaNum 32 | b64enc) }}
{{- $databrokerSecretData := (lookup "v1" "Secret" .Release.Namespace (include "pomerium.databroker.storage.secret" .) ).data }}
{{- if and $databrokerSecretData (not .Values.config.forceGenerateServiceSecrets) }}
{{- $redisPassword = (index $databrokerSecretData "password" | b64dec) }}
{{- end }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "pomerium.databroker.storage.secret" . }}
labels:
app.kubernetes.io/name: {{ template "pomerium.name" . }}
helm.sh/chart: {{ template "pomerium.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
type: Opaque
data:
password: {{ $redisPassword | b64enc }}
DATABROKER_STORAGE_CONNECTION_STRING: {{ default (printf "%s://:%s@%s-master.%s.svc.cluster.local:6379" (include "pomerium.redis.scheme" . ) ($redisPassword) (include "pomerium.redis.name" . ) .Release.Namespace ) .Values.databroker.storage.connectionString | b64enc}}
{{- end -}}