From b3b3c58c800f2b254bbf635b758a67a225a68294 Mon Sep 17 00:00:00 2001 From: kamal-devtron Date: Mon, 17 Jun 2024 17:17:50 +0530 Subject: [PATCH] changes in deploymnet chart --- .../deployment-chart_4-19-0/Chart.yaml | 4 ++-- .../templates/deployment.yaml | 11 +++++++++- .../templates/persistent-volume-claim.yaml | 6 +++--- .../templates/service.yaml | 7 +++++++ .../deployment-chart_4-19-0/values.yaml | 21 ++++++++++++------- .../templates/service.yaml | 10 +++++++++ .../reference-chart_4-19-0/values.yaml | 4 ++++ 7 files changed, 49 insertions(+), 14 deletions(-) diff --git a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/Chart.yaml b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/Chart.yaml index 0aebed6758c..5484f30656d 100644 --- a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/Chart.yaml +++ b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for Kubernetes -name: deployment-chart_4-18-0 -version: 4.18.0 +name: deployment-chart_4-19-0 +version: 4.19.0 diff --git a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/deployment.yaml b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/deployment.yaml index 3237b122e5f..3aa6ca979d4 100644 --- a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/deployment.yaml +++ b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/deployment.yaml @@ -12,7 +12,7 @@ {{- end }} {{- $hasPVCExists := false -}} - {{- if .Values.peristentVolumeClaim.name }} + {{- if .Values.persistentVolumeClaim.name }} {{- $hasPVCExists = true }} {{- end }} @@ -490,6 +490,14 @@ spec: - name: {{ $.Chart.Name }}-sidecontainer-{{ add1 $i }} image: "{{ $.Values.server.deployment.image }}:{{ $.Values.server.deployment.image_tag }}" imagePullPolicy: {{ $.Values.image.pullPolicy }} +{{- if .env }} + env: +{{ toYaml .env | indent 12 }} +{{- end }} + {{- if .envFrom }} + envFrom: +{{ toYaml .env | indent 12 }} +{{- end }} {{- if .securityContext }} securityContext: {{ toYaml .securityContext | indent 12 }} @@ -513,6 +521,7 @@ spec: {{- end}} {{- end}} + volumes: {{- if $.Values.appMetrics }} - name: envoy-config-volume diff --git a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/persistent-volume-claim.yaml b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/persistent-volume-claim.yaml index 4d63c826222..bf4e6dfb712 100644 --- a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/persistent-volume-claim.yaml +++ b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/persistent-volume-claim.yaml @@ -1,15 +1,15 @@ -{{- if .Values.peristentVolumeClaim.name }} +{{- if .Values.persistentVolumeClaim.name }} kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{.Values.peristentVolumeClaim.name }} + name: {{.Values.persistentVolumeClaim.name }} labels: app: {{ template ".Chart.Name .name" $ }} chart: {{ template ".Chart.Name .chart" $ }} {{- if .Values.appLabels }} {{ toYaml .Values.appLabels | indent 4 }} {{- end }} -{{- with .Values.peristentVolumeClaim }} +{{- with .Values.persistentVolumeClaim }} spec: accessModes: {{- range .accessMode }} diff --git a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/service.yaml b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/service.yaml index 8edb6bb1259..a7aa507b464 100644 --- a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/service.yaml +++ b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/templates/service.yaml @@ -48,6 +48,13 @@ spec: {{- end }} selector: app: {{ template ".Chart.Name .name" . }} +{{- if .Values.service.sessionAffinity.enabled }} + sessionAffinity: ClientIP +{{- end }} +{{- if .Values.service.sessionAffinityConfig }} + sessionAffinityConfig: +{{ toYaml .Values.service.sessionAffinityConfig | indent 4 }} +{{- end }} {{- if eq .Values.deploymentType "BLUE-GREEN" }} --- apiVersion: v1 diff --git a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/values.yaml b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/values.yaml index 84fabd0ff15..858cb9af95e 100644 --- a/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/values.yaml +++ b/scripts/devtron-reference-helm-charts/deployment-chart_4-19-0/values.yaml @@ -167,6 +167,8 @@ service: annotations: {} # test1: test2 # test3: test4 + sessionAffinity: + enabled: false istio: enable: false @@ -584,15 +586,18 @@ initContainers: [] # # This will assign your application's docker image to init container. # reuseContainerImage: true -containers: [] +containers: ## Additional init containers to run before the Scheduler pods. ## for example, be used to run a sidecar that chown Logs storage . - #- name: volume-mount-hack - # image: busybox - # command: ["sh", "-c", "chown -R 1000:1000 logs"] - # volumeMounts: - # - mountPath: /usr/local/airflow/logs - # name: logs-data + - name: volume-mount-hack + image: busybox + command: ["sh", "-c", "chown -R 1000:1000 logs"] + volumeMounts: + - mountPath: /usr/local/airflow/logs + name: logs-data + envFrom: + - configMapRef: + name: kamal rawYaml: [] @@ -703,4 +708,4 @@ tolerations: [] imagePullSecrets: [] # - test1 # - test2 -peristentVolumeClaim: {} \ No newline at end of file +persistentVolumeClaim: {} \ No newline at end of file diff --git a/scripts/devtron-reference-helm-charts/reference-chart_4-19-0/templates/service.yaml b/scripts/devtron-reference-helm-charts/reference-chart_4-19-0/templates/service.yaml index da6917be6d1..ee9640233c8 100644 --- a/scripts/devtron-reference-helm-charts/reference-chart_4-19-0/templates/service.yaml +++ b/scripts/devtron-reference-helm-charts/reference-chart_4-19-0/templates/service.yaml @@ -48,6 +48,16 @@ spec: {{- end }} selector: app: {{ template ".Chart.Name .name" . }} +{{- if .Values.service.sessionAffinity.enabled }} + sessionAffinity: ClientIP +{{- end }} +{{- if .Values.service.sessionAffinityConfig }} + sessionAffinityConfig: +{{ toYaml .Values.service.sessionAffinityConfig | indent 4 }} +{{- end }} + + + {{- if eq .Values.deploymentType "BLUE-GREEN" }} --- apiVersion: v1 diff --git a/scripts/devtron-reference-helm-charts/reference-chart_4-19-0/values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_4-19-0/values.yaml index 25261f3b160..e8fa3867465 100644 --- a/scripts/devtron-reference-helm-charts/reference-chart_4-19-0/values.yaml +++ b/scripts/devtron-reference-helm-charts/reference-chart_4-19-0/values.yaml @@ -137,6 +137,10 @@ service: annotations: {} # test1: test2 # test3: test4 + sessionAffinity: + enabled: false + sessionAffinityConfig: {} + server: deployment: