Add support for standard TLS secret key names for helm charts#62222
Add support for standard TLS secret key names for helm charts#62222
Conversation
|
Amplify deployment status
|
|
As a side note: currently {{- if .Values.tls.existingCASecretName }}
- name: SSL_CERT_FILE
value: /etc/teleport-tls-ca.pem
{{- end }}Should this be standardized and renamed to This will then change the volume mount from {{- if .Values.tls.existingCASecretName }}
- mountPath: /etc/teleport-tls-ca.pem
name: teleport-tls-ca
subPath: {{ required "tls.existingCASecretKeyName must be set if tls.existingCASecretName is set in chart values" .Values.tls.existingCASecretKeyName | quote }}
{{- end }}to {{- if .Values.tls.existingCASecretName }}
- mountPath: /etc/teleport-tls-ca
name: "teleport-tls-ca"
{{- end }}Alternatively, we can standardize the CA file path in this PR to Which approach is preferred? |
bernardjkim
left a comment
There was a problem hiding this comment.
I think it's a good call to standardize our approach here. I don't have a strong opinion on what we choose, but if I understand correctly, using the first approach has the small benefit of providing the helpful error message when the required value is missing.
| {{- if .Values.tls.existingCASecretName }} | ||
| - name: SSL_CERT_FILE | ||
| value: /etc/teleport-tls-ca.pem | ||
| value: "/etc/teleport-tls-ca/{{ required "tls.existingCASecretKeyName must be set if tls.existingCASecretName is set in chart values" .Values.tls.existingCASecretKeyName }}" | ||
| {{- end }} |
There was a problem hiding this comment.
In teleport-relay chart, migrated the required check (and standardized CA file name) from volumeMounts. This removes subPath from the volume mount. LMK if the other way is preferred (for all charts).
* Add support for standard TLS secret key names for Event Handler helm chart * Add support for Teleport Cluster helm chart * Add support for Teleport Operator and Kube Agent; update comments for Teleport Cluster * Re-render/update docs * Minor fix for Teleport Cluster chart docs * Remove redundant default in templates * Add newline * Add required and error msgs; standardize teleport-relay chart * Re-render docs
#62451) * Add support for standard TLS secret key names for Event Handler helm chart * Add support for Teleport Cluster helm chart * Add support for Teleport Operator and Kube Agent; update comments for Teleport Cluster * Re-render/update docs * Minor fix for Teleport Cluster chart docs * Remove redundant default in templates * Add newline * Add required and error msgs; standardize teleport-relay chart * Re-render docs
* Add support for standard TLS secret key names for Event Handler helm chart * Add support for Teleport Cluster helm chart * Add support for Teleport Operator and Kube Agent; update comments for Teleport Cluster * Re-render/update docs * Minor fix for Teleport Cluster chart docs * Remove redundant default in templates * Add newline * Add required and error msgs; standardize teleport-relay chart * Re-render docs
Fixes #59389
Part of #60411
This PR adds support for standard TLS secret key names (eg. from tools like cert-manager, or
type: kubernetes.io/tlssecrets) for helm charts. This allows users to specify a TLS secret key name via setting a new fieldexistingCASecretKeyName, such astls.crtorca.crt. Backwards compatibility is preserved by setting default toca.pem.This includes
teleport-plugin-event-handler,teleport-cluster,teleport-operator,teleport-kube-agentcharts.changelog: Added support for standard TLS secret key names for helm charts:
teleport-plugin-event-handler,teleport-cluster,teleport-operator,teleport-kube-agent