Reloader icon indicating copy to clipboard operation
Reloader copied to clipboard

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

Open arandth opened this issue 1 year ago • 6 comments

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:

  • https://raw.githubusercontent.com/stakater/Reloader/master/deployments/kubernetes/reloader.yaml

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?

arandth avatar Nov 18 '24 16:11 arandth

@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 avatar Nov 18 '24 17:11 MuneebAijaz

its better to use something of this sort, as mentioned in the issue description https://github.com/stakater/Reloader/issues/769#issue-2588588322

MuneebAijaz avatar Nov 18 '24 17:11 MuneebAijaz

Yes, use released versions instead of pointing to main

karl-johan-grahn avatar Nov 18 '24 17:11 karl-johan-grahn

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 https://github.com/stakater/Reloader/issues/769#issue-2588588322 points to argocd. Is there an example available how to do that for FluxCD? Thanks!

arandth avatar Nov 19 '24 07:11 arandth

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 avatar Nov 19 '24 07:11 MuneebAijaz

@arandth do you still need support or should the issue be closed?

karl-johan-grahn avatar May 14 '25 08:05 karl-johan-grahn