Describe the bug
I'm trying to upgrade the API of a CRD resource through flux and get dry-run failed: .spec.accessPolicy: field not declared in schema. When applying the same change via kubectl it works without issues.
Steps to reproduce
Consider this CRD object already being applied in the cluster:
apiVersion: policy.linkerd.io/v1beta1
kind: Server
metadata:
name: rabbitmq-management
namespace: rabbitmq-instances
spec:
podSelector:
matchLabels:
app.kubernetes.io/part-of: rabbitmq
port: management
When upgrading this to v1beta3
apiVersion: policy.linkerd.io/v1beta3
kind: Server
metadata:
name: rabbitmq-management
namespace: rabbitmq-instances
spec:
podSelector:
matchLabels:
app.kubernetes.io/part-of: rabbitmq
port: management
and applying the change through Flux it will result in error Server/rabbitmq-instances/rabbitmq-management dry-run failed: .spec.accessPolicy: field not declared in schema
You can find the CRD here: https://github.com/linkerd/linkerd2/blob/main/charts/linkerd-crds/templates/policy/server.yaml
accessPolicy is a new, optional field of version v1beta3. Applying the same change via kubectl apply works.
Expected behavior
No error when applying the change
Screenshots and recordings
No response
OS / Distro
N/A
Flux version
N/A
Flux check
► checking prerequisites
✗ flux 2.7.3 <2.7.5 (new CLI version is available, please upgrade)
✔ Kubernetes 1.34.2-eks-b3126f4 >=1.32.0-0
► checking version in cluster
✔ distribution: flux-v2.7.5
✔ bootstrapped: true
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v1.4.5
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v1.7.3
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v1.7.5
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v1.7.4
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta3
✔ buckets.source.toolkit.fluxcd.io/v1
✔ externalartifacts.source.toolkit.fluxcd.io/v1
✔ gitrepositories.source.toolkit.fluxcd.io/v1
✔ helmcharts.source.toolkit.fluxcd.io/v1
✔ helmreleases.helm.toolkit.fluxcd.io/v2
✔ helmrepositories.source.toolkit.fluxcd.io/v1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1
✔ ocirepositories.source.toolkit.fluxcd.io/v1
✔ providers.notification.toolkit.fluxcd.io/v1beta3
✔ receivers.notification.toolkit.fluxcd.io/v1
✔ all checks passed
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
Describe the bug
I'm trying to upgrade the API of a CRD resource through flux and get
dry-run failed: .spec.accessPolicy: field not declared in schema. When applying the same change viakubectlit works without issues.Steps to reproduce
Consider this CRD object already being applied in the cluster:
When upgrading this to
v1beta3and applying the change through Flux it will result in error
Server/rabbitmq-instances/rabbitmq-management dry-run failed: .spec.accessPolicy: field not declared in schemaYou can find the CRD here: https://github.com/linkerd/linkerd2/blob/main/charts/linkerd-crds/templates/policy/server.yaml
accessPolicyis a new, optional field of versionv1beta3. Applying the same change viakubectl applyworks.Expected behavior
No error when applying the change
Screenshots and recordings
No response
OS / Distro
N/A
Flux version
N/A
Flux check
► checking prerequisites
✗ flux 2.7.3 <2.7.5 (new CLI version is available, please upgrade)
✔ Kubernetes 1.34.2-eks-b3126f4 >=1.32.0-0
► checking version in cluster
✔ distribution: flux-v2.7.5
✔ bootstrapped: true
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v1.4.5
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v1.7.3
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v1.7.5
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v1.7.4
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta3
✔ buckets.source.toolkit.fluxcd.io/v1
✔ externalartifacts.source.toolkit.fluxcd.io/v1
✔ gitrepositories.source.toolkit.fluxcd.io/v1
✔ helmcharts.source.toolkit.fluxcd.io/v1
✔ helmreleases.helm.toolkit.fluxcd.io/v2
✔ helmrepositories.source.toolkit.fluxcd.io/v1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1
✔ ocirepositories.source.toolkit.fluxcd.io/v1
✔ providers.notification.toolkit.fluxcd.io/v1beta3
✔ receivers.notification.toolkit.fluxcd.io/v1
✔ all checks passed
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct