kubernetes-sigs / sig-windows-tools

Repository for tools and artifacts related to the sig-windows charter in Kubernetes. Scripts to assist kubeadm and wincat and flannel will be hosted here.
Apache License 2.0
123 stars 123 forks source link

Fix NODENAME env var in calico kube-proxy.yml #338

Closed coutinhop closed 1 year ago

coutinhop commented 1 year ago

Reason for PR:

In the calico kube-proxy.yml file, the daemonset was setting the NODE_NAME env var to spec.nodeName, but in the kube-proxy start.ps1 script, it was looking for a var called NODENAME: https://github.com/kubernetes-sigs/sig-windows-tools/blob/3ed28295f8694dffd03e144af4423137b2b8c30b/hostprocess/calico/kube-proxy/start.ps1#L61

If the env var is empty (as was always the case with this difference), it defaults to the hostname, which might work in a great ammount of cases, or thus is my suspicion for it going undetected.

Using the same env var name in both setting it in the yaml and reading it in the ps1 script fixes it.

Issue Fixed:

Issue # (this felt so small that I didn't file an issue, please advise if I must)

Requirements

Notes:

k8s-ci-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: coutinhop, marosset

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/OWNERS)~~ [marosset] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment