apiVersion: apps/v1 kind: Deployment metadata: name: "{{ template "harbor.portal" . }}" labels: {{ include "harbor.labels" . | indent 4 }} component: portal spec: replicas: {{ .Values.portal.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} component: portal template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} component: portal annotations: {{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} {{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} {{- end }} {{- if .Values.portal.podAnnotations }} {{ toYaml .Values.portal.podAnnotations | indent 8 }} {{- end }} spec: {{- with .Values.global.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} {{- if .Values.portal.serviceAccountName }} serviceAccountName: {{ .Values.portal.serviceAccountName }} {{- end }} containers: - name: portal {{- if contains "/" .Values.portal.image.repository }} image: "{{ .Values.portal.image.repository }}" {{- else }} image: "{{ .Values.portal.image.hub | default .Values.global.hub }}/{{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag | default .Values.global.tag }}{{ template ".beagle.imageArch" . }}" {{- end }} imagePullPolicy: "{{ .Values.imagePullPolicy | default .Values.global.imagePullPolicy }}" {{- if .Values.portal.resources }} resources: {{ toYaml .Values.portal.resources | indent 10 }} {{- end }} livenessProbe: httpGet: path: / scheme: {{ include "harbor.component.scheme" . | upper }} port: {{ template "harbor.portal.containerPort" . }} initialDelaySeconds: 300 periodSeconds: 10 readinessProbe: httpGet: path: / scheme: {{ include "harbor.component.scheme" . | upper }} port: {{ template "harbor.portal.containerPort" . }} initialDelaySeconds: 1 periodSeconds: 10 ports: - containerPort: {{ template "harbor.portal.containerPort" . }} volumeMounts: - name: portal-config mountPath: /etc/nginx/nginx.conf subPath: nginx.conf {{- if .Values.internalTLS.enabled }} - name: portal-internal-certs mountPath: /etc/harbor/ssl/portal {{- end }} volumes: - name: portal-config configMap: name: "{{ template "harbor.portal" . }}" {{- if .Values.internalTLS.enabled }} - name: portal-internal-certs secret: secretName: {{ template "harbor.internalTLS.portal.secretName" . }} {{- end }} {{- with .Values.portal.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.portal.affinity }} affinity: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.portal.tolerations }} tolerations: {{ toYaml . | indent 8 }} {{- end }}