{{ if .Values.notary.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "harbor.notary-server" . }} labels: {{ include "harbor.labels" . | indent 4 }} app: notary-server spec: replicas: {{ .Values.notary.server.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} app: notary-server template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} app: notary-server annotations: checksum/configmap: {{ include (print $.Template.BasePath "/notary/notary-cm.yaml") . | sha256sum }} checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} {{- if .Values.notary.podAnnotations }} {{ toYaml .Values.notary.podAnnotations | indent 8 }} {{- end }} spec: containers: - name: notary-server image: {{ .Values.notary.server.image.repository }}:{{ .Values.notary.server.image.tag }} imagePullPolicy: {{ .Values.imagePullPolicy }} {{- if .Values.notary.server.resources }} resources: {{ toYaml .Values.notary.server.resources | indent 10 }} {{- end }} env: - name: MIGRATIONS_PATH value: migrations/server/postgresql - name: DB_URL value: {{ template "harbor.database.notaryServer" . }} volumeMounts: - name: notary-config mountPath: /etc/notary - name: etc-localtime mountPath: /etc/localtime - name: root-certificate mountPath: /root.crt subPath: tokenServiceRootCertBundle {{- if .Values.notary.secretName }} - name: notary-ca mountPath: /etc/ssl/notary/cert/notary-signer-ca.crt subPath: ca {{- end }} volumes: - name: etc-localtime hostPath: path: /etc/localtime - name: notary-config configMap: name: "{{ template "harbor.notary-server" . }}" - name: root-certificate secret: {{- if .Values.core.secretName }} secretName: {{ .Values.core.secretName }} {{- else }} secretName: {{ template "harbor.core" . }} {{- end }} {{- if .Values.notary.secretName }} - name: notary-ca secret: secretName: {{ .Values.notary.secretName }} {{- end }} {{- with .Values.notary.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.notary.affinity }} affinity: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.notary.tolerations }} tolerations: {{ toYaml . | indent 8 }} {{- end }} {{ end }}