kustomize-controller icon indicating copy to clipboard operation
kustomize-controller copied to clipboard

CephFilesystem: .spec.dataPools[0].name: field not declared in schema

Open tadrian88 opened this issue 3 years ago • 1 comments

Describe the bug

When deploying a rook-ceph filesystem through a flux kustomization, I get the error below.

CephFilesystem/rook-ceph/myfs dry-run failed, error: failed to create typed patch object (rook-ceph/myfs; ceph.rook.io/v1, Kind=CephFilesystem): .spec.dataPools[0].name: field not declared in schema

If using the same manifests but deployed through kubectl apply -k, the resources are getting deployed.

Steps to reproduce

  1. Install a rook cluster with the following commands:
$ git clone --single-branch --branch v1.9.2 https://github.com/rook/rook.git
cd rook/deploy/examples
kubectl create -f crds.yaml -f common.yaml -f operator.yaml
kubectl create -f cluster.yaml
  1. Deploy a rook filesystem using the manifest from the link below:

https://raw.githubusercontent.com/rook/rook/master/deploy/examples/filesystem-test.yaml

Flux check

► checking prerequisites ✗ flux 0.31.3 <0.31.4 (new version is available, please upgrade) ✔ Kubernetes 1.24.0 >=1.20.6-0 ► checking controllers ✔ helm-controller: deployment ready ► ghcr.io/fluxcd/helm-controller:v0.22.1 ✔ kustomize-controller: deployment ready ► ghcr.io/fluxcd/kustomize-controller:v0.26.2 ✔ notification-controller: deployment ready ► ghcr.io/fluxcd/notification-controller:v0.24.0 ✔ source-controller: deployment ready ► ghcr.io/fluxcd/source-controller:v0.25.9 ► checking crds ✔ alerts.notification.toolkit.fluxcd.io/v1beta1 ✔ 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 ✔ providers.notification.toolkit.fluxcd.io/v1beta1 ✔ receivers.notification.toolkit.fluxcd.io/v1beta1 ✔ all checks passed

tadrian88 avatar Jul 18 '22 21:07 tadrian88

Flux uses server-side apply, I guess this is a bug in the CEPH CRDs, does it work if you do kubectl apply --server-side --dry-run=server?

stefanprodan avatar Jul 26 '22 11:07 stefanprodan