From c370899ef55c89f6df44bfa8b3b4c236d9a7823d Mon Sep 17 00:00:00 2001 From: syed salman Date: Fri, 2 Aug 2024 15:06:20 +0530 Subject: [PATCH] [DSD-5871] Updated dslorchestrator & packetcreator helm chart Signed-off-by: syed salman --- charts/dslorchestrator/templates/cronjob.yaml | 2 +- .../dslorchestrator-data-pv-pvc.yaml | 45 ------------------- charts/dslorchestrator/templates/pvc.yaml | 22 +++++++++ charts/dslorchestrator/values.yaml | 1 - .../templates/authdemo-authcerts-pv-pvc.yaml | 45 ------------------- .../packetcreator/templates/deployment.yaml | 17 +++---- .../templates/packetcreator-data-pv-pvc.yaml | 45 ------------------- charts/packetcreator/templates/pvc.yaml | 22 +++++++++ charts/packetcreator/values.yaml | 7 --- 9 files changed, 50 insertions(+), 156 deletions(-) delete mode 100644 charts/dslorchestrator/templates/dslorchestrator-data-pv-pvc.yaml create mode 100644 charts/dslorchestrator/templates/pvc.yaml delete mode 100644 charts/packetcreator/templates/authdemo-authcerts-pv-pvc.yaml delete mode 100644 charts/packetcreator/templates/packetcreator-data-pv-pvc.yaml create mode 100644 charts/packetcreator/templates/pvc.yaml diff --git a/charts/dslorchestrator/templates/cronjob.yaml b/charts/dslorchestrator/templates/cronjob.yaml index 6b772c677..f04da8bee 100644 --- a/charts/dslorchestrator/templates/cronjob.yaml +++ b/charts/dslorchestrator/templates/cronjob.yaml @@ -157,7 +157,7 @@ spec: {{- if $.Values.persistence.enabled }} - name: {{ template "common.names.fullname" $ }} persistentVolumeClaim: - claimName: {{ template "common.names.fullname" $ }}-pvc + claimName: {{ template "common.names.fullname" $ }} {{- end }} {{- if $.Values.enable_insecure }} - name: cacerts diff --git a/charts/dslorchestrator/templates/dslorchestrator-data-pv-pvc.yaml b/charts/dslorchestrator/templates/dslorchestrator-data-pv-pvc.yaml deleted file mode 100644 index be0962352..000000000 --- a/charts/dslorchestrator/templates/dslorchestrator-data-pv-pvc.yaml +++ /dev/null @@ -1,45 +0,0 @@ -{{- if .Values.persistence.enabled }} -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "common.names.fullname" . }}-pv -spec: - accessModes: - {{- if not (empty .Values.persistence.accessModes) }} - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- else }} - - {{ .Values.persistence.accessMode | quote }} - {{- end }} - capacity: - storage: {{ .Values.persistence.size | quote }} - nfs: - path: {{ .Values.persistence.nfs.path }} - server: {{ .Values.persistence.nfs.server }} - persistentVolumeReclaimPolicy: Retain - volumeMode: Filesystem ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - pv.kubernetes.io/bind-completed: "yes" - name: {{ template "common.names.fullname" . }}-pvc - namespace: {{ .Release.namespace }} -spec: - accessModes: - {{- if not (empty .Values.persistence.accessModes) }} - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- else }} - - {{ .Values.persistence.accessMode | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} - storageClassName: "" - volumeMode: Filesystem - volumeName: {{ template "common.names.fullname" . }}-pv -{{- end }} \ No newline at end of file diff --git a/charts/dslorchestrator/templates/pvc.yaml b/charts/dslorchestrator/templates/pvc.yaml new file mode 100644 index 000000000..0ef0189d0 --- /dev/null +++ b/charts/dslorchestrator/templates/pvc.yaml @@ -0,0 +1,22 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ template "common.names.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + labels: {{- include "common.labels.standard" . | nindent 4 }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} +spec: + accessModes: + {{- if not (empty .Values.persistence.accessModes) }} + {{- range .Values.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + {{- else }} + - {{ .Values.persistence.accessMode | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} + {{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 2 }} + {{- end }} \ No newline at end of file diff --git a/charts/dslorchestrator/values.yaml b/charts/dslorchestrator/values.yaml index 699dbcb58..d73fcaaa8 100644 --- a/charts/dslorchestrator/values.yaml +++ b/charts/dslorchestrator/values.yaml @@ -480,7 +480,6 @@ dslorchestrator: ENABLE_INSECURE: "false" ENDPOINT: "https://api-internal.sandbox.xyz.net" USER: "api-internal.sandbox.xyz.net" - authCertsPath: "/home/mosip/authcerts" # dslorchestrator scenario mountPath mountPathForScenario: "/home/mosip/mountvolume/" mountPath: "/home/mosip/mountvolume" diff --git a/charts/packetcreator/templates/authdemo-authcerts-pv-pvc.yaml b/charts/packetcreator/templates/authdemo-authcerts-pv-pvc.yaml deleted file mode 100644 index 82118a676..000000000 --- a/charts/packetcreator/templates/authdemo-authcerts-pv-pvc.yaml +++ /dev/null @@ -1,45 +0,0 @@ -{{- if .Values.persistence.enabled }} -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "common.names.fullname" . }}-authcerts-pv -spec: - accessModes: - {{- if not (empty .Values.persistence.accessModes) }} - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- else }} - - {{ .Values.persistence.accessMode | quote }} - {{- end }} - capacity: - storage: {{ .Values.persistence.size | quote }} - nfs: - path: {{ .Values.persistence.nfs.path }} - server: {{ .Values.persistence.nfs.server }} - persistentVolumeReclaimPolicy: Retain - volumeMode: Filesystem ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - pv.kubernetes.io/bind-completed: "yes" - name: {{ template "common.names.fullname" . }}-authcerts-pvc - namespace: {{ .Release.namespace }} -spec: - accessModes: - {{- if not (empty .Values.persistence.accessModes) }} - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- else }} - - {{ .Values.persistence.accessMode | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} - storageClassName: "" - volumeMode: Filesystem - volumeName: {{ template "common.names.fullname" . }}-authcerts-pv -{{- end }} \ No newline at end of file diff --git a/charts/packetcreator/templates/deployment.yaml b/charts/packetcreator/templates/deployment.yaml index b0dec47fd..5dd9b811a 100644 --- a/charts/packetcreator/templates/deployment.yaml +++ b/charts/packetcreator/templates/deployment.yaml @@ -61,16 +61,14 @@ spec: command: - /bin/bash - -c - - chown -R mosip:mosip {{ .Values.persistence.mountDir }} && chown -R mosip:mosip {{ .Values.persistence.packetcreator_data_mount_dir }} + - chown -R mosip:mosip {{ .Values.persistence.packetcreator_data_mount_dir }} securityContext: runAsUser: 0 {{- if .Values.volumePermissions.resources }} resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }} {{- end }} volumeMounts: - - name: {{ template "common.names.fullname" . }}-authcerts - mountPath: {{ .Values.persistence.mountDir }} - - name: {{ template "common.names.fullname" . }}-data + - name: {{ template "common.names.fullname" . }} mountPath: {{ .Values.persistence.packetcreator_data_mount_dir }} {{- end }} {{- if .Values.enable_insecure }} @@ -120,9 +118,7 @@ spec: resources: {{- toYaml .Values.resources | nindent 12 }} {{- end }} volumeMounts: - - name: {{ template "common.names.fullname" . }}-authcerts - mountPath: {{ .Values.persistence.mountDir }} - - name: {{ template "common.names.fullname" . }}-data + - name: {{ template "common.names.fullname" . }} mountPath: {{ .Values.persistence.packetcreator_data_mount_dir }} {{- if .Values.enable_insecure }} - mountPath: /usr/local/openjdk-11/lib/security/cacerts @@ -149,12 +145,9 @@ spec: {{- end }} volumes: {{- if .Values.persistence.enabled }} - - name: {{ template "common.names.fullname" . }}-authcerts + - name: {{ template "common.names.fullname" . }} persistentVolumeClaim: - claimName: {{ template "common.names.fullname" . }}-authcerts-pvc - - name: {{ template "common.names.fullname" . }}-data - persistentVolumeClaim: - claimName: {{ template "common.names.fullname" . }}-data-pvc + claimName: {{ template "common.names.fullname" . }} {{- end }} {{- if .Values.enable_insecure }} - name: cacerts diff --git a/charts/packetcreator/templates/packetcreator-data-pv-pvc.yaml b/charts/packetcreator/templates/packetcreator-data-pv-pvc.yaml deleted file mode 100644 index a4fff444e..000000000 --- a/charts/packetcreator/templates/packetcreator-data-pv-pvc.yaml +++ /dev/null @@ -1,45 +0,0 @@ -{{- if .Values.persistence.enabled }} -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "common.names.fullname" . }}-data-pv -spec: - accessModes: - {{- if not (empty .Values.persistence.accessModes) }} - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- else }} - - {{ .Values.persistence.accessMode | quote }} - {{- end }} - capacity: - storage: {{ .Values.persistence.size | quote }} - nfs: - path: {{ .Values.persistence.nfs.packetcreator_data_path }} - server: {{ .Values.persistence.nfs.server }} - persistentVolumeReclaimPolicy: Retain - volumeMode: Filesystem ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - annotations: - pv.kubernetes.io/bind-completed: "yes" - name: {{ template "common.names.fullname" . }}-data-pvc - namespace: {{ .Release.namespace }} -spec: - accessModes: - {{- if not (empty .Values.persistence.accessModes) }} - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - {{- else }} - - {{ .Values.persistence.accessMode | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} - storageClassName: "" - volumeMode: Filesystem - volumeName: {{ template "common.names.fullname" . }}-data-pv -{{- end }} \ No newline at end of file diff --git a/charts/packetcreator/templates/pvc.yaml b/charts/packetcreator/templates/pvc.yaml new file mode 100644 index 000000000..0ef0189d0 --- /dev/null +++ b/charts/packetcreator/templates/pvc.yaml @@ -0,0 +1,22 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ template "common.names.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + labels: {{- include "common.labels.standard" . | nindent 4 }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} +spec: + accessModes: + {{- if not (empty .Values.persistence.accessModes) }} + {{- range .Values.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + {{- else }} + - {{ .Values.persistence.accessMode | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} + {{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 2 }} + {{- end }} \ No newline at end of file diff --git a/charts/packetcreator/values.yaml b/charts/packetcreator/values.yaml index f7e2f7f68..d7da71f88 100644 --- a/charts/packetcreator/values.yaml +++ b/charts/packetcreator/values.yaml @@ -333,13 +333,7 @@ persistence: - ReadWriteOnce size: 50G existingClaim: - - nfs: - path: '/srv/nfs/mosip/packetcreator-authdemo-authcerts' - packetcreator_data_path: '/srv/nfs/mosip/packetcreator-data' - server: '' # Dir where config and keys are written inside container - mountDir: '/home/mosip/authcerts' packetcreator_data_mount_dir: '/home/mosip/mountvolume/' ## Init containers parameters: @@ -450,7 +444,6 @@ metrics: packetcreator: configmaps: packetcreator: - authCertsPath: /home/mosip/authcerts mountPath: /home/mosip/mountvolume secrets: