first commit
This commit is contained in:
12
templates/aga/aga-configmap.yaml
Normal file
12
templates/aga/aga-configmap.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- if and .Values.aga.enabled .Values.aga.license }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-aga-license-config
|
||||
data:
|
||||
{{- range $path, $config := .Values.aga.license }}
|
||||
{{ $path }}: |
|
||||
{{ $config | indent 4 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
122
templates/aga/aga-deployment.yaml
Normal file
122
templates/aga/aga-deployment.yaml
Normal file
@@ -0,0 +1,122 @@
|
||||
{{- 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 }}
|
||||
33
templates/aga/aga-hpa.yaml
Normal file
33
templates/aga/aga-hpa.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
{{- if .Values.aga.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: "{{ include "gateway.fullname" . }}-aga"
|
||||
labels:
|
||||
{{- include "gateway.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: aga
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: "{{ include "gateway.fullname" . }}-aga"
|
||||
minReplicas: {{ .Values.aga.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.aga.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.aga.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.aga.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.aga.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.aga.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
47
templates/aga/aga-ingress.yaml
Normal file
47
templates/aga/aga-ingress.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
{{- if .Values.aga.ingress.enabled -}}
|
||||
{{- $fullName := include "gateway.fullname" . -}}
|
||||
{{- $svcPort := .Values.aga.service.ports.ui.port -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}-aga
|
||||
labels:
|
||||
{{- include "gateway.labels" . | nindent 4 }}
|
||||
{{- with .Values.aga.ingress.annotations }}
|
||||
annotations:
|
||||
{{- tpl (toYaml .) $ | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.aga.ingress.className }}
|
||||
ingressClassName: {{ .Values.aga.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.aga.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.aga.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ tpl . $ | quote }}
|
||||
{{- end }}
|
||||
{{- if .secretName }}
|
||||
secretName: {{ tpl (.secretName) $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.aga.ingress.hosts }}
|
||||
- host: {{ tpl .host $ | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if .pathType }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ $fullName }}-aga
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
40
templates/aga/aga-routes.yaml
Normal file
40
templates/aga/aga-routes.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
{{- if and .Values.aga.enabled .Values.aga.route.enabled -}}
|
||||
kind: Route
|
||||
apiVersion: route.openshift.io/v1
|
||||
metadata:
|
||||
name: "{{ include "gateway.fullname" . }}-aga"
|
||||
labels:
|
||||
{{- include "gateway.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: aga
|
||||
spec:
|
||||
{{- if .Values.global.domainName }}
|
||||
host: aga.{{ .Values.global.domainName }}
|
||||
{{- end }}
|
||||
port:
|
||||
targetPort: {{ tpl .Values.aga.route.targetPort . }}
|
||||
to:
|
||||
kind: Service
|
||||
name: "{{ include "gateway.fullname" . }}-aga"
|
||||
{{- if .Values.aga.route.tls.enabled }}
|
||||
tls:
|
||||
termination: {{ .Values.aga.route.tls.termination }}
|
||||
insecureEdgeTerminationPolicy: {{ .Values.aga.route.tls.insecureEdgeTerminationPolicy }}
|
||||
{{- if .Values.aga.route.tls.key }}
|
||||
key: |-
|
||||
{{- .Values.aga.route.tls.key | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.aga.route.tls.destinationCACertificate }}
|
||||
destinationCACertificate: |-
|
||||
{{- .Values.aga.route.tls.destinationCACertificate | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.aga.route.tls.caCertificate }}
|
||||
caCertificate: |-
|
||||
{{- .Values.aga.route.tls.caCertificate | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- if .Values.aga.route.tls.certificate }}
|
||||
certificate: |-
|
||||
{{- .Values.aga.route.tls.certificate | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
wildcardPolicy: None
|
||||
{{- end }}
|
||||
19
templates/aga/aga-service.yaml
Normal file
19
templates/aga/aga-service.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- if .Values.aga.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ include "gateway.fullname" . }}-aga"
|
||||
labels:
|
||||
{{- include "gateway.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: aga
|
||||
spec:
|
||||
type: {{ .Values.aga.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.aga.service.ports.ui.port }}
|
||||
targetPort: {{ .Values.aga.service.ports.ui.port }}
|
||||
protocol: {{ .Values.aga.service.ports.ui.protocol }}
|
||||
name: apianalyticsui
|
||||
selector:
|
||||
{{- include "gateway.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: aga
|
||||
{{- end }}
|
||||
13
templates/aga/aga-serviceaccount.yaml
Normal file
13
templates/aga/aga-serviceaccount.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- if .Values.aga.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "gateway.aga.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "gateway.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: aga
|
||||
{{- with .Values.aga.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user