Files
charts/yacy/templates/deployment.yaml

128 lines
5.1 KiB
YAML
Raw Normal View History

2026-02-04 14:34:08 +02:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "yacy.fullname" . }}
labels:
{{- include "yacy.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "yacy.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "yacy.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "yacy.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- if .Values.image.useLocal }}
image: "{{ .Values.image.localRepository }}:{{ .Values.image.localTag }}"
imagePullPolicy: Never
{{- else }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- end }}
env:
- name: YACY_ADMINACCOUNT_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "yacy.fullname" . }}
key: admin-password
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- if .Values.yacy.settings.maxMemory }}
- name: YACY_JAVASTART_XMXMINIT
value: {{ .Values.yacy.settings.maxMemory | quote }}
{{- end }}
{{- if (not .Values.yacy.settings.joinP2PNetwork) }}
- name: YACY_NETWORK_UNIT_INTRANET
value: "true"
{{- end }}
ports:
- name: http
containerPort: 8090
protocol: TCP
- name: https
containerPort: 8443
protocol: TCP
2026-02-04 16:36:57 +02:00
{{- if .Values.healthchecks.startupProbe.enabled }}
2026-02-04 14:34:08 +02:00
startupProbe:
httpGet:
2026-02-04 16:36:57 +02:00
path: {{ .Values.healthchecks.startupProbe.httpGet.path }}
port: {{ .Values.healthchecks.startupProbe.httpGet.port }}
initialDelaySeconds: {{ .Values.healthchecks.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.healthchecks.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.healthchecks.startupProbe.timeoutSeconds }}
failureThreshold: {{ .Values.healthchecks.startupProbe.failureThreshold }}
{{- end }}
{{- if .Values.healthchecks.livenessProbe.enabled }}
2026-02-04 14:34:08 +02:00
livenessProbe:
httpGet:
2026-02-04 16:36:57 +02:00
path: {{ .Values.healthchecks.livenessProbe.httpGet.path }}
port: {{ .Values.healthchecks.livenessProbe.httpGet.port }}
initialDelaySeconds: {{ .Values.healthchecks.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.healthchecks.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.healthchecks.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.healthchecks.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.healthchecks.readinessProbe.enabled }}
2026-02-04 14:34:08 +02:00
readinessProbe:
httpGet:
2026-02-04 16:36:57 +02:00
path: {{ .Values.healthchecks.readinessProbe.httpGet.path }}
port: {{ .Values.healthchecks.readinessProbe.httpGet.port }}
initialDelaySeconds: {{ .Values.healthchecks.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.healthchecks.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.healthchecks.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.healthchecks.readinessProbe.failureThreshold }}
{{- end }}
2026-02-04 14:34:08 +02:00
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: /opt/yacy_search_server/DATA
{{- if .Values.yacy.configFile }}
- name: config
mountPath: /opt/yacy_search_server/defaults/yacy.conf
subPath: yacy.conf
{{- end }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ include "yacy.fullname" . }}-data{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
{{- if .Values.yacy.configFile }}
- name: config
configMap:
name: {{ include "yacy.fullname" . }}-config
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}