Skip to content
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

[Enhancement] include Ambassador Host tlsSecret in Secret freezing #37

Open
MarkSymsCtx opened this issue Jan 21, 2022 · 1 comment
Open

Comments

@MarkSymsCtx
Copy link

We use Ambassador as our ingress controller and an automated CI deployment system for managing/pushing updates to the Kubernetes cluster. After a recent update to the TLS certs for Ambassador we found that it didn't pick up the new secret. It looks like this piece of config doesn't get picked up by kubetpl render as it uses a tlsSecret key to reference the secret rather than the normal secretName.

See https://www.getambassador.io/docs/edge-stack/latest/topics/running/host-crd/#tlssecret-enables-tls-termination

If this functionality could be added it would be great.

@MarkSymsCtx
Copy link
Author

I'm not sure if this patch is all that would be required?

diff --git a/engine/processor/freeze.go b/engine/processor/freeze.go
index 01de63d..06003e8 100644
--- a/engine/processor/freeze.go
+++ b/engine/processor/freeze.go
@@ -24,6 +24,7 @@ const (
 	kindReplicationController = "ReplicationController"
 	kindStatefulSet           = "StatefulSet"
 	kindCronJob               = "CronJob"
+	kindHostCrd               = "Host"
 )
 
 type frozenObjectRef struct {
@@ -75,6 +76,9 @@ func init() {
 	}
 	configMap[kindCronJob] = mapWithPrefix(configMap[kindPod], "spec.jobTemplate.spec.template.")
 	secret[kindCronJob] = mapWithPrefix(secret[kindPod], "spec.jobTemplate.spec.template.")
+	secret[kindHostCrd] = []string{
+		"spec.tlsSecret[*].name"
+	}
 	pathsToRewrite = map[kind]map[kind][]string{
 		kindConfigMap: configMap,
 		kindSecret:    secret,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant