{{- if .Values.chartmuseum.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: "{{ template "harbor.chartmuseum" . }}" labels: {{ include "harbor.labels" . | indent 4 }} app: chartmuseum spec: replicas: {{ .Values.chartmuseum.replicas }} selector: matchLabels: {{ include "harbor.matchLabels" . | indent 6 }} app: chartmuseum template: metadata: labels: {{ include "harbor.labels" . | indent 8 }} app: chartmuseum annotations: checksum/configmap: {{ include (print $.Template.BasePath "/chartmuseum/chartmuseum-cm.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/chartmuseum/chartmuseum-secret.yaml") . | sha256sum }} checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} {{- if .Values.chartmuseum.podAnnotations }} {{ toYaml .Values.chartmuseum.podAnnotations | indent 8 }} {{- end }} spec: containers: - name: chartmuseum image: {{ .Values.chartmuseum.image.repository }}:{{ .Values.chartmuseum.image.tag }} imagePullPolicy: {{ .Values.imagePullPolicy }} livenessProbe: httpGet: path: /health port: 9999 initialDelaySeconds: 1 periodSeconds: 10 readinessProbe: httpGet: path: /health port: 9999 initialDelaySeconds: 1 periodSeconds: 10 {{- if .Values.chartmuseum.resources }} resources: {{ toYaml .Values.chartmuseum.resources | indent 10 }} {{- end }} envFrom: - configMapRef: name: "{{ template "harbor.chartmuseum" . }}" - secretRef: name: "{{ template "harbor.chartmuseum" . }}" env: - name: BASIC_AUTH_PASS valueFrom: secretKeyRef: name: {{ template "harbor.core" . }} key: secret ports: - containerPort: 9999 volumeMounts: - name: data mountPath: /chart_storage - name: etc-localtime mountPath: /etc/localtime volumes: - name: etc-localtime hostPath: path: /etc/localtime {{- if eq .Values.chartmuseum.storageSpec.type "hostPath" }} - name: data hostPath: path: {{.Values.chartmuseum.storageSpec.hostPath.root | default "/data" }}/{{ .Release.Namespace }}/{{ .Release.Name }}/chartmuseum {{- else if eq .Values.chartmuseum.storageSpec.type "emptyDir" }} - name: data emptyDir: {} {{- end }} {{- with .Values.chartmuseum.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.chartmuseum.affinity }} affinity: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.chartmuseum.tolerations }} tolerations: {{ toYaml . | indent 8 }} {{- end }} {{- end }}