Closed wlan0 closed 3 years ago
/assign
Issue at hand:
kubectl kustomize deploy/base
does not work (using kubectl
1.20.1): Error: couldn't make target for github.com/kubernetes-sigs/container-object-storage-interface-api/crds: json: cannot unmarshal object into Go struct field Kustomization.patchesStrategicMerge of type patch.StrategicMerge
kustomize build deploy/base
works (using kustomize
3.8.5)Turns out the version of kustomize
embedded in kubectl
is rather old and doesn't get updated for now (https://github.com/kubernetes/kubectl/issues/818), and the changes introduced in 7c519fe167fc38a6750298a25602a955d9235b70 rely on a kustomize
feature that's not available in said version.
Current work-around:
kustomize
binary (e.g., from https://github.com/kubernetes-sigs/kustomize/releases)kustomize build deploy/base | kubectl apply -f -
to render and apply the manifestsFix: likely reverting 7c519fe167fc38a6750298a25602a955d9235b70 for now, if we want to be compatible with kubectl apply -k
. Also, this should be validated by CI.
Looks like reverting 7c519fe is not sufficient: the original manifests (from 2a29305571b) don't work with kubectl kustomize
either, since they use inline patches (unsupported), and after turning the inline patch into a patch file, things don't work either, because remote (HTTP) resources are not supported.
Which would imply we'd need to somehow embed the CRD manifests in this repository, or require those to be deployed using different means.
Honestly I'm starting to think we should require kustomize build ... | kubectl apply -f -
to be used. Otherwise, we may drop the use of kustomize
altogether, but then we won't have a 'single-command install' either.
Bug Report
As described in title.
Environment:
kubectl version
), please list client and server:cat /etc/os-release
):uname -a
):