-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
When using the examples of Kubernetes TLS certificates here (https://external-secrets.io/latest/guides/common-k8s-secret-types/#tls-cert-example), an error is reported from the ExternalSecret resource:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning UpdateFailed 36s (x2 over 37s) external-secrets could not apply template: could not execute template: could not execute template: unable to execute template at key tls.key: unable to parse template at key tls.key: template: tls.key:1: function "pemPrivateKey" not defined
Warning UpdateFailed 16s (x11 over 37s) external-secrets could not apply template: could not execute template: could not execute template: unable to execute template at key tls.crt: unable to parse template at key tls.crt: template: tls.crt:1: function "pemCertificate" not defined
The documentation says pemCertificate no longer needs to be used (https://external-secrets.io/latest/guides/templating/), but I guess it's now a validation error and not just redundant.
My suggestion would be to remove pemCertificate and pemPrivateKey from https://external-secrets.io/latest/guides/common-k8s-secret-types/#tls-cert-example
To Reproduce
Steps to reproduce the behavior:
- Create a sample ExternalSecret
- Apply it
- Check if the new resource validates
Expected behavior
Resource validates
Additional context
Attempting to create an ExternalSecret to create a K8s TLS certificate secret, using example from docs