2023-05-03 09:19:45 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ include "layer0_web.fullname" . }}
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
labels:
|
|
|
|
{{ include "layer0_web.labels" . | indent 4 }}
|
|
|
|
spec:
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{ include "layer0_web.labels" . | indent 6 }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
{{ include "layer0_web.labels" . | indent 8 }}
|
|
|
|
spec:
|
|
|
|
volumes:
|
|
|
|
- name: domainsconfig
|
|
|
|
configMap:
|
|
|
|
name: domainsconfig
|
|
|
|
items:
|
|
|
|
- key: domains.json
|
|
|
|
path: domains.json
|
|
|
|
{{- with .Values.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
containers:
|
|
|
|
- name: {{ .Chart.Name }}
|
|
|
|
image: {{ template "layer0_web.image" . }}
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
volumeMounts:
|
|
|
|
- name: domainsconfig
|
|
|
|
mountPath: /srv/domains.json
|
|
|
|
subPath: domains.json
|
|
|
|
readOnly: true
|
2023-06-22 07:45:15 +00:00
|
|
|
{{- if.Values.global.domains }}
|
|
|
|
env:
|
|
|
|
{{- range $domain := .Values.global.domains }}
|
|
|
|
{{- $name := $domain.name -}}
|
2024-01-26 11:30:35 +00:00
|
|
|
{{- $upper_name := regexReplaceAll "\\W+" $name "_" | upper -}}
|
|
|
|
{{- $lower_name := regexReplaceAll "\\W+" $name "-" | lower -}}
|
2023-06-22 07:45:15 +00:00
|
|
|
{{- $client_id := printf "%s_%s" $upper_name "OAUTH_CLIENT_ID" }}
|
|
|
|
{{- $client_secret := printf "%s_%s" $upper_name "OAUTH_CLIENT_SECRET" }}
|
|
|
|
- name: {{ $client_id }}
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: layer1-port-owncloud-{{ $lower_name }}
|
|
|
|
key: oauth-client-id
|
|
|
|
- name: {{ $client_secret }}
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: layer1-port-owncloud-{{ $lower_name }}
|
|
|
|
key: oauth-client-secret
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2023-05-03 09:19:45 +00:00
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
|
|
|
name: mservice
|
|
|
|
- configMapRef:
|
|
|
|
name: proxy
|
|
|
|
- configMapRef:
|
|
|
|
name: globalenvvar
|
|
|
|
- configMapRef:
|
|
|
|
name: webconfig
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
containerPort: {{ .Values.service.targetPort }}
|
|
|
|
protocol: TCP
|
|
|
|
- name: metrics
|
|
|
|
containerPort: 9999
|
|
|
|
protocol: TCP
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /metrics
|
|
|
|
port: metrics
|
|
|
|
periodSeconds: 10
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /metrics
|
|
|
|
port: metrics
|
|
|
|
periodSeconds: 10
|
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.affinity }}
|
|
|
|
affinity:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|