mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-18 06:23:21 +00:00
081c860e04
Add required whitespace between braces in template directives to comply with Kubernetes rule S6893. Improves template readability and follows Kubernetes best practices for template formatting and maintainability.
138 lines
4.7 KiB
YAML
138 lines
4.7 KiB
YAML
{{- $envVars := include "meet.common.env" (list . .Values.agents) -}}
|
|
{{- $fullName := include "meet.agents.fullname" . -}}
|
|
{{- $component := "agents" -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ $fullName }}
|
|
annotations:
|
|
{{- with .Values.agents.dpAnnotations }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels:
|
|
{{- include "meet.common.labels" (list . $component) | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.agents.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "meet.common.selectorLabels" (list . $component) | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
{{- with .Values.agents.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "meet.common.selectorLabels" (list . $component) | nindent 8 }}
|
|
spec:
|
|
{{- if $.Values.image.credentials }}
|
|
imagePullSecrets:
|
|
- name: {{ include "meet.secret.dockerconfigjson.name" (dict "fullname" (include "meet.fullname" .) "imageCredentials" $.Values.image.credentials) }}
|
|
{{- end }}
|
|
shareProcessNamespace: {{ .Values.agents.shareProcessNamespace }}
|
|
containers:
|
|
{{- with .Values.agents.sidecars }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ (.Values.agents.image | default dict).repository | default .Values.agents.image.repository }}:{{ (.Values.agents.image | default dict).tag | default .Values.agents.image.tag }}"
|
|
imagePullPolicy: {{ (.Values.agents.image | default dict).pullPolicy | default .Values.agents.image.pullPolicy }}
|
|
{{- with .Values.agents.command }}
|
|
command:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.agents.args }}
|
|
args:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
env:
|
|
{{- if $envVars }}
|
|
{{- $envVars | indent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.agents.securityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.agents.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
{{- range $index, $value := .Values.mountFiles }}
|
|
- name: "files-{{ $index }}"
|
|
mountPath: {{ $value.path }}
|
|
subPath: content
|
|
{{- end }}
|
|
{{- range $name, $volume := .Values.agents.persistence }}
|
|
- name: "{{ $name }}"
|
|
mountPath: "{{ $volume.mountPath }}"
|
|
{{- end }}
|
|
{{- range .Values.agents.extraVolumeMounts }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
subPath: {{ .subPath | default "" }}
|
|
readOnly: {{ .readOnly }}
|
|
{{- end }}
|
|
{{- with .Values.agents.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.agents.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.agents.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- range $index, $value := .Values.agents.mountFiles }}
|
|
- name: "files-{{ $index }}"
|
|
configMap:
|
|
name: "{{ include "meet.fullname" $ }}-files-{{ $index }}"
|
|
{{- end }}
|
|
{{- range $name, $volume := .Values.agents.persistence }}
|
|
- name: "{{ $name }}"
|
|
{{- if eq $volume.type "emptyDir" }}
|
|
emptyDir: {}
|
|
{{- else }}
|
|
persistentVolumeClaim:
|
|
claimName: "{{ $fullName }}-{{ $name }}"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- range .Values.agents.extraVolumes }}
|
|
- name: {{ .name }}
|
|
{{- if .existingClaim }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ .existingClaim }}
|
|
{{- else if .hostPath }}
|
|
hostPath:
|
|
{{ toYaml .hostPath | nindent 12 }}
|
|
{{- else if .csi }}
|
|
csi:
|
|
{{- toYaml .csi | nindent 12 }}
|
|
{{- else if .configMap }}
|
|
configMap:
|
|
{{- toYaml .configMap | nindent 12 }}
|
|
{{- else if .emptyDir }}
|
|
emptyDir:
|
|
{{- toYaml .emptyDir | nindent 12 }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end }}
|
|
{{- end }}
|
|
---
|
|
{{ if .Values.agents.pdb.enabled }}
|
|
apiVersion: policy/v1
|
|
kind: PodDisruptionBudget
|
|
metadata:
|
|
name: {{ $fullName }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
spec:
|
|
maxUnavailable: 1
|
|
selector:
|
|
matchLabels:
|
|
{{- include "meet.common.selectorLabels" (list . $component) | nindent 6 }}
|
|
{{ end }}
|