Skip to content

Commit

Permalink
Update secrets and labels in Helm templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Flagro committed Mar 2, 2024
1 parent fe284a7 commit 685e85b
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 6 deletions.
2 changes: 1 addition & 1 deletion helm/templates/db/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
- containerPort: 5432
envFrom:
- secretRef:
name: phrinifluent-db-secrets
name: {{ include "flatchart.fullname" . }}-db-secrets
- configMapRef:
name: {{ include "flatchart.fullname" . }}-db-config
- env:
Expand Down
11 changes: 11 additions & 0 deletions helm/templates/db/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "flatchart.fullname" . }}-db-secrets
labels:
{{- include "flatchart.labels" . | nindent 4 }}
type: Opaque
data:
POSTGRES_USER: {{ .Values.dbSecrets.user | b64enc | quote }}
POSTGRES_PASSWORD: {{ .Values.dbSecrets.password | b64enc | quote }}
POSTGRES_DB: {{ .Values.dbSecrets.dbName | b64enc | quote }}
2 changes: 1 addition & 1 deletion helm/templates/ingress/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ spec:
tls:
- hosts:
- {{ .Values.ingress.host }}
secretName: phrinifluent-tls-secrets
secretName: {{ include "flatchart.fullname" . }}-tls-secrets
10 changes: 10 additions & 0 deletions helm/templates/ingress/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "flatchart.fullname" . }}-tls-secrets
labels:
{{- include "flatchart.labels" . | nindent 4 }}
type: kubernetes.io/tls
data:
tls.crt: {{ .Files.Get .Values.tlsSecrets.certFile | b64enc | quote }}
tls.key: {{ .Files.Get .Values.tlsSecrets.keyFile | b64enc | quote }}
8 changes: 4 additions & 4 deletions helm/templates/web/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ spec:
args: {{- toYaml .Values.backendDeployment.phrinifluentBackendSetup.args | nindent 8 }}
envFrom:
- secretRef:
name: phrinifluent-backend-secrets
name: {{ include "flatchart.fullname" . }}-backend-secrets
- secretRef:
name: phrinifluent-db-secrets
name: {{ include "flatchart.fullname" . }}-db-secrets
- configMapRef:
name: {{ include "flatchart.fullname" . }}-backend-config
- configMapRef:
Expand All @@ -48,9 +48,9 @@ spec:
- containerPort: 8000
envFrom:
- secretRef:
name: phrinifluent-backend-secrets
name: {{ include "flatchart.fullname" . }}-backend-secrets
- secretRef:
name: phrinifluent-db-secrets
name: {{ include "flatchart.fullname" . }}-db-secrets
- configMapRef:
name: {{ include "flatchart.fullname" . }}-backend-config
- configMapRef:
Expand Down
12 changes: 12 additions & 0 deletions helm/templates/web/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "flatchart.fullname" . }}-backend-secrets
labels:
{{- include "flatchart.labels" . | nindent 4 }}
type: Opaque
data:
SECRET_KEY: {{ .Values.backendSecrets.secretKey | b64enc | quote }}
ADMIN_USERNAME: {{ .Values.backendSecrets.adminUsername | b64enc | quote }}
ADMIN_EMAIL: {{ .Values.backendSecrets.adminEmail | b64enc | quote }}
ADMIN_PASSWORD: {{ .Values.backendSecrets.adminPassword | b64enc | quote }}

0 comments on commit 685e85b

Please sign in to comment.