-
Notifications
You must be signed in to change notification settings - Fork 438
feat: generate TLS certificates using cert-manager #820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
21099d1
02d622b
9335416
4742761
2e08876
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| server: | ||
| additionalVolumeMounts: | ||
| - name: tls-certs | ||
| mountPath: /etc/tls | ||
| - name: temporal-tls-certs | ||
| mountPath: /etc/temporal/tls | ||
| additionalVolumes: | ||
| - name: tls-certs | ||
| secret: | ||
| secretName: tls-certs | ||
| - name: temporal-tls-certs | ||
| secret: | ||
| secretName: temporal-tls-certs | ||
| config: | ||
| tls: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can build |
||
| internode: | ||
| server: | ||
| certFile: "/etc/temporal/tls/tls.crt" | ||
| keyFile: "/etc/temporal/tls/tls.key" | ||
| requireClientAuth: true | ||
| clientCaFiles: | ||
| - "/etc/temporal/tls/ca.crt" | ||
| client: | ||
| serverName: "" | ||
| rootCaFiles: | ||
| - "/etc/temporal/tls/ca.crt" | ||
| frontend: | ||
| server: | ||
| certFile: "/etc/temporal/tls/tls.crt" | ||
| keyFile: "/etc/temporal/tls/tls.key" | ||
| requireClientAuth: false | ||
| client: | ||
| serverName: "" | ||
| rootCaFiles: | ||
| - "/etc/temporal/tls/ca.crt" | ||
| web: | ||
| additionalVolumeMounts: | ||
| - name: tls-certs | ||
| mountPath: /etc/tls | ||
| - name: temporal-tls-certs | ||
| mountPath: /etc/temporal/tls | ||
| additionalVolumes: | ||
| - name: tls-certs | ||
| secret: | ||
| secretName: tls-certs | ||
| - name: temporal-tls-certs | ||
| secret: | ||
| secretName: temporal-tls-certs | ||
| additionalEnv: | ||
| - name: TEMPORAL_TLS_SERVER_NAME | ||
| value: "" | ||
| - name: TEMPORAL_TLS_CA | ||
| value: /etc/temporal/tls/ca.crt | ||
| - name: TEMPORAL_TLS_CERT | ||
| value: /etc/temporal/tls/tls.crt | ||
| - name: TEMPORAL_TLS_KEY | ||
| value: /etc/temporal/tls/tls.key | ||
| frontend: | ||
| service: | ||
| enabled: true | ||
| ingress: | ||
| enabled: true | ||
| className: "" | ||
| hosts: | ||
| - "" | ||
| additionalSecrets: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these basically placeholders that |
||
| - name: tls-certs | ||
| value: | ||
| tls.crt: | | ||
| -----BEGIN CERTIFICATE----- | ||
| -----END CERTIFICATE----- | ||
| tls.key: | | ||
| -----BEGIN EC PRIVATE KEY----- | ||
| -----END EC PRIVATE KEY----- | ||
| certificates: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, maybe we add the volumes/mounts based on this block? Not sure if need to have |
||
| enabled: false | ||
| issuer: | ||
| name: temporal-issuer | ||
| secretName: tls-certs | ||
| certificate: | ||
| name: temporal-cert | ||
| isCA: false | ||
| secret: | ||
| name: temporal-tls-certs | ||
| privateKey: | ||
| algorithm: RSA | ||
| size: 2048 | ||
| rotationPolicy: Always | ||
| annotations: | ||
| argocd.argoproj.io/hook: PreSync | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| {{- if .Values.certificates.enabled }} | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Issuer | ||
| metadata: | ||
| name: {{ .Values.certificates.issuer.name }} | ||
| spec: | ||
| ca: | ||
| secretName: {{ .Values.certificates.issuer.secretName }} | ||
| --- | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Certificate | ||
| metadata: | ||
| name: {{ .Values.certificates.certificate.name }} | ||
| spec: | ||
| dnsNames: | ||
| - {{ index .Values.server.frontend.ingress.hosts 0 }} | ||
| commonName: {{ index .Values.server.frontend.ingress.hosts 0 }} | ||
| isCA: {{ .Values.certificates.certificate.isCA }} | ||
| issuerRef: | ||
| kind: Issuer | ||
| name: {{ .Values.certificates.issuer.name }} | ||
| secretName: {{ .Values.certificates.certificate.secret.name }} | ||
| privateKey: | ||
| algorithm: {{ .Values.certificates.certificate.privateKey.algorithm }} | ||
| size: {{ .Values.certificates.certificate.privateKey.size }} | ||
| rotationPolicy: {{ .Values.certificates.certificate.privateKey.rotationPolicy }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| {{- if .Values.additionalSecrets }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's not add an additionalSecrets concept here, but rather have secrets specific to TLS. I think there is actually a specific kind of secret in k8s for certificates? |
||
| {{- range .Values.additionalSecrets }} | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: "{{ .name }}" | ||
| data: | ||
| {{- range $key, $val := .value }} | ||
| {{ $key }}: {{ $val | b64enc | nindent 4 }} | ||
| {{- end }} | ||
| type: Opaque | ||
| {{- end }} | ||
| {{- end }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we automate these volumes/volumeMounts via helpers so that the user doesn't need to include them in their values? They are all boiler plate as the variable names and locations are all determined by Temporal itself. We can use a
server.tlsor similar values structure that mixes in the relevant volumes/mounts alongside anyadditional*the user has set. Likewiseweb.tls.