Problem
`charts/cloud-vinyl/crds/vinylcache.yaml` is a manually maintained copy of the controller-gen-generated CRD at `config/crd/bases/vinyl.bluedynamics.eu_vinylcaches.yaml`. When the API types change, `make generate manifests` updates the latter but not the chart copy, leading to silent drift.
This bit us in PR #33: the per-backend-directors work added `spec.backends[].director`, but the chart CRD wasn't updated — CI installed the stale chart and rejected the new field with `strict decoding error: unknown field "spec.backends[0].director"`. Required commit 78a5a3a to manually sync.
Proposed fix
Add a Makefile target (or extend `manifests`) to copy the generated CRD into the chart after each regeneration:
```makefile
.PHONY: chart-crds
chart-crds: manifests
cp config/crd/bases/vinyl.bluedynamics.eu_vinylcaches.yaml charts/cloud-vinyl/crds/vinylcache.yaml
```
Or wire it into the existing `manifests` target so it always runs together. Optionally add a CI check that fails if the two files differ.
References
Problem
`charts/cloud-vinyl/crds/vinylcache.yaml` is a manually maintained copy of the controller-gen-generated CRD at `config/crd/bases/vinyl.bluedynamics.eu_vinylcaches.yaml`. When the API types change, `make generate manifests` updates the latter but not the chart copy, leading to silent drift.
This bit us in PR #33: the per-backend-directors work added `spec.backends[].director`, but the chart CRD wasn't updated — CI installed the stale chart and rejected the new field with `strict decoding error: unknown field "spec.backends[0].director"`. Required commit 78a5a3a to manually sync.
Proposed fix
Add a Makefile target (or extend `manifests`) to copy the generated CRD into the chart after each regeneration:
```makefile
.PHONY: chart-crds
chart-crds: manifests
cp config/crd/bases/vinyl.bluedynamics.eu_vinylcaches.yaml charts/cloud-vinyl/crds/vinylcache.yaml
```
Or wire it into the existing `manifests` target so it always runs together. Optionally add a CI check that fails if the two files differ.
References