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 = $(REGISTRY)/$(IMAGENAME):$(IMAGE_VERSION)
|
||||||
IMAGE_TAG_LATEST = $(REGISTRY)/$(IMAGENAME):latest
|
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}
|
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
|
||||||
|
|
||||||
# Output type of docker buildx build
|
# 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
|
hostNetwork: true # controller also needs to mount nfs to create dir
|
||||||
dnsPolicy: {{ .Values.controller.dnsPolicy }}
|
dnsPolicy: {{ .Values.controller.dnsPolicy }}
|
||||||
serviceAccountName: {{ .Values.serviceAccount.controller }}
|
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:
|
affinity:
|
||||||
{{ toYaml . | indent 8 }}
|
{{ toYaml . | indent 8 }}
|
||||||
{{- end }}
|
{{- 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:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
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 }}
|
{{- with .Values.controller.nodeSelector }}
|
||||||
{{ toYaml . | indent 8 }}
|
{{ toYaml . | indent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
Binary file not shown.
@ -24,18 +24,29 @@ spec:
|
|||||||
hostNetwork: true # controller also needs to mount nfs to create dir
|
hostNetwork: true # controller also needs to mount nfs to create dir
|
||||||
dnsPolicy: {{ .Values.controller.dnsPolicy }}
|
dnsPolicy: {{ .Values.controller.dnsPolicy }}
|
||||||
serviceAccountName: {{ .Values.serviceAccount.controller }}
|
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:
|
affinity:
|
||||||
{{ toYaml . | indent 8 }}
|
{{ toYaml . | indent 8 }}
|
||||||
{{- end }}
|
{{- 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:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
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 }}
|
{{- with .Values.controller.nodeSelector }}
|
||||||
{{ toYaml . | indent 8 }}
|
{{ toYaml . | indent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user