Unable to delete k8s resource with patchesStrategicMerge using '$patch: delete', doesn't work in the kfctl v1.1
patchesStrategicMerge with $patch: delete doesn't work in the kfctl v1.1 The overlay is simple ignored or below error is thrown:
time="2020-11-18T08:18:09Z" level=warning msg="Encountered error applying application istio: (kubeflow.error): Code 500 with message: Apply.Run : [error when creating "/tmp/kout050710452": admission webhook "pilot.validation.istio.io" denied the request: unknown field "$patch" on VirtualService resource kubeflow/google-api-vs, error when creating "/tmp/kout050710452": admission webhook "pilot.validation.istio.io" denied the request: unknown field "$patch" on VirtualService resource kubeflow/google-storage-api-vs]" filename="kustomize/kustomize.go:266"
However, I could see the patchesStrategicMerge is successful and $patch: delete is added to the resource manifest under consideration. cat kustomization.yaml
kind: Kustomization
apiversion: kustomize.config.k8s.io/v1beta1
bases:
- ../../base
patchesStrategicMerge:
- google_storage_api_vs.yaml
- google_api_vs.yaml
cat google_storage_api_vs.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: google-storage-api-vs
$patch: delete
cat google_api_vs.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: google-api-vs
$patch: delete
Please suggest if something has changed/not supported?
I think GCP now is using gcp-blueprint to deploy kubeflow, they might don't want to check backward,
@chethanmahadevaiah do you want to try gcp-blueprint instead of kfctl