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

Our Google environment is broken which might be related to updates in https://raw.githubusercontent.com/stakater/Reloader/master/deployments/kubernetes/reloader.yaml #796

Open
arandth opened this issue Nov 18, 2024 · 5 comments
Labels
kind/support Label for guiding community on usage and questions

Comments

@arandth
Copy link

arandth commented Nov 18, 2024

Hi all (especially @MuneebAijaz )

We have a problem in our Flux-CD/kubernetes environment on Google Cloud Platform which might be related to recent changes in this repo.
Our cluster has a component called "reloader". In it's kustomization.yaml we used to have

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
metadata:
namespace: default
resources:

Since Friday afternoon we get a related error mesage from Flux-CD:
Deployment/default/reloader-reloader dry-run failed (Invalid): Deployment.apps "reloader-reloader" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"reloader-reloader"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable

I noticed that exactly at that time you merged a PR which contained the file "reloader.yaml".

To try it out I changed that resources-link to a local version of that file (containing the predecessor contents). With that it works again.

Was that breaking change intended?

@MuneebAijaz
Copy link
Contributor

@arandth apologies for the trouble. It's generally not recommended to point to main/master branches due to such issues, where breaking changes might be pushed.

That being said, last change i pushed to this file was 2 weeks ago, which was a tag change, that are safe to be updated in k8s. https://github.com/stakater/Reloader/blob/master/deployments/kubernetes/reloader.yaml

Deleting the deployment and letting FluxCD recreate that deployment should fix your issue. But I'd again suggest you to pls dont point to master branch for CD updates directly to the cluster.

@MuneebAijaz
Copy link
Contributor

its better to use something of this sort, as mentioned in the issue description
#769 (comment)

@karl-johan-grahn
Copy link
Contributor

Yes, use released versions instead of pointing to main

@arandth
Copy link
Author

arandth commented Nov 19, 2024

To be honest: It wasn't me to add that Reloader config to our system (But now I must repair it :-)
Thanks for that suggestion!
That patch-section in #769 (comment) points to argocd. Is there an example available how to do that for FluxCD?
Thanks!

@MuneebAijaz
Copy link
Contributor

I dont think it matters which tool u are using, since in both instances, there's a Kustomization file. so ideally, you would only need to edit that and make it similar to the suggestion for it to work.
https://github.com/fluxcd/flux2-kustomize-helm-example/blob/main/apps/production/kustomization.yaml

@MuneebAijaz MuneebAijaz added the kind/support Label for guiding community on usage and questions label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Label for guiding community on usage and questions
Projects
None yet
Development

No branches or pull requests

3 participants