kustomize-controller
                                
                                
                                
                                    kustomize-controller copied to clipboard
                            
                            
                            
                        CephFilesystem: .spec.dataPools[0].name: field not declared in schema
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
- 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
- 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
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?