templates/deployment.yaml 文件
...
spec:
serviceAccountName: {{ include "sparkoperator.serviceAccountName" . }}
{{- if .Values.enableWebhook }}
volumes:
- name: webhook-certs
secret:
secretName: spark-webhook-certs
{{- end }}
containers:
- name: sparkoperator
image: {{ .Values.operatorImageName }}:{{ .Values.operatorVersion }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
{{- if .Values.enableWebhook }}
volumeMounts:
- name: webhook-certs
mountPath: /etc/webhook-certs
{{- end }}
{{- if .Values.enableMetrics }}
ports:
- containerPort: {{ .Values.metricsPort }}
{{ end }}
args:
- -v={{ .Values.logLevel }}
- -namespace={{ .Values.sparkJobNamespace }}
- -ingress-url-format={{ .Values.ingressUrlFormat }}
- -install-crds={{ .Values.installCrds }}
- -controller-threads={{ .Values.controllerThreads }}
- -resync-interval={{ .Values.resyncInterval }}
- -logtostderr
- -enable-batch-scheduler={{ .Values.enableBatchScheduler }}
{{- if .Values.enableMetrics }}
- -enable-metrics=true
- -metrics-labels=app_type
- -metrics-port={{ .Values.metricsPort }}
- -metrics-endpoint={{ .Values.metricsEndpoint }}
- -metrics-prefix={{ .Values.metricsPrefix }}
{{- end }}
{{- if .Values.enableWebhook }}
- -enable-webhook=true
- -webhook-svc-namespace={{ .Release.Namespace }}
- -webhook-port={{ .Values.webhookPort }}
- -webhook-svc-name={{ .Release.Name }}-webhook
- -webhook-config-name={{ include "sparkoperator.fullname" . }}-webhook-config
{{- end }}
{{- if .Values.resources }}
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- end }}
imagePullSecrets:
- name: muduhwyunregsecret
安装后,describe deployments, 发现没有 imagePullSecrets
helm install xxx
kubectl describe deploy xxx
求 v 友指导下
1
littlespider89 2019-09-12 15:26:21 +08:00
kubctl get --all-namespaces secret muduhwyunregsecret
要 pull 的镜像是私有仓库的吗?如果是需要定义私有仓库 registry 的 docker 登录信息 大概需要这样的操作 kubectl create secret docker-registry muduhwyunregsecret --docker-server=registry.xxxxx.xx --docker-username=xxxxxxx --docker-password=xxxxxx --docker-email=xxxxx |