Closed jabdoa2 closed 1 month ago
I tested this on a cluster and it works fine. Fixed two issues which I noticed during testing.
This should be ready to review now. Its working with and without webhooks and we got tests to verify that both works using helm in minikube.
Let me get this straight: Before this commit a deployment referencing a non-exiteant CM would be stuck at ContainerCreating stuck in k8s, but wave could start watching for the CM immediately and add the hash once it exists. After this PR wave holds the Pod in Pending until the cm exists, so that it will never run without the annotation?
Multiple cases:
a) All required CMs/secrets exist before the deployment b) An optional secret is created after (a) c) At least on required CMs/secret does not exist before the deployment (typical helm install case)
a) All required CMs/secrets exist before the deployment 1 + 2 Before and Without webhooks
b) An optional secret is created
2 + 3: With or Without webhooks
c) At least on required CMs/secret does not exist before the deployment (typical helm install case)
Before
Without webhooks
With webhooks
To summarize:
We could decide the make the scheduler trick optional. Webhooks would still have advantages for case (a). However, for us case (c) is far more common. We often install helm charts so this is quite common.
Thank you for that detailed answer.
LGTM, but: Is the scheduler name invalid
somehow reserved? Could I have a stupid cluster with a valid scheduler called invalid
? If yes, I think I would prefer to call the invalid scheduler wave.pusher.com/invalid
.
Thank you for that detailed answer.
LGTM, but: Is the scheduler name
invalid
somehow reserved? Could I have a stupid cluster with a valid scheduler calledinvalid
? If yes, I think I would prefer to call the invalid schedulerwave.pusher.com/invalid
.
Its not reserved. Let me test if that would be a valid name.
Should we do a release today or do you have any more changes in the pipeline?
Should we do a release today or do you have any more changes in the pipeline?
I would love a release today. We want this change in our clusters :-).
Implement (optional) mutating webhooks to reduce the number or restarts in new deployments when configmaps and secrets already exist.
Additional changes (based on observations during testing):
Everything is tested. Let me know if you want any changes.
On top of #154.