fix: runOnControlPlane chart config
This commit is contained in:
parent
49ec91fc69
commit
51786a529e
2
Makefile
2
Makefile
@ -42,7 +42,7 @@ REGISTRY_NAME ?= $(shell echo $(REGISTRY) | sed "s/.azurecr.io//g")
|
||||
IMAGE_TAG = $(REGISTRY)/$(IMAGENAME):$(IMAGE_VERSION)
|
||||
IMAGE_TAG_LATEST = $(REGISTRY)/$(IMAGENAME):latest
|
||||
|
||||
E2E_HELM_OPTIONS ?= --set image.nfs.repository=$(REGISTRY)/$(IMAGENAME) --set image.nfs.tag=$(IMAGE_VERSION) --set image.nfs.pullPolicy=Always --set feature.enableInlineVolume=true --set externalSnapshotter.enabled=true
|
||||
E2E_HELM_OPTIONS ?= --set image.nfs.repository=$(REGISTRY)/$(IMAGENAME) --set image.nfs.tag=$(IMAGE_VERSION) --set image.nfs.pullPolicy=Always --set feature.enableInlineVolume=true --set externalSnapshotter.enabled=true --set controller.runOnControlPlane=true
|
||||
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
|
||||
|
||||
# Output type of docker buildx build
|
||||
|
||||
Binary file not shown.
@ -24,18 +24,29 @@ spec:
|
||||
hostNetwork: true # controller also needs to mount nfs to create dir
|
||||
dnsPolicy: {{ .Values.controller.dnsPolicy }}
|
||||
serviceAccountName: {{ .Values.serviceAccount.controller }}
|
||||
{{- with .Values.controller.affinity }}
|
||||
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
|
||||
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
|
||||
{{- with .Values.controller.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
{{- if .Values.controller.runOnControlPlane}}
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
{{- end}}
|
||||
{{- if .Values.controller.runOnMaster}}
|
||||
- key: node-role.kubernetes.io/master
|
||||
operator: Exists
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
{{- if .Values.controller.runOnMaster}}
|
||||
node-role.kubernetes.io/master: ""
|
||||
{{- end}}
|
||||
{{- if .Values.controller.runOnControlPlane}}
|
||||
node-role.kubernetes.io/control-plane: ""
|
||||
{{- end}}
|
||||
{{- with .Values.controller.nodeSelector }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
|
||||
Binary file not shown.
@ -24,18 +24,29 @@ spec:
|
||||
hostNetwork: true # controller also needs to mount nfs to create dir
|
||||
dnsPolicy: {{ .Values.controller.dnsPolicy }}
|
||||
serviceAccountName: {{ .Values.serviceAccount.controller }}
|
||||
{{- with .Values.controller.affinity }}
|
||||
# runOnControlPlane=true or runOnMaster=true only takes effect if affinity is not set
|
||||
{{- if contains (tpl "{{ .Values.controller.affinity }}" .) "nodeSelectorTerms" }}
|
||||
{{- with .Values.controller.affinity }}
|
||||
affinity:
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.controller.runOnControlPlane .Values.controller.runOnMaster}}
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
{{- if .Values.controller.runOnControlPlane}}
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
{{- end}}
|
||||
{{- if .Values.controller.runOnMaster}}
|
||||
- key: node-role.kubernetes.io/master
|
||||
operator: Exists
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
{{- if .Values.controller.runOnMaster}}
|
||||
node-role.kubernetes.io/master: ""
|
||||
{{- end}}
|
||||
{{- if .Values.controller.runOnControlPlane}}
|
||||
node-role.kubernetes.io/control-plane: ""
|
||||
{{- end}}
|
||||
{{- with .Values.controller.nodeSelector }}
|
||||
{{ toYaml . | indent 8 }}
|
||||
{{- end }}
|
||||
@ -171,4 +182,4 @@ spec:
|
||||
path: {{ .Values.kubeletDir }}/pods
|
||||
type: Directory
|
||||
- name: socket-dir
|
||||
emptyDir: {}
|
||||
emptyDir: {}
|
||||
Loading…
x
Reference in New Issue
Block a user