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

Impossible to upgrade prometheus-operator's CRD to 0.65.1 #3953

Closed
1 task done
sereinity opened this issue Jun 5, 2023 · 2 comments
Closed
1 task done

Impossible to upgrade prometheus-operator's CRD to 0.65.1 #3953

sereinity opened this issue Jun 5, 2023 · 2 comments

Comments

@sereinity
Copy link

Describe the bug

I wanted to upgrade kube-prometheus-stack from 45.31.1 to 46.6.0 which upgrades prometheus-operator.

Upgrade notes states that we need to upgrades CRDs before upgrading the component.

But when I did it (on a test cluster) I got the following error over multiple CRDs:

error: Apply failed with 1 conflict: conflict with "helm-controller" using apiextensions.k8s.io/v1: .spec.versions
Please review the fields above--they currently have other managers. Here
are the ways you can resolve this warning:
* If you intend to manage all of these fields, please re-run the apply
  command with the `--force-conflicts` flag.
* If you do not intend to manage all of the fields, please edit your
  manifest to remove references to the fields that should keep their
  current managers.
* You may co-own fields by updating your manifest to match the existing
  value; in this case, you'll become the manager if the other manager(s)
  stop managing the field (remove it from their configuration).
See https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts

Steps to reproduce

  1. Install stable flux
  2. Ensure manifests/monitoring/kube-prometheus-stack is applied (from this repository) (this will install kube-prometheus-stack 45.x)
  3. Run commands specified in upgrade instructions

Expected behavior

The CRDs are upgraded so that we can patch and upgrade kube-prometheus-stack to 46.x.

Screenshots and recordings

No response

OS / Distro

N/A

Flux version

0.41.2

Flux check

► checking prerequisites
✗ flux 0.41.2 <2.0.0-rc.5 (new version is available, please upgrade)
✔ Kubernetes 1.25.8-gke.500 >=1.20.6-0
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.31.2
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v0.35.1
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v0.33.0
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v0.36.1
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta2
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1beta2
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta1
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1beta2
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta2
✔ receivers.notification.toolkit.fluxcd.io/v1beta2
✔ all checks passed

Git provider

No response

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@weisdd
Copy link

weisdd commented Jun 6, 2023

@sereinity I think you should rather instruct flux to keep CRDs updated:

kind: HelmRelease
# [...]
spec:
  install:
    crds: CreateReplace
  upgrade:
    crds: CreateReplace

@sereinity
Copy link
Author

Thanks, works wonderfully.

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

No branches or pull requests

2 participants