112 lines
3.6 KiB
YAML
112 lines
3.6 KiB
YAML
{{- $root := . }}
|
|
{{- if .Values.features.ldapWorker }}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ldap-worker
|
|
labels:
|
|
app.kubernetes.io/component: ldap-worker
|
|
{{- include "onelab.labels" $root | nindent 4 }}
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: {{ $root.Values.syncWaves.apps | quote }}
|
|
spec:
|
|
replicas: {{ $root.Values.replicas.ldap | default 1 }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: ldap-worker
|
|
app.kubernetes.io/name: {{ include "onelab.name" $root }}
|
|
app.kubernetes.io/instance: {{ $root.Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: ldap-worker
|
|
app.kubernetes.io/name: {{ include "onelab.name" $root }}
|
|
app.kubernetes.io/instance: {{ $root.Release.Name }}
|
|
spec:
|
|
{{- with $root.Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: ldap-worker
|
|
image: {{ printf "%s/%s:%s" $root.Values.images.registry "onelab-ldap-worker" $root.Values.images.tag | quote }}
|
|
volumeMounts:
|
|
- name: configurations
|
|
mountPath: /conf/configurations.yml
|
|
subPath: configurations.yml
|
|
readOnly: true
|
|
{{- if eq $root.Values.persistence.mode "hostPath" }}
|
|
- name: logs
|
|
mountPath: /logs
|
|
{{- end }}
|
|
volumes:
|
|
- name: configurations
|
|
secret:
|
|
secretName: onelab-configurations
|
|
{{- if eq $root.Values.persistence.mode "hostPath" }}
|
|
- name: logs
|
|
hostPath:
|
|
path: {{ $root.Values.persistence.hostPath.logs }}
|
|
type: DirectoryOrCreate
|
|
{{- else }}
|
|
- name: logs
|
|
emptyDir: {}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.features.mailerWorker }}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mailer-worker
|
|
labels:
|
|
app.kubernetes.io/component: mailer-worker
|
|
{{- include "onelab.labels" $root | nindent 4 }}
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: {{ $root.Values.syncWaves.apps | quote }}
|
|
spec:
|
|
replicas: {{ $root.Values.replicas.mailer | default 1 }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: mailer-worker
|
|
app.kubernetes.io/name: {{ include "onelab.name" $root }}
|
|
app.kubernetes.io/instance: {{ $root.Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: mailer-worker
|
|
app.kubernetes.io/name: {{ include "onelab.name" $root }}
|
|
app.kubernetes.io/instance: {{ $root.Release.Name }}
|
|
spec:
|
|
{{- with $root.Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: mailer-worker
|
|
image: {{ printf "%s/%s:%s" $root.Values.images.registry "onelab-mailer-worker" $root.Values.images.tag | quote }}
|
|
volumeMounts:
|
|
- name: configurations
|
|
mountPath: /conf/configurations.yml
|
|
subPath: configurations.yml
|
|
readOnly: true
|
|
{{- if eq $root.Values.persistence.mode "hostPath" }}
|
|
- name: logs
|
|
mountPath: /logs
|
|
{{- end }}
|
|
volumes:
|
|
- name: configurations
|
|
secret:
|
|
secretName: onelab-configurations
|
|
{{- if eq $root.Values.persistence.mode "hostPath" }}
|
|
- name: logs
|
|
hostPath:
|
|
path: {{ $root.Values.persistence.hostPath.logs }}
|
|
type: DirectoryOrCreate
|
|
{{- else }}
|
|
- name: logs
|
|
emptyDir: {}
|
|
{{- end }}
|
|
{{- end }}
|