Merge pull request #8 from holysoles/fix_deployment_env_value_construction
fix(chart): access subchart generated values properly
This commit is contained in:
@@ -15,7 +15,7 @@ type: application
|
|||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.3.1
|
version: 0.3.2
|
||||||
|
|
||||||
# This is the version number of the application being deployed.
|
# This is the version number of the application being deployed.
|
||||||
# renovate:image=ghcr.io/mattlqx/docker-pixelfed
|
# renovate:image=ghcr.io/mattlqx/docker-pixelfed
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# pixelfed
|
# pixelfed
|
||||||
|
|
||||||
  
|
  
|
||||||
|
|
||||||
A Helm chart for deploying Pixelfed on Kubernetes
|
A Helm chart for deploying Pixelfed on Kubernetes
|
||||||
|
|
||||||
|
|||||||
@@ -181,24 +181,22 @@ spec:
|
|||||||
|
|
||||||
# redis
|
# redis
|
||||||
- name: REDIS_HOST
|
- name: REDIS_HOST
|
||||||
|
{{- if .Values.externalValkey.existingSecret }}
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
{{- if .Values.externalValkey.existingSecret }}
|
|
||||||
name: {{ .Values.externalValkey.existingSecret }}
|
name: {{ .Values.externalValkey.existingSecret }}
|
||||||
key: {{ .Values.externalValkey.existingSecretKeys.host }}
|
key: {{ .Values.externalValkey.existingSecretKeys.host }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
name: pixelfed-valkey
|
value: {{ printf "%s-primary" (.Values.valkey.fullnameOverride) }}
|
||||||
key: host
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: REDIS_PORT
|
- name: REDIS_PORT
|
||||||
|
{{- if .Values.externalValkey.existingSecret }}
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
{{- if .Values.externalValkey.existingSecret }}
|
|
||||||
name: {{ .Values.externalValkey.existingSecret }}
|
name: {{ .Values.externalValkey.existingSecret }}
|
||||||
key: {{ .Values.externalValkey.existingSecretKeys.port }}
|
key: {{ .Values.externalValkey.existingSecretKeys.port }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
name: pixelfed-valkey
|
value: {{ .Values.valkey.primary.service.ports.valkey | quote }}
|
||||||
key: port
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: REDIS_PASSWORD
|
- name: REDIS_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
@@ -206,9 +204,12 @@ spec:
|
|||||||
{{- if .Values.externalValkey.existingSecret }}
|
{{- if .Values.externalValkey.existingSecret }}
|
||||||
name: {{ .Values.externalValkey.existingSecret }}
|
name: {{ .Values.externalValkey.existingSecret }}
|
||||||
key: {{ .Values.externalValkey.existingSecretKeys.password }}
|
key: {{ .Values.externalValkey.existingSecretKeys.password }}
|
||||||
{{- else }}
|
{{- else if .Values.valkey.auth.existingSecret }}
|
||||||
name: pixelfed-valkey
|
name: {{ .Values.valkey.auth.existingSecret }}
|
||||||
key: password
|
key: password
|
||||||
|
{{- else }}
|
||||||
|
name: {{ .Values.valkey.fullnameOverride }}
|
||||||
|
key: valkey-password
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
# mail
|
# mail
|
||||||
@@ -265,54 +266,53 @@ spec:
|
|||||||
- name: DB_CONNECTION
|
- name: DB_CONNECTION
|
||||||
value: {{ .Values.externalDatabase.connection }}
|
value: {{ .Values.externalDatabase.connection }}
|
||||||
- name: DB_HOST
|
- name: DB_HOST
|
||||||
|
{{- if .Values.externalDatabase.existingSecret }}
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
{{- if .Values.externalDatabase.existingSecret }}
|
|
||||||
name: {{ .Values.externalDatabase.existingSecret }}
|
name: {{ .Values.externalDatabase.existingSecret }}
|
||||||
key: {{ .Values.externalDatabase.existingSecretKeys.username }}
|
key: {{ .Values.externalDatabase.existingSecretKeys.host }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
name: pixelfed-database
|
value: {{ .Values.postgresql.fullnameOverride }}
|
||||||
key: host
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: DB_USERNAME
|
- name: DB_USERNAME
|
||||||
|
{{- if .Values.externalDatabase.existingSecret }}
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
{{- if .Values.externalDatabase.existingSecret }}
|
|
||||||
name: {{ .Values.externalDatabase.existingSecret }}
|
name: {{ .Values.externalDatabase.existingSecret }}
|
||||||
key: {{ .Values.externalDatabase.existingSecretKeys.username }}
|
key: {{ .Values.externalDatabase.existingSecretKeys.username }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
name: pixelfed-database
|
value: postgres
|
||||||
key: username
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: DB_PASSWORD
|
- name: DB_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
{{- if .Values.externalDatabase.existingSecret }}
|
{{- if .Values.externalDatabase.existingSecret }}
|
||||||
name: {{ .Values.externalDatabase.existingSecret }}
|
name: {{ .Values.externalDatabase.existingSecret }}
|
||||||
key: {{ .Values.externalDatabase.existingSecretKeys.username }}
|
key: {{ .Values.externalDatabase.existingSecretKeys.password }}
|
||||||
|
{{- else if .Values.postgresql.auth.existingSecret }}
|
||||||
|
name: {{ .Values.postgresql.auth.existingSecret }}
|
||||||
|
key: postgres-password
|
||||||
{{- else }}
|
{{- else }}
|
||||||
name: pixelfed-database
|
name: {{ .Values.postgresql.fullnameOverride }}
|
||||||
key: password
|
key: postgres-password
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: DB_DATABASE
|
- name: DB_DATABASE
|
||||||
|
{{- if .Values.externalDatabase.existingSecret }}
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
{{- if .Values.externalDatabase.existingSecret }}
|
|
||||||
name: {{ .Values.externalDatabase.existingSecret }}
|
name: {{ .Values.externalDatabase.existingSecret }}
|
||||||
key: {{ .Values.externalDatabase.existingSecretKeys.username }}
|
key: {{ .Values.externalDatabase.existingSecretKeys.database }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
name: pixelfed-database
|
value: postgres
|
||||||
key: database
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: DB_PORT
|
- name: DB_PORT
|
||||||
|
{{- if .Values.externalDatabase.existingSecret }}
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
{{- if .Values.externalDatabase.existingSecret }}
|
|
||||||
name: {{ .Values.externalDatabase.existingSecret }}
|
name: {{ .Values.externalDatabase.existingSecret }}
|
||||||
key: {{ .Values.externalDatabase.existingSecretKeys.username }}
|
key: {{ .Values.externalDatabase.existingSecretKeys.port }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
name: pixelfed-database
|
value: {{ .Values.postgresql.primary.service.ports.postgresql | quote }}
|
||||||
key: port
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: DB_APPLY_NEW_MIGRATIONS_AUTOMATICALLY
|
- name: DB_APPLY_NEW_MIGRATIONS_AUTOMATICALLY
|
||||||
value: "{{ .Values.pixelfed.db_apply_new_migrations_automatically }}"
|
value: "{{ .Values.pixelfed.db_apply_new_migrations_automatically }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user