Skip to content

Commit

Permalink
Fix NODENAME env var in calico kube-proxy.yml (#338)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
coutinhop authored Aug 8, 2023
1 parent 30b5f0d commit 47ab892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hostprocess/calico/kube-proxy/kube-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
name: kube-proxy
imagePullPolicy: Always
env:
- name: NODE_NAME
- name: NODENAME
valueFrom:
fieldRef:
apiVersion: v1
Expand Down

0 comments on commit 47ab892

Please sign in to comment.