123 lines
4.9 KiB
YAML
123 lines
4.9 KiB
YAML
{{- if .Values.aga.enabled -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: "{{ include "gateway.fullname" . }}-aga"
|
|
labels:
|
|
{{- include "gateway.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: aga
|
|
spec:
|
|
{{- if not .Values.aga.autoscaling.enabled }}
|
|
replicas: {{ .Values.aga.replicaCount }}
|
|
{{- end }}
|
|
strategy:
|
|
{{- if eq (default .Values.global.updateStrategy.type .Values.aga.updateStrategy.type) "RollingUpdate" }}
|
|
rollingUpdate:
|
|
maxSurge: {{ default .Values.global.updateStrategy.rollingUpdate.maxSurge .Values.aga.updateStrategy.rollingUpdate.maxSurge }}
|
|
maxUnavailable: {{ default .Values.global.updateStrategy.rollingUpdate.maxUnavailable .Values.aga.updateStrategy.rollingUpdate.maxUnavailable }}
|
|
{{- end }}
|
|
type: {{ default .Values.global.updateStrategy.type .Values.aga.updateStrategy.type }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "gateway.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: aga
|
|
{{- with .Values.aga.podLabels }}
|
|
{{- toYaml . | nindent 6 }}
|
|
{{- end }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.aga.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "gateway.selectorLabels" . | nindent 8 }}
|
|
app.kubernetes.io/component: aga
|
|
{{- with .Values.aga.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.global.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "gateway.aga.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.aga.podSecurityContext | nindent 8 }}
|
|
{{- if .Values.aga.extraInitContainers }}
|
|
initContainers:
|
|
{{ toYaml (.Values.aga.extraInitContainers) | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.aga.securityContext | nindent 12 }}
|
|
image: "{{ default .Values.global.defaultRegistry .Values.aga.image.registry }}/{{ .Values.aga.image.repository }}:{{ .Values.aga.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
|
|
ports:
|
|
- containerPort: {{ .Values.aga.service.ports.ui.port }}
|
|
protocol: {{ .Values.aga.service.ports.ui.protocol }}
|
|
{{- with .Values.aga.livenessProbe }}
|
|
livenessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.aga.readinessProbe }}
|
|
readinessProbe:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.aga.resources | nindent 12 }}
|
|
env:
|
|
{{- with .Values.aga.extraEnvVars }}
|
|
{{ toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.global.database.metrics.enabled }}
|
|
- name: METRICS_DB_URL
|
|
value: {{ tpl .Values.global.database.metrics.url . | quote }}
|
|
- name: METRICS_DB_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "gateway.metrics-db.secretName" . }}
|
|
key: {{ with .Values.global.database.metrics.existingSecret.keyMapping }}{{- default "username" .username }}{{- else -}}"username"{{- end }}
|
|
- name: METRICS_DB_PASS
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "gateway.metrics-db.secretName" . }}
|
|
key: {{ with .Values.global.database.metrics.existingSecret.keyMapping }}{{- default "password" .password }}{{- else -}}"password"{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.aga.image.generalConditions }}
|
|
- name: ACCEPT_GENERAL_CONDITIONS
|
|
value: {{ .Values.aga.image.generalConditions.accept | quote }}
|
|
{{- end }}
|
|
{{- if .Values.aga.extraVolumeMounts }}
|
|
volumeMounts:
|
|
{{- toYaml ( .Values.aga.extraVolumeMounts ) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.aga.license }}
|
|
- name: license
|
|
mountPath: "/opt/Axway/analytics/conf/licenses/license.lic"
|
|
subPath: "license.lic"
|
|
{{- end }}
|
|
{{- if .Values.aga.extraVolumes }}
|
|
volumes:
|
|
{{- if .Values.aga.license }}
|
|
- name: license
|
|
configMap:
|
|
name: {{ .Release.Name }}-aga-license-config
|
|
{{- end }}
|
|
{{ toYaml ( .Values.aga.extraVolumes ) | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.aga.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.aga.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.aga.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|