Skip to content

Commit d4beb40

Browse files
committed
chart: onlyt set ca. config and ca defined out of values.yaml
1 parent b608e58 commit d4beb40

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

chart/mongodb-probe/templates/configmap.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ data:
88
spring.profiles.active=k8s
99
1010
spring.ssl.bundle.pem.mongodb-ssl-bundle.reload-on-update=true
11-
spring.ssl.bundle.pem.mongodb-ssl-bundle.truststore.certificate=file:/workspace/config/{{ .Values.mongodb.tlsSecretCaKey }}
12-
#spring.ssl.bundle.pem.mongodb-ssl-bundle.keystore.private-key=file:/workspace/config/...
11+
spring.ssl.bundle.pem.mongodb-ssl-bundle.truststore.certificate=file:/workspace/config/tls/{{ .Values.mongodb.tlsSecretCaKey }}
1312
1413
spring.data.mongodb.uri={{ .Values.mongodb.uri }}
1514
spring.data.mongodb.ssl.enabled=true

chart/mongodb-probe/templates/deployment.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,15 @@ spec:
5757

5858
resources:
5959
{{- toYaml .Values.resources | nindent 12 }}
60-
{{- with .Values.volumeMounts }}
60+
6161
volumeMounts:
62+
- name: tls
63+
mountPath: /workspace/config/tls
64+
readOnly: true
65+
- name: config
66+
mountPath: /workspace/config
67+
68+
{{- with .Values.volumeMounts }}
6269
{{- toYaml . | nindent 12 }}
6370
{{- end }}
6471

@@ -67,9 +74,16 @@ spec:
6774
{{- toYaml . | nindent 12 }}
6875
{{- end }}
6976

70-
71-
{{- with .Values.volumes }}
7277
volumes:
78+
- name: tls
79+
secret:
80+
secretName: {{ .Values.mongodb.tlsSecretName }}
81+
optional: false
82+
- name: config
83+
configMap:
84+
name: mongodb-probe-config
85+
86+
{{- with .Values.volumes }}
7387
{{- toYaml . | nindent 8 }}
7488
{{- end }}
7589
{{- with .Values.nodeSelector }}

chart/mongodb-probe/values.yaml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,31 +79,22 @@ autoscaling:
7979
# targetMemoryUtilizationPercentage: 80
8080

8181
# Additional volumes on the output Deployment definition.
82-
volumes:
83-
- name: config
84-
configMap:
85-
name: mongodb-probe-config
86-
87-
- name: tls
88-
secret:
89-
secretName: {{ .Values.mongodb.tlsSecretname }}
90-
optional: false
82+
volumes: []
83+
#- name: config
84+
# configMap:
85+
# name: mongodb-probe-config
9186

9287
# Additional volumeMounts on the output Deployment definition.
93-
volumeMounts:
94-
- name: config
95-
mountPath: /workspace/config
88+
volumeMounts: []
89+
#- name: config
90+
# mountPath: /workspace/config
9691

97-
- name: tls
98-
mountPath: /workspace/config/tls
99-
readOnly: true
10092

10193
# Additional env vars
10294
envs: []
10395
# - name: foo
10496
# value: "bar"
10597

106-
10798
nodeSelector: {}
10899

109100
tolerations: []
@@ -112,7 +103,7 @@ affinity: {}
112103

113104
#probe specific default values
114105
mongodb:
115-
tlsSecretname: mysecret
106+
tlsSecretName: mysecret
116107
tlsSecretCaKey: ca.crt
117108

118109
uri: mongodb://admin:password@localhost:27017/mydb

0 commit comments

Comments
 (0)