apiVersion: apps/v1 kind: Deployment metadata: {{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.matcher.deploymentAnnotations) }} annotations: {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} name: {{ include "kyoo.matcher.fullname" . }} labels: {{- include "kyoo.labels" (dict "context" . "component" .Values.matcher.name "name" .Values.matcher.name) | nindent 4 }} spec: replicas: {{ .Values.matcher.replicaCount }} {{- with .Values.matcher.updateStrategy }} strategy: {{- toYaml . | nindent 4 }} {{- end }} selector: matchLabels: {{- include "kyoo.selectorLabels" (dict "context" . "name" .Values.matcher.name) | nindent 6 }} template: metadata: {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.matcher.podAnnotations) }} annotations: {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} labels: {{- include "kyoo.labels" (dict "context" . "component" .Values.matcher.name "name" .Values.matcher.name) | nindent 8 }} {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.matcher.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: {{- with .Values.matcher.imagePullSecrets | default .Values.global.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.global.securityContext }} securityContext: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "kyoo.matcher.serviceAccountName" . }} containers: - name: main image: {{ .Values.matcher.kyoo_matcher.image.repository | default (printf "%s/kyoo_matcher" .Values.global.image.repositoryBase) }}:{{ default (include "kyoo.defaultTag" .) .Values.matcher.kyoo_matcher.image.tag }} imagePullPolicy: {{ default .Values.global.image.imagePullPolicy }} args: {{- with .Values.matcher.kyoo_matcher.extraArgs }} {{- toYaml . | nindent 12 }} {{- end }} env: - name: KYOO_APIKEYS valueFrom: secretKeyRef: key: {{ .Values.kyoo.apikey.apikeyKey }} name: {{ .Values.kyoo.apikey.existingSecret }} - name: KYOO_URL value: "http://{{ include "kyoo.back.fullname" . }}:5000/api" - name: LIBRARY_LANGUAGES value: {{ .Values.kyoo.languages | quote }} - name: THEMOVIEDB_APIKEY valueFrom: secretKeyRef: key: {{ .Values.contentdatabase.tmdb.apikeyKey }} name: {{ .Values.contentdatabase.tmdb.existingSecret }} optional: true - name: TVDB_APIKEY valueFrom: secretKeyRef: key: {{ .Values.contentdatabase.tvdb.apikeyKey }} name: {{ .Values.contentdatabase.tvdb.existingSecret }} optional: true - name: TVDB_PIN valueFrom: secretKeyRef: key: {{ .Values.contentdatabase.tvdb.pinKey }} name: {{ .Values.contentdatabase.tvdb.existingSecret }} optional: true - name: RABBITMQ_HOST value: {{ .Values.global.rabbitmq.host | quote }} - name: RABBITMQ_PORT value: {{ .Values.global.rabbitmq.port | quote }} - name: RABBITMQ_DEFAULT_USER valueFrom: secretKeyRef: key: {{ .Values.global.rabbitmq.kyoo_matcher.userKey }} name: {{ .Values.global.rabbitmq.kyoo_matcher.existingSecret }} - name: RABBITMQ_DEFAULT_PASS valueFrom: secretKeyRef: key: {{ .Values.global.rabbitmq.kyoo_matcher.passwordKey }} name: {{ .Values.global.rabbitmq.kyoo_matcher.existingSecret }} {{- with (concat .Values.global.extraEnv .Values.matcher.kyoo_matcher.extraEnv) }} {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.matcher.kyoo_matcher.livenessProbe }} livenessProbe: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.matcher.kyoo_matcher.readinessProbe }} readinessProbe: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.matcher.kyoo_matcher.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.matcher.kyoo_matcher.containerSecurityContext }} securityContext: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.matcher.kyoo_matcher.extraVolumeMounts }} volumeMounts: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.matcher.extraContainers }} {{- tpl (toYaml .) $ | nindent 8 }} {{- end }} {{- with .Values.matcher.extraInitContainers }} initContainers: {{- tpl (toYaml .) $ | nindent 6 }} {{- end }} {{- with .Values.matcher.extraVolumes }} volumes: {{- toYaml . | nindent 8 }} {{- end }}