diff options
Diffstat (limited to 'kubernetes/aai/components/aai-graphadmin/templates')
4 files changed, 16 insertions, 23 deletions
diff --git a/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml b/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml index 991727d7c6..31566fc939 100644 --- a/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml +++ b/kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml @@ -23,7 +23,7 @@ */}} apiVersion: apps/v1 kind: Deployment -metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +metadata: {{- include "common.resourceMetadata" (dict "annotations" .Values.annotations "dot" .) | nindent 2 }} spec: {{- if .Values.config.debug.enabled }} replicas: 1 @@ -47,7 +47,7 @@ spec: terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }} {{- if .Values.global.initContainers.enabled }} initContainers: - {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.waitForWithCreateSchemaDisabled ) | indent 6 | trim}} + {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.waitForWithCreateSchemaDisabled ) | indent 6 | trim }} {{- end }} {{ include "common.podSecurityContext" . | indent 6 | trim }} containers: @@ -62,13 +62,6 @@ spec: value: {{ $value | quote}} {{- end }} {{- end }} - {{- if eq .Values.flavor "small" }} - - name: MAX_HEAP_SIZE - value: {{ .Values.small.maxHeapSize | quote }} - {{- else if eq .Values.flavor "large" }} - - name: MAX_HEAP_SIZE - value: {{ .Values.large.maxHeapSize | quote }} - {{- end }} - name: INTERNAL_PORT_1 value: {{ .Values.service.appPort | quote }} - name: INTERNAL_PORT_2 @@ -170,13 +163,12 @@ spec: resources: {{ include "common.resources" . | nindent 10 }} {{- if .Values.nodeSelector }} nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} + {{ toYaml .Values.nodeSelector | indent 8 }} {{- end -}} {{- if .Values.affinity }} affinity: -{{ toYaml .Values.affinity | indent 8 }} + {{ toYaml .Values.affinity | indent 8 }} {{- end }} - # side car containers {{ include "common.log.sidecar" . | nindent 6 }} serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} diff --git a/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml b/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml index 1cc431c94f..6366e0626b 100644 --- a/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml +++ b/kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml @@ -42,10 +42,9 @@ metadata: name: {{ include "common.fullname" . }}-db-backup namespace: {{ include "common.namespace" . }} labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 4 }} - annotations: - "helm.sh/hook": pre-upgrade,pre-install - "helm.sh/hook-weight": "2" - "helm.sh/hook-delete-policy": before-hook-creation + {{- if .Values.jobAnnotations.backup }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations.backup "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: diff --git a/kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml b/kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml index 19e62ae7c4..6c57680724 100644 --- a/kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml +++ b/kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml @@ -41,6 +41,9 @@ metadata: name: {{ include "common.fullname" . }}-create-db-schema namespace: {{ include "common.namespace" . }} labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 4 }} + {{- if .Values.jobAnnotations.createDBSchema }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations.createDBSchema "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: @@ -55,7 +58,7 @@ spec: - name: {{ include "common.name" . }}-job image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - {{ include "common.containerSecurityContext" . | indent 8 | trim }} + {{ include "common.containerSecurityContext" . | nindent 8 | trim }} command: - sh args: @@ -81,8 +84,8 @@ spec: secretKeyRef: name: {{ include "common.release" . }}-{{ .Values.global.aaiGraphKafkaUser }} key: sasl.jaas.config - ports: {{- if .Values.config.debug.enabled }} + ports: - containerPort: {{ .Values.service.debugPort }} name: {{ .Values.service.debugPortName }} {{- end }} @@ -125,4 +128,4 @@ spec: name: {{ include "common.fullname" . }}-properties restartPolicy: Never {{- include "common.imagePullSecrets" . | nindent 6 }} -{{ end }} +{{- end }} diff --git a/kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml b/kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml index f6f2f8b1a7..fcfb479965 100644 --- a/kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml +++ b/kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml @@ -42,10 +42,9 @@ metadata: name: {{ include "common.fullname" . }}-migration namespace: {{ include "common.namespace" . }} labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 4 }} - annotations: - "helm.sh/hook": post-upgrade,post-rollback,post-install - "helm.sh/hook-weight": "1" - "helm.sh/hook-delete-policy": before-hook-creation + {{- if .Values.jobAnnotations.migration }} + annotations: {{- include "common.tplValue" (dict "value" .Values.jobAnnotations.migration "context" $) | nindent 4 }} + {{- end }} spec: backoffLimit: 20 template: |