Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add linux nodeselector #1050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
timmy-wright wants to merge 2 commits into stakater:master
base: master
Choose a base branch
Loading
from timmy-wright:timmy/dont-deploy-to-windows-nodes

Conversation

@timmy-wright
Copy link

@timmy-wright timmy-wright commented Nov 7, 2025

While running Reloader in my cluster, the pod was deployed to a windows node and failed as the image doesn't support windows.

This PR adds a node selector to the pod so it will only be scheduled on Linux nodes.

Related to #368

Pods

tim@wrightt-laptop:~/git/Reloader$ kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
hpc-2019-85jsr 1/1 Running 0 31m 10.224.0.5 aksws2019000000 <none> <none>
hpc-2022-vxnpt 1/1 Running 0 33m 10.224.0.10 aksws2022000003 <none> <none>
hpc-2025-2022-cbdd8 1/1 Running 0 33m 10.224.0.11 aksws2025000000 <none> <none>
hpc-2025-dtkv9 1/1 Running 0 31m 10.224.0.11 aksws2025000000 <none> <none>
hpc-23h2-ldphj 1/1 Running 0 33m 10.224.0.7 akswsannu000000 <none> <none>
reloader-reloader-5877c96d8f-wfb79 0/1 ErrImagePull 0 11m 172.16.0.181 aksws2019000000 <none> <none>
windows-updates-6g9n6 1/1 Running 0 14m 10.224.0.11 aksws2025000000 <none> <none>
windows-updates-hr9jr 1/1 Running 0 14m 10.224.0.7 akswsannu000000 <none> <none>
windows-updates-kxjsq 1/1 Running 0 14m 10.224.0.5 aksws2019000000 <none> <none>
windows-updates-lfbmv 1/1 Running 0 14m 10.224.0.10 aksws2022000003 <none> <none>

Logs

tim@wrightt-laptop:~/git/Reloader$ kubectl logs reloader-reloader-5877c96d8f-wfb79
Error from server (BadRequest): container "reloader-reloader" in pod "reloader-reloader-5877c96d8f-wfb79" is waiting to start: trying and failing to pull image

Describe Container

tim@wrightt-laptop:~/git/Reloader$ kubectl describe pod reloader-reloader-5877c96d8f-wfb79
Name: reloader-reloader-5877c96d8f-wfb79
Namespace: default
Priority: 0
Service Account: reloader-reloader
Node: aksws2019000000/10.224.0.5
Start Time: 2025年11月08日 10:10:39 +1300
Labels: app=reloader-reloader
 app.kubernetes.io/instance=reloader
 app.kubernetes.io/managed-by=Helm
 app.kubernetes.io/name=reloader
 app.kubernetes.io/version=v1.4.10
 chart=reloader-2.2.5
 group=com.stakater.platform
 helm.sh/chart=reloader-2.2.5
 heritage=Helm
 pod-template-hash=5877c96d8f
 provider=stakater
 release=reloader
 version=v1.4.10
Annotations: <none>
Status: Pending
SeccompProfile: RuntimeDefault
IP: 172.16.0.181
IPs:
 IP: 172.16.0.181
Controlled By: ReplicaSet/reloader-reloader-5877c96d8f
Containers:
 reloader-reloader:
 Container ID:
 Image: ghcr.io/stakater/reloader:v1.4.10
 Image ID:
 Port: 9090/TCP
 Host Port: 0/TCP
 Args:
 --log-level=info
 State: Waiting
 Reason: ImagePullBackOff
 Ready: False
 Restart Count: 0
 Liveness: http-get http://:http/live delay=10s timeout=5s period=10s #success=1 #failure=5
 Readiness: http-get http://:http/metrics delay=10s timeout=5s period=10s #success=1 #failure=5
 Environment:
 GOMAXPROCS: node allocatable (limits.cpu)
 GOMEMLIMIT: node allocatable (limits.memory)
 RELOADER_NAMESPACE: default (v1:metadata.namespace)
 RELOADER_DEPLOYMENT_NAME: reloader-reloader
 Mounts:
 /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-7j6kg (ro)
Conditions:
 Type Status
 PodReadyToStartContainers True
 Initialized True
 Ready False
 ContainersReady False
 PodScheduled True
Volumes:
 kube-api-access-7j6kg:
 Type: Projected (a volume that contains injected data from multiple sources)
 TokenExpirationSeconds: 3607
 ConfigMapName: kube-root-ca.crt
 ConfigMapOptional: <nil>
 DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
 Type Reason Age From Message
 ---- ------ ---- ---- -------
 Normal Scheduled 10m default-scheduler Successfully assigned default/reloader-reloader-5877c96d8f-wfb79 to aksws2019000000
 Normal Pulling 7m21s (x5 over 10m) kubelet Pulling image "ghcr.io/stakater/reloader:v1.4.10"
 Warning Failed 7m20s (x5 over 10m) kubelet Failed to pull image "ghcr.io/stakater/reloader:v1.4.10": rpc error: code = NotFound desc = failed to pull and unpack image "ghcr.io/stakater/reloader:v1.4.10": no match for platform in manifest: not found
 Warning Failed 7m20s (x5 over 10m) kubelet Error: ErrImagePull
 Normal BackOff 15s (x42 over 10m) kubelet Error: ImagePullBackOff

{{- end }}
{{- if .Values.reloader.deployment.nodeSelector }}
nodeSelector:
"kubernetes.io/os": linux
Copy link
Contributor

@msafwankarim msafwankarim Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of enforcing it in the chart, we should add this in values.yaml under reloader.deployment.nodeSelector by default. This will allow the user to override or unset it if they don't need it for any reason

Copy link
Contributor

@msafwankarim msafwankarim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently it is setting the OS nodeSelector only if the nodeSelector is already provided, that's why test cases are failing. Adding the nodeSelector in values file instead of deployment.yaml will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@msafwankarim msafwankarim msafwankarim requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /