-
Notifications
You must be signed in to change notification settings - Fork 214
/
dittoui-deployment.yaml
81 lines (81 loc) · 2.94 KB
/
dittoui-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
{{- if .Values.dittoui.enabled -}}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "ditto.fullname" . }}-dittoui
labels:
app.kubernetes.io/name: {{ include "ditto.name" . }}-dittoui
{{ include "ditto.labels" . | indent 4 }}
spec:
replicas: {{ .Values.dittoui.replicaCount }}
strategy:
{{- with .Values.dittoui.updateStrategy }}
{{- toYaml . | nindent 4 }}
{{- end }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "ditto.name" . }}-dittoui
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "ditto.name" . }}-dittoui
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.dittoui.additionalLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- with .Values.dittoui.additionalAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
topologySpreadConstraints:
- maxSkew: {{ .Values.dittoui.topologySpreadConstraints.maxSkew }}
topologyKey: {{ .Values.dittoui.topologySpreadConstraints.topologyKey }}
whenUnsatisfiable: {{ .Values.dittoui.topologySpreadConstraints.whenUnsatisfiable }}
labelSelector:
matchLabels:
app.kubernetes.io/name: {{ include "ditto.name" . }}-dittoui
containers:
- name: {{ .Chart.Name }}-dittoui
image: {{ printf "%s:%s" .Values.dittoui.image.repository ( default .Chart.AppVersion ( default .Values.dittoTag .Values.dittoui.image.tag ) ) }}
imagePullPolicy: {{ .Values.dittoui.image.pullPolicy }}
env:
{{- if .Values.dittoui.extraEnv }}
{{- toYaml .Values.dittoui.extraEnv | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 8080
protocol: TCP
resources:
requests:
cpu: {{ mulf .Values.dittoui.resources.cpu 1000 }}m
memory: {{ .Values.dittoui.resources.memoryMi }}Mi
limits:
# cpu: ""
memory: {{ .Values.dittoui.resources.memoryMi }}Mi
volumeMounts:
- name: dittoui-nginx-conf
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
volumes:
- name: dittoui-nginx-conf
configMap:
name: {{ .Release.Name }}-dittoui-config-nginx-conf
{{- end }}