Is there anyway to do a rolling deploy of a @kubernetesio deployment using a configmap when deploying with @HashiCorp Terraform?
-
Show this thread
-
Seems like there’s no easy way in K8s to apply configmap or secret changes for fear that it would break running pods. You have to manually orchestrate a rolling deployment update. Since there’s no API for that, Terraform can’t handle it, afaict.
1 reply 0 retweets 0 likesShow this thread -
Replying to @KarlKFI
Create a new ConfigMap and update the reference in the Deployment. https://github.com/kubernetes/kubernetes/issues/22368 …
1 reply 0 retweets 1 like -
Replying to @bgrant0607 @KarlKFI
Agree -- sometimes a configmap/secret is a "child object" to the deployment and sometimes it isn't. YAML management/template/config system can help to represent when it is.
1 reply 0 retweets 0 likes -
Replying to @jbeda @bgrant0607
Ok so replacing the configmap seems reasonable manually, provided the deployment handles the rolling update. But it doesn’t seem easy with the Terraform provider. You’d have to generate a new name only when the config changes... maybe with a random_id resource.
2 replies 0 retweets 0 likes -
Replying to @KarlKFI @bgrant0607
Couldn't you derive the name of the configmap from a hash? You can then recreate it and thread it through. Not familiar with the terraform impl around k8s here. Not sure how many people are using it.
2 replies 0 retweets 0 likes
The official provider is extremely out of date (e.g., no Deployment), so my guess is not many, despite results of the SIG Apps survey.
-
-
Replying to @bgrant0607 @KarlKFI
It is clear that lots of folks use Terraform to deploy Kubernetes but I'm unsure how many use Terraform to deploy TO Kubernetes. I wonder if there is confusion there.
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.