diff --git a/deploy/templates/app-deployment.yaml b/deploy/templates/app-deployment.yaml index a5e1718..3f9b5c2 100644 --- a/deploy/templates/app-deployment.yaml +++ b/deploy/templates/app-deployment.yaml @@ -35,91 +35,9 @@ spec: - name: http containerPort: {{ .Values.app.service.port }} protocol: TCP - env: - - name: APP_DATABASE_URL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_DATABASE_URL - optional: true - - name: APP_REDIS_URL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_REDIS_URL - optional: true - - name: NATS_URL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: NATS_URL - optional: true - - name: HOOK_POOL_REDIS_LIST_PREFIX - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: HOOK_POOL_REDIS_LIST_PREFIX - optional: true - - name: HOOK_POOL_REDIS_LOG_CHANNEL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: HOOK_POOL_REDIS_LOG_CHANNEL - optional: true - - name: APP_QDRANT_URL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_QDRANT_URL - optional: true - - name: APP_QDRANT_API_KEY - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_QDRANT_API_KEY - optional: true - - name: APP_AVATAR_PATH - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_AVATAR_PATH - optional: true - - name: APP_SMTP_HOST - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_HOST - optional: true - - name: APP_SMTP_PORT - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_PORT - optional: true - - name: APP_SMTP_USERNAME - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_USERNAME - optional: true - - name: APP_SMTP_PASSWORD - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_PASSWORD - optional: true - - name: APP_SMTP_FROM - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_FROM - optional: true - - name: APP_SMTP_TLS - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_TLS - optional: true + envFrom: + - configMapRef: + name: {{ include "gitdata.fullname" . }}-config {{- range .Values.app.env }} - name: {{ .name }} value: {{ .value | quote }} diff --git a/deploy/templates/email-worker-deployment.yaml b/deploy/templates/email-worker-deployment.yaml index b083db8..9d42762 100644 --- a/deploy/templates/email-worker-deployment.yaml +++ b/deploy/templates/email-worker-deployment.yaml @@ -30,55 +30,9 @@ spec: - name: email-worker image: "{{ .Values.image.registry }}/{{ .Values.emailWorker.image.repository }}:{{ .Values.emailWorker.image.tag }}" imagePullPolicy: {{ .Values.emailWorker.image.pullPolicy | default .Values.image.pullPolicy }} - env: - - name: APP_DATABASE_URL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_DATABASE_URL - optional: true - - name: APP_REDIS_URL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_REDIS_URL - optional: true - - name: APP_SMTP_HOST - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_HOST - optional: true - - name: APP_SMTP_PORT - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_PORT - optional: true - - name: APP_SMTP_USERNAME - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_USERNAME - optional: true - - name: APP_SMTP_PASSWORD - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_PASSWORD - optional: true - - name: APP_SMTP_FROM - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_FROM - optional: true - - name: APP_SMTP_TLS - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_SMTP_TLS - optional: true + envFrom: + - configMapRef: + name: {{ include "gitdata.fullname" . }}-config {{- range .Values.emailWorker.env }} - name: {{ .name }} value: {{ .value | quote }} diff --git a/deploy/templates/git-hook-deployment.yaml b/deploy/templates/git-hook-deployment.yaml index 854974e..05d5fbf 100644 --- a/deploy/templates/git-hook-deployment.yaml +++ b/deploy/templates/git-hook-deployment.yaml @@ -30,31 +30,9 @@ spec: - name: git-hook image: "{{ .Values.image.registry }}/{{ .Values.gitHook.image.repository }}:{{ .Values.gitHook.image.tag }}" imagePullPolicy: {{ .Values.gitHook.image.pullPolicy | default .Values.image.pullPolicy }} - env: - - name: APP_DATABASE_URL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_DATABASE_URL - optional: true - - name: APP_REDIS_URL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: APP_REDIS_URL - optional: true - - name: HOOK_POOL_REDIS_LIST_PREFIX - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: HOOK_POOL_REDIS_LIST_PREFIX - optional: true - - name: HOOK_POOL_REDIS_LOG_CHANNEL - valueFrom: - configMapKeyRef: - name: {{ include "gitdata.fullname" . }}-config - key: HOOK_POOL_REDIS_LOG_CHANNEL - optional: true + envFrom: + - configMapRef: + name: {{ include "gitdata.fullname" . }}-config {{- range .Values.gitHook.env }} - name: {{ .name }} value: {{ .value | quote }} diff --git a/deploy/templates/gitserver-deployment.yaml b/deploy/templates/gitserver-deployment.yaml index df10bb7..2d766cc 100644 --- a/deploy/templates/gitserver-deployment.yaml +++ b/deploy/templates/gitserver-deployment.yaml @@ -44,33 +44,12 @@ spec: - name: ssh containerPort: {{ $svc.service.ssh.port }} protocol: TCP + envFrom: + - configMapRef: + name: {{ $fullName }}-config env: - name: APP_REPOS_ROOT value: /data/repos - - name: APP_DATABASE_URL - valueFrom: - configMapKeyRef: - name: {{ $fullName }}-config - key: APP_DATABASE_URL - optional: true - - name: APP_REDIS_URL - valueFrom: - configMapKeyRef: - name: {{ $fullName }}-config - key: APP_REDIS_URL - optional: true - - name: APP_SSH_DOMAIN - valueFrom: - configMapKeyRef: - name: {{ $fullName }}-config - key: APP_SSH_DOMAIN - optional: true - - name: APP_SSH_PORT - valueFrom: - configMapKeyRef: - name: {{ $fullName }}-config - key: APP_SSH_PORT - optional: true {{- range $svc.env }} - name: {{ .name }} value: {{ .value | quote }} diff --git a/deploy/templates/operator-deployment.yaml b/deploy/templates/operator-deployment.yaml index 4cd7e75..5555cfc 100644 --- a/deploy/templates/operator-deployment.yaml +++ b/deploy/templates/operator-deployment.yaml @@ -29,6 +29,9 @@ spec: - name: operator image: "{{ .Values.image.registry }}/{{ .Values.operator.image.repository }}:{{ .Values.operator.image.tag }}" imagePullPolicy: {{ .Values.operator.image.pullPolicy | default .Values.image.pullPolicy }} + envFrom: + - configMapRef: + name: {{ include "gitdata.fullname" . }}-config env: - name: OPERATOR_IMAGE_PREFIX value: {{ .Values.operator.imagePrefix | default (printf "%s/" (include "gitdata.fullname" .)) | quote }} @@ -38,8 +41,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - resources: - {{- toYaml .Values.operator.resources | nindent 10 }} volumeMounts: - name: tmp mountPath: /tmp diff --git a/deploy/templates/static-deployment.yaml b/deploy/templates/static-deployment.yaml index 9abf1da..062ef9a 100644 --- a/deploy/templates/static-deployment.yaml +++ b/deploy/templates/static-deployment.yaml @@ -40,6 +40,9 @@ spec: - name: http containerPort: {{ $svc.service.port }} protocol: TCP + envFrom: + - configMapRef: + name: {{ $fullName }}-config env: - name: STATIC_ROOT value: /data