ability to disable postgres CA mount
Signed-off-by: azhurbilo <artemzhurbilo@gmail.com>
This commit is contained in:
@@ -129,6 +129,16 @@ For the CA, create a `configMap` named `<release name>-<chart name>-postgres-ca`
|
||||
kubectl create configmap my-company-backstage-postgres-ca --from-file=ca.crt"
|
||||
```
|
||||
|
||||
or disable CA mount
|
||||
|
||||
```yaml
|
||||
backend:
|
||||
postgresCertMountEnabled: false
|
||||
|
||||
lighthouse:
|
||||
postgresCertMountEnabled: false
|
||||
```
|
||||
|
||||
> Where the release name contains the chart name "backstage" then only the release name will be used.
|
||||
|
||||
Now install the helm chart:
|
||||
|
||||
@@ -214,7 +214,7 @@ Postgres port for the backend
|
||||
{{- .Values.postgresql.service.port }}
|
||||
{{- else if .Values.appConfig.backend.database.connection.port -}}
|
||||
{{- .Values.appConfig.backend.database.connection.port }}
|
||||
{{ else }}
|
||||
{{- else -}}
|
||||
5432
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -49,7 +49,7 @@ spec:
|
||||
name: {{ include "backend.postgresql.passwordSecret" .}}
|
||||
key: postgresql-password
|
||||
volumeMounts:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
{{- if .Values.backend.postgresCertMountEnabled }}
|
||||
- name: postgres-ca
|
||||
mountPath: {{ include "backstage.backend.postgresCaDir" . }}
|
||||
{{- end }}
|
||||
@@ -58,7 +58,7 @@ spec:
|
||||
subPath: {{ include "backstage.appConfigFilename" . }}
|
||||
|
||||
volumes:
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
{{- if .Values.backend.postgresCertMountEnabled }}
|
||||
- name: postgres-ca
|
||||
configMap:
|
||||
name: {{ include "backstage.fullname" . }}-postgres-ca
|
||||
|
||||
@@ -51,14 +51,18 @@ spec:
|
||||
name: {{ include "lighthouse.postgresql.passwordSecret" . }}
|
||||
key: postgresql-password
|
||||
|
||||
{{- if .Values.lighthouse.postgresCertMountEnabled }}
|
||||
volumeMounts:
|
||||
- name: postgres-ca
|
||||
mountPath: {{ include "backstage.lighthouse.postgresCaDir" . }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.lighthouse.postgresCertMountEnabled }}
|
||||
volumes:
|
||||
- name: postgres-ca
|
||||
configMap:
|
||||
name: {{ include "backstage.fullname" . }}-postgres-ca
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.global.nodeSelector }}
|
||||
nodeSelector: {{- toYaml .Values.global.nodeSelector | nindent 8 }}
|
||||
|
||||
@@ -13,18 +13,3 @@ metadata:
|
||||
data:
|
||||
postgresql-password: {{ .Values.appConfig.backend.database.connection.password | b64enc }}
|
||||
{{- end }}
|
||||
{{- if not .Values.postgresql.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: Opaque
|
||||
metadata:
|
||||
name: {{ include "lighthouse.postgresql.passwordSecret" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
annotations:
|
||||
"helm.sh/hook": "pre-install,pre-upgrade"
|
||||
"helm.sh/hook-delete-policy": "before-hook-creation"
|
||||
data:
|
||||
postgresql-password: {{ .Values.lighthouse.database.connection.password | b64enc }}
|
||||
{{- end }}
|
||||
|
||||
@@ -28,6 +28,7 @@ backend:
|
||||
pullPolicy: IfNotPresent
|
||||
containerPort: 7000
|
||||
serviceType: ClusterIP
|
||||
postgresCertMountEnabled: true
|
||||
resources:
|
||||
requests:
|
||||
memory: 512Mi
|
||||
@@ -43,6 +44,7 @@ lighthouse:
|
||||
pullPolicy: IfNotPresent
|
||||
containerPort: 3003
|
||||
serviceType: ClusterIP
|
||||
postgresCertMountEnabled: true
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
|
||||
Reference in New Issue
Block a user