Azure / azure-capi-cli-extension

Kubernetes Cluster API support in the Azure CLI
MIT License
20 stars 17 forks source link

Enable passing custom calico version #196

Closed jsturtevant closed 1 year ago

jsturtevant commented 1 year ago

Description Use the calico environment variable to install custom helm version. This helps prevents against calico from auto upgrading.

History Notes


This checklist is used to make sure that common guidelines for an Azure CLI pull request are followed.

jsturtevant commented 1 year ago

validating with https://github.com/kubernetes-sigs/windows-testing/pull/380

jsturtevant commented 1 year ago

hmmm, my test locally is failing with

error: there is no need to specify a resource type as a separate argument when passing arguments in resource/name form (e.g. 'kubectl get resource/<resource_name>' instead of 'kubectl get resource resource/<resource_name>'

cli: Command '['kubectl', 'set', 'image', '-n ', 'calico-system', 'daemonSet/calico-node-windows', 
'install-cni=sigwindowstools/calico-install:v3.25.1-hostprocess', 
'--kubeconfig', 'test-win1.kubeconfig']' returned non-zero exit status 1.

but when I run that command manually it works:

 kubectl set image -n calico-system daemonSet/calico-node-windows install-cni=sigwindowstools/calico-install:v3.25.1-hostprocess --kubeconfig test-win1.kubeconfig
daemonset.apps/calico-node-windows image updated

What am I missing?

mboersma commented 1 year ago

That's weird, because you're not passing resource type as a separate argument AFAICT. Hmm...

jsturtevant commented 1 year ago

It appears to be the extra space in '-n ', 🤷. Running a test now.

mboersma commented 1 year ago

That's weird that whitespace would be interpreted there as an extra argument, but I bet you're right. I tried az capi create -l westus3 --debug locally with this branch and didn't see any errors: workload cluster came up fine.

jsturtevant commented 1 year ago

It was indeed the extra space, I also had to get the container name and images correct but we have a passing job: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_windows-testing/380/pull-e2e-capz-windows-2022-extension/1664370802792861696