129 lines
6.3 KiB
YAML
129 lines
6.3 KiB
YAML
---
|
|
{{- if .Values.tika.enabled }}
|
|
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ printf "%s-tika" (include "mailu.fullname" .) }}
|
|
namespace: {{ include "common.names.namespace" . | quote }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: tika
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
replicas: 1
|
|
{{- if .Values.tika.updateStrategy }}
|
|
strategy: {{- toYaml .Values.tika.updateStrategy | nindent 4 }}
|
|
{{- end }}
|
|
revisionHistoryLimit: {{ .Values.tika.revisionHistoryLimit }}
|
|
selector:
|
|
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: tika
|
|
template:
|
|
metadata:
|
|
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
|
app.kubernetes.io/component: tika
|
|
{{- if .Values.tika.podLabels }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.tika.podLabels "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.podAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.tika.podAnnotations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- include "common.images.pullSecrets" (dict "images" (list .Values.tika.image) "global" .Values.global) | nindent 6 }}
|
|
{{- if .Values.tika.hostAliases }}
|
|
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.tika.hostAliases "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.nodeSelector }}
|
|
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.tika.nodeSelector "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.affinity }}
|
|
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.tika.affinity "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.tolerations }}
|
|
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tika.tolerations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.priorityClassName }}
|
|
priorityClassName: {{ .Values.tika.priorityClassName | quote }}
|
|
{{- end }}
|
|
{{- if .Values.tika.schedulerName }}
|
|
schedulerName: {{ .Values.tika.schedulerName | quote }}
|
|
{{- end }}
|
|
{{- if .Values.tika.topologySpreadConstraints }}
|
|
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.tika.topologySpreadConstraints "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.terminationGracePeriodSeconds }}
|
|
terminationGracePeriodSeconds: {{ .Values.tika.terminationGracePeriodSeconds }}
|
|
{{- end }}
|
|
{{- if .Values.tika.initContainers }}
|
|
initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.tika.initContainers "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.podSecurityContext.enabled }}
|
|
securityContext: {{- omit .Values.tika.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: tika
|
|
image: {{ .Values.tika.image.registry }}/{{ .Values.tika.image.repository }}:{{ .Values.tika.image.tag }}
|
|
imagePullPolicy: {{ .Values.tika.image.pullPolicy }}
|
|
{{- if .Values.tika.containerSecurityContext.enabled }}
|
|
securityContext: {{- omit .Values.tika.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.extraVolumeMounts }}
|
|
volumeMounts:
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.tika.extraVolumeMounts "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
env:
|
|
- name: LOG_LEVEL
|
|
value: {{ default .Values.logLevel .Values.tika.logLevel }}
|
|
{{- tpl (include "mailu.envvars.secrets" .) $ | nindent 12 }}
|
|
{{- if .Values.tika.extraEnvVars }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.tika.extraEnvVars "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
envFrom:
|
|
- configMapRef:
|
|
name: {{ printf "%s-envvars" (include "mailu.fullname" .) }}
|
|
{{- if .Values.tika.extraEnvVarsCM }}
|
|
- configMapRef:
|
|
name: {{ include "common.tplvalues.render" (dict "value" .Values.tika.extraEnvVarsCM "context" $) }}
|
|
{{- end }}
|
|
{{- if .Values.tika.extraEnvVarsSecret }}
|
|
- secretRef:
|
|
name: {{ include "common.tplvalues.render" (dict "value" .Values.tika.extraEnvVarsSecret "context" $) }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 9998
|
|
protocol: TCP
|
|
{{- if .Values.tika.resources }}
|
|
resources: {{- toYaml .Values.tika.resources | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.startupProbe.enabled }}
|
|
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.tika.startupProbe "enabled") "context" $) | nindent 12 }}
|
|
httpGet:
|
|
path: /tika
|
|
port: http
|
|
{{- end }}
|
|
{{- if .Values.tika.livenessProbe.enabled }}
|
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.tika.livenessProbe "enabled") "context" $) | nindent 12 }}
|
|
httpGet:
|
|
path: /tika
|
|
port: http
|
|
{{- end }}
|
|
{{- if .Values.tika.readinessProbe.enabled }}
|
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.tika.readinessProbe "enabled") "context" $) | nindent 12 }}
|
|
httpGet:
|
|
path: /tika
|
|
port: http
|
|
{{- end }}
|
|
{{- if .Values.tika.extraContainers }}
|
|
{{- toYaml .Values.tika.extraContainers | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.tika.extraVolumes }}
|
|
volumes:
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.tika.extraVolumes "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|