openshift-telco / telco-gitops

18 stars 15 forks source link

1.21+ k8s/ocp kustomize breaks using patches #10

Closed novacain1 closed 3 years ago

novacain1 commented 3 years ago

It appears that any patch files (look under telco-gitops/base/operators/openshift-sriov-network-operator/kustomization.yaml) or (telco-gitops/blueprints/combined-ran/kustomization.yaml) break rendering under OpenShift clients based on 4.8+.

oc kustomize .

Error: accumulating resources: accumulation err='accumulating resources from 'github.com/novacain1/telco-gitops/blueprints/combined-ran?ref=main': evalsymlink failure on '/home/dcain/carslab-public/rhocp-clusters/skylark.cars.lab/github.com/novacain1/telco-gitops/blueprints/combined-ran?ref=main' : lstat /home/dcain/carslab-public/rhocp-clusters/skylark.cars.lab/github.com: no such file or directory': recursed accumulation of path '/tmp/kustomize-435906337/blueprints/combined-ran': no matches for IdId operators.coreos.com_v1alpha1_Subscription|~X|sriov-network-operator-subscription; failed to find unique target for patch operators.coreos.com_v1alpha1_Subscription|sriov-network-operator-subscription

Removing patch files from the above two sources in telco-gitops restores rendering.

Believe there was a major change in the clients from k8s 1.20 (ocp 4.7) to now: https://github.com/kubernetes-sigs/kustomize#kubectl-integration

Kubectl version Kustomize version
< v1.14 n/a
v1.14-v1.20 v2.0.3
v1.21 v4.0.5
williamcaban commented 3 years ago

This has been addressed by commit https://github.com/openshift-telco/telco-gitops/commit/7e325d3c5cc362f1e4d3b3210e5d72253b3577a1 which by error was done directly to main.