apiVersion: apps/v1 kind: Deployment metadata: name: "{{ template "harbor.portal" . }}" labels: {{ include "harbor.labels" . | indent 4 }} app: portal spec: replicas: {{ .Values.portal.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} app: portal template: metadata: labels: {{ include "harbor.matchLabels" . | indent 8 }} app: portal annotations: {{- if .Values.portal.podAnnotations }} {{ toYaml .Values.portal.podAnnotations | indent 8 }} {{- end }} spec: containers: - name: portal image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} imagePullPolicy: {{ .Values.imagePullPolicy }} {{- if .Values.portal.resources }} resources: {{ toYaml .Values.portal.resources | indent 10 }} {{- end }} livenessProbe: httpGet: path: / port: 80 initialDelaySeconds: 1 periodSeconds: 10 readinessProbe: httpGet: path: / port: 80 initialDelaySeconds: 1 periodSeconds: 10 ports: - containerPort: 80 volumeMounts: - name: etc-localtime mountPath: /etc/localtime volumes: - name: etc-localtime hostPath: path: /etc/localtime {{- 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 }}