1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-30 21:50:21 +00:00

NodeSelector should specify string explicitly

Kubernetes doesn't accept any other value but string in nodeSelector,
but if we specified ambiguous value like true, it's treated as a
non-string like bool and then failed to create resource because of type
mis-match, that's why we should make value of nodeSelector enclosed by
double quotations to ensure value is always string
This commit is contained in:
Yuki Nishiwaki 2019-06-30 23:56:33 +09:00 committed by Alena Prokharchyk
parent 5ff184ba1d
commit d41abc7de4
3 changed files with 3 additions and 3 deletions

View File

@ -122,7 +122,7 @@ spec:
nodeSelector:
beta.kubernetes.io/os: linux
{{ range $k, $v := .NodeSelector }}
{{ $k }}: {{ $v }}
{{ $k }}: "{{ $v }}"
{{ end }}
containers:
- name: coredns

View File

@ -124,7 +124,7 @@ spec:
spec:
nodeSelector:
{{ range $k, $v := .NodeSelector }}
{{ $k }}: {{ $v }}
{{ $k }}: "{{ $v }}"
{{ end }}
affinity:
podAntiAffinity:

View File

@ -188,7 +188,7 @@ spec:
hostNetwork: true
nodeSelector:
{{ range $k, $v := .NodeSelector }}
{{ $k }}: {{ $v }}
{{ $k }}: "{{ $v }}"
{{ end }}
{{if eq .RBACConfig "rbac"}}
serviceAccountName: nginx-ingress-serviceaccount