atlassian / smith

Smith is a Kubernetes workflow engine / resource manager
Apache License 2.0
285 stars 24 forks source link

Enqueue Bundle on ConfigMap/Secret event #397

Closed ash2k closed 5 years ago

ash2k commented 5 years ago

If there is a Deployment in a Bundle that uses ConfigMap/Secret and this object is updated, Bundle is enqueued for processing. Fixes #394.

Not sure how to test this. Will think more.

ash2k commented 5 years ago

I want to have some tests here, so I'm not merging it straight away.

ash2k commented 5 years ago

@ash2k don't we need a similar fix for Secret -> ServiceInstance -> Bundle propagation?

@nilebox yes, good catch. We need the same fix there. https://github.com/atlassian/smith/issues/402

ash2k commented 5 years ago

I've added a test, ready for re-review. No code modifications were required. I could write a unit test but that would require a massive amount of setup code. I tried to re-use the testCase type that we have, but substituting workqueue with a mock one didn't work because it's copied to the lookup handler before I can replace it (without re-doing all the plumbing).

I'm going to do the same for Secret->ServiceInstance once this is merged.