Skip to content

Commit

Permalink
Allow the use of existing certs secret
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Carpio <carpioldc@gmail.com>
  • Loading branch information
ibice committed Oct 26, 2023
1 parent 5bab420 commit 3f07c25
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
15 changes: 15 additions & 0 deletions step-certificates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ existingSecrets:
enabled: true
ca: true
issuer: true
certsAsSecret: true
configAsSecret: true
sshHostCa: true
sshUserCa: true
Expand Down Expand Up @@ -162,6 +163,19 @@ which contains the following data:
required if an X5C provisioner is used to talk with the CA, but it can also
be used with JWK if the encrypted key is not distributed by the CA.

When `existingSecrets.certsAsSecret` is `true`
secret name: `{{ include "step-certificates.fullname" . }}-certs`
which contains the following data:

- `root_ca.crt`
- The root CA certificate.
- `intermediate_ca.crt`
- The intermediate CA certificate (optional).
- `ssh_host_ca_key.pub:`
- The SSH host CA public key (optional).
- `ssh_user_ca_key.pub:`
- The SSH user CA public key (optional).

When `existingSecrets.configAsSecret` is `true`
secret name: `{{ include "step-certificates.fullname" . }}-config`
which contains the following data:
Expand Down Expand Up @@ -285,6 +299,7 @@ chart and their default values.
| `existingSecrets.issuer` | When `true`use existing secret for the issuer. | `false` |
| `existingSecrets.sshHostCa` | When `true`use existing secret for the ssh host CA public key. | `false` |
| `existingSecrets.sshUserCa` | When `true`use existing secret for the ssh user CA public key. | `false` |
| `existingSecrets.certsAsSecret` | When `true`use existing secret for certs instead of ConfigMap | `false` |
| `existingSecrets.configAsSecret` | When `true`use existing secret for configuration instead of ConfigMap | `false` |
| `podSecurityContext` | Set SecurityContext on POD level for STEP CA and STEP CA bootstrap job | See [values.yaml](./values.yaml) |

Expand Down
1 change: 1 addition & 0 deletions step-certificates/examples/existing_secrets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ existingSecrets:
enabled: true
ca: true
issuer: true
certsAsSecret: true
configAsSecret: true
sshHostCa: true
sshUserCa: true
Expand Down
5 changes: 5 additions & 0 deletions step-certificates/templates/ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,13 @@ spec:
{{- end }}
volumes:
- name: certs
{{- if and .Values.existingSecrets.enabled .Values.existingSecrets.certsAsSecret }}
secret:
secretName: {{ include "step-certificates.fullname" . }}-certs
{{- else }}
configMap:
name: {{ include "step-certificates.fullname" . }}-certs
{{- end }}
- name: config
{{- if and .Values.existingSecrets.enabled .Values.existingSecrets.configAsSecret }}
secret:
Expand Down
1 change: 1 addition & 0 deletions step-certificates/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ existingSecrets:
enabled: false
ca: false
issuer: false
certsAsSecret: false
configAsSecret: false
sshHostCa: false
sshUserCa: false
Expand Down

0 comments on commit 3f07c25

Please sign in to comment.