File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed
Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,29 @@ Then open `http://localhost:4005` in your browser.
3232| ` image.pullPolicy ` | Image pull policy | ` Always ` |
3333| ` replicaCount ` | Number of replicas | ` 1 ` |
3434
35+ ### Custom Root CA
36+
37+ | Parameter | Description | Default Value |
38+ | -------------- | ---------------------------------------- | ------------- |
39+ | ` customRootCA ` | Name of Secret containing CA certificate | ` "" ` |
40+
41+ To trust a custom CA certificate (e.g., for internal services with self-signed certificates):
42+
43+ 1 . Create a Secret with your CA certificate:
44+
45+ ``` bash
46+ kubectl create secret generic my-root-ca \
47+ --from-file=ca.crt=./path/to/ca-certificate.crt
48+ ```
49+
50+ 2 . Reference it in values:
51+
52+ ``` yaml
53+ customRootCA : my-root-ca
54+ ` ` `
55+
56+ The certificate will be mounted to ` /etc/ssl/certs/custom-root-ca.crt` and the `SSL_CERT_FILE` environment variable will be set automatically.
57+
3558# ## Service
3659
3760| Parameter | Description | Default Value |
Original file line number Diff line number Diff line change @@ -39,13 +39,24 @@ spec:
3939 - name : {{ .Chart.Name }}
4040 image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4141 imagePullPolicy : {{ .Values.image.pullPolicy }}
42+ {{- if .Values.customRootCA }}
43+ env :
44+ - name : SSL_CERT_FILE
45+ value : /etc/ssl/certs/custom-root-ca.crt
46+ {{- end }}
4247 ports :
4348 - name : http
4449 containerPort : {{ .Values.service.targetPort }}
4550 protocol : TCP
4651 volumeMounts :
4752 - name : postgresus-storage
4853 mountPath : {{ .Values.persistence.mountPath }}
54+ {{- if .Values.customRootCA }}
55+ - name : custom-root-ca
56+ mountPath : /etc/ssl/certs/custom-root-ca.crt
57+ subPath : ca.crt
58+ readOnly : true
59+ {{- end }}
4960 resources :
5061 {{- toYaml .Values.resources | nindent 12 }}
5162 {{- if .Values.livenessProbe.enabled }}
6677 timeoutSeconds : {{ .Values.readinessProbe.timeoutSeconds }}
6778 failureThreshold : {{ .Values.readinessProbe.failureThreshold }}
6879 {{- end }}
80+ {{- if .Values.customRootCA }}
81+ volumes :
82+ - name : custom-root-ca
83+ secret :
84+ secretName : {{ .Values.customRootCA }}
85+ {{- end }}
6986 {{- if .Values.persistence.enabled }}
7087 volumeClaimTemplates :
7188 - metadata :
Original file line number Diff line number Diff line change 99# StatefulSet configuration
1010replicaCount : 1
1111
12+ # RootCA setup, need name of secret in same namespace
13+ customRootCA : " "
14+
1215# Service configuration
1316service :
1417 type : ClusterIP
You can’t perform that action at this time.
0 commit comments