Skip to content

Commit 96b4756

Browse files
committed
configurable custom CA
1 parent 1638e48 commit 96b4756

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

step-certificates/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ chart and their default values.
6060
| `ca.db.size` | Persistent volume size | `10Gi` |
6161
| `ca.runAsRoot` | Run the CA as root. | `false` |
6262
| `ca.bootstrap.postInitHook` | Extra script snippet to run after `step ca init` has completed. | `""` |
63+
| `ca.bootstrap.rootCA.secret`| Name of the custom root CA secret (k8s tls secret) to be used. | `""` |
6364
| `service.type` | Service type | `ClusterIP` |
6465
| `service.port` | Incoming port to access Step CA | `443` |
6566
| `service.targetPort` | Internal port where Step CA runs | `9000` |

step-certificates/templates/bootstrap.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ spec:
2424
serviceAccountName: {{ include "step-certificates.fullname" . }}-config
2525
restartPolicy: Never
2626
volumes:
27+
{{- if .Values.ca.bootstrap.rootCA.secret }}
28+
- name: {{ include "step-certificates.fullname" . }}-ca-volume
29+
secret:
30+
secretName: "{{ .Values.ca.bootstrap.rootCA.secret }}"
31+
{{- end }}
2732
- name: bootstrap
2833
configMap:
2934
name: {{ include "step-certificates.fullname" . }}-bootstrap
@@ -36,4 +41,8 @@ spec:
3641
- name: bootstrap
3742
mountPath: /home/step/bootstrap
3843
readOnly: true
44+
{{- if .Values.ca.bootstrap.rootCA.secret }}
45+
- name: {{ include "step-certificates.fullname" . }}-ca-volume
46+
mountPath: /tmp/certs
47+
{{- end }}
3948
{{- end }}

step-certificates/templates/configmaps.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ data:
107107
--provisioner "{{.Values.ca.provisioner.name}}" \
108108
--with-ca-url "{{include "step-certificates.url" .}}" \
109109
--password-file "$TMP_CA_PASSWORD" \
110-
--provisioner-password-file "$TMP_CA_PROVISIONER_PASSWORD" {{ if not .Values.ca.db.enabled }}--no-db{{ end }}
110+
--provisioner-password-file "$TMP_CA_PROVISIONER_PASSWORD" {{ if not .Values.ca.db.enabled }}--no-db{{ end }} {{ if .Values.ca.bootstrap.rootCA.secret }}--root /tmp/certs/tls.crt --key /tmp/certs/tls.key{{ end }}
111111
112112
rm -f $TMP_CA_PASSWORD $TMP_CA_PROVISIONER_PASSWORD
113113

step-certificates/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ ca:
7070
bootstrap:
7171
# Add script snippets here to be executed after the step ca init has been run
7272
postInitHook: ""
73+
rootCA:
74+
secret:
75+
name:
7376

7477
# autocert is used to configure the autocert chart that depends on step-certificates.
7578
autocert:

0 commit comments

Comments
 (0)