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

DIFF does not seem to work in case of CRD version upgrade #2551

Open
1 task done
Martin-Weiss opened this issue Jun 25, 2024 · 3 comments
Open
1 task done

DIFF does not seem to work in case of CRD version upgrade #2551

Martin-Weiss opened this issue Jun 25, 2024 · 3 comments
Assignees
Labels
Milestone

Comments

@Martin-Weiss
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

We deploy open-telemetry and kubewarden via fleet. In kubewarden-app bundle we get "modified" and we can not get a diff working. Assuption is that this happens because fleet deploys v1alpha1 CRD via helm chart for kubewarden-controller but kubernetes switches the object to v1beta1 - so the diff does not match properly.

See https://github.com/Martin-Weiss/rancher-fleet/blob/main/kubewarden/app/fleet.yaml#L12 - this diff does not work.

Expected Behavior

The diff should work regardless of CRD version changes

Steps To Reproduce

  1. install opentelemetry via fleet
  2. install kubewarden via fleet

Try to create a proper diff to get rid of "modified".

Environment

- Architecture: x86_64
- Fleet Version: fleet-103.1.2+up0.9.2 / 	fleet-crd-103.1.5+up0.9.5
- Cluster:
  - Kubernetes Version: RKE2 v1.28.10+rke2r1

Logs

No response

Anything else?

No response

@kkaempf kkaempf added this to the v2.9.0 milestone Jun 25, 2024
@manno
Copy link
Member

manno commented Jun 25, 2024

I can reproduce this in a small experiment: https://github.com/manno/fleet-experiments/blob/main/crd-versioning/crds/crd-versions.yaml

@manno manno self-assigned this Jul 1, 2024
@manno manno modified the milestones: v2.9.0, v2.9-Next1 Jul 3, 2024
@manno
Copy link
Member

manno commented Jul 9, 2024

I was missing the namespace on my comparePatches. I can't reproduce this exact error, however I see that on 0.9.5 and 0.10 two bundles are in an errorApplied state.
The agent logs:

fleet-agent-5447c777d8-sxkrc fleet-agent time="2024-07-09T10:18:09Z" level=debug msg="Bundle cluster-fleet-local-local-1a3d67d0a899/kubewarden-kubewarden-app has a dependency that is not ready: list bundledeployments: no bundles matching labels fleet.cattle.io/bundle-name=kubewarden-crd,fleet.cattle.io/bundle-namespace=fleet-local in namespace fleet-local"

However, the bundle name is kubewarden-kubewarden-crd as it is not affected by the releaseName option.

After adapting the bundle names, the deployments eventually succeed.


  # Format:
  #     <GITREPO-NAME>-<BUNDLE_PATH> with all path separators replaced by "-"
  #
  # Example:
  #
  #      GitRepo name "one", Bundle path "/multi-cluster/hello-world"
  #      results in "one-multi-cluster-hello-world".

It might be easier to match with a selector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Blocked
Development

No branches or pull requests

3 participants