-
Notifications
You must be signed in to change notification settings - Fork 157
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
feat: set default observedGeneration to -1 on HelmReleases #294
Conversation
Would like to study a bit if this is a common pattern, and if there are others. If you have already done this, please tell and I will take it into account. Given the simplicity however, I am leaning towards simply going with this, but in any case it should be patched on all our controllers. |
I absolutely agree that we should investigate how common this way of setting default statuses is. I would suppose a webhook is more common given the flexibility a webhook offers.
You mean on kustomize-controller, source-controller etc.? |
We've discuss webhooks before, I would stay away from them until there is no way around it. Setting defaults for CR fields is not a job for a custom webhook as defaults are fully supported by the Kubernetes builtin admission controller. |
I agree that adding a webhook is a pain in the neck. So for now we have discussed these 3 options to fix fluxcd/kustomize-controller#387:
|
A custom status reader would only solve it for us, but not for others using |
345186e
to
eb31982
Compare
This looks OK to be merged, but as I am on short leave from Fri - Wed, I am going to wait with merging as it would bump the MINOR version. This allows allows patch releases to be made without too much hassle during my absence. |
@makkes can you please rebase instead of merging in |
e5c8724
to
de3079c
Compare
This resolves an issue with kustomize-controller marking a Kustomization as healthy even when the helm-controller hasn't even looked at the HelmRelease targeted by the Kustomization's healthChecks, yet. Setting `observedGeneration` to -1 by default will cause kstatus to report a status of `InProgress` instead of `Ready`. see fluxcd/kustomize-controller#387 for details on the issues this is solving. Signed-off-by: Max Jonas Werner <mail@makk.es>
Signed-off-by: Max Jonas Werner <mail@makk.es>
Signed-off-by: Max Jonas Werner <mail@makk.es>
When the e2e workflow fails the "Debug failure" step should not assume that the CRDs it tries to fetch CRs for exist because the workflow might have failed before even creating the CRDs. Signed-off-by: Max Jonas Werner <mail@makk.es>
Since the kubectl version used in the workflow (v1.16.4) has a bug (kubernetes/kubernetes#23386) with the output of jsonpath formatting being a Go representation instead of JSON. Signed-off-by: Max Jonas Werner <mail@makk.es>
de3079c
to
89f8f7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @makkes, and sorry for the wait 🍻
This is a follow-up to fluxcd/helm-controller#294, porting the same code to the kustomize-controller so that all Flux 2 controllers work the same way in this regard. Signed-off-by: Max Jonas Werner <mail@makk.es>
This sets the `status.observedGeneration` field to -1 by default. This is a follow-up to fluxcd/helm-controller#294, porting the same code to the notification-controller so that all Flux 2 controllers work the same way in this regard. Signed-off-by: Max Jonas Werner <mail@makk.es>
This is a follow-up to fluxcd/helm-controller#294, porting the same code to the kustomize-controller so that all Flux 2 controllers work the same way in this regard. Signed-off-by: Max Jonas Werner <mail@makk.es>
This sets the `status.observedGeneration` field to -1 by default. This is a follow-up to fluxcd/helm-controller#294, porting the same code to the notification-controller so that all Flux 2 controllers work the same way in this regard. Signed-off-by: Max Jonas Werner <mail@makk.es>
This resolves an issue with kustomize-controller marking a
Kustomization as healthy even when the helm-controller hasn't even
looked at the HelmRelease targeted by the Kustomization's
healthChecks, yet. Setting
observedGeneration
to -1 by default willcause kstatus to report a status of
InProgress
instead ofReady
.see fluxcd/kustomize-controller#387 for
details on the issues this is solving.
Signed-off-by: Max Jonas Werner mail@makk.es