From b9bd786ff852ee7a9158d44fed5d085992ebb0ec Mon Sep 17 00:00:00 2001 From: Esther Kim Date: Mon, 9 May 2022 14:17:05 +0900 Subject: [PATCH] implement: add environments to chart --- install/charts/templates/deployment.yaml | 14 +++++--------- install/charts/templates/service.yaml | 8 ++++++-- install/charts/values.yaml | 9 ++++++++- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/install/charts/templates/deployment.yaml b/install/charts/templates/deployment.yaml index 3441fa3..d9d6c95 100644 --- a/install/charts/templates/deployment.yaml +++ b/install/charts/templates/deployment.yaml @@ -24,18 +24,14 @@ spec: - name: aws-dms-task-exporter image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.env }} + env: + {{- toYaml . | nindent 12 }} + {{- end }} ports: - - name: http + - name: metrics containerPort: {{ .Values.service.port }} protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/install/charts/templates/service.yaml b/install/charts/templates/service.yaml index ca9ff87..b0a4086 100644 --- a/install/charts/templates/service.yaml +++ b/install/charts/templates/service.yaml @@ -4,12 +4,16 @@ metadata: name: aws-dms-task-exporter labels: app: aws-dms-task-exporter + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 6 }} + {{- end }} spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} - targetPort: http + targetPort: metrics protocol: TCP - name: http + name: metrics selector: app: aws-dms-task-exporter \ No newline at end of file diff --git a/install/charts/values.yaml b/install/charts/values.yaml index 8d288d6..3524ece 100644 --- a/install/charts/values.yaml +++ b/install/charts/values.yaml @@ -30,4 +30,11 @@ affinity: {} labels: {} -podAnnotations: {} \ No newline at end of file +podAnnotations: + prometheus.io/scrape: "true" + +env: [] + # - name: AWS_ACCESS_KEY_ID + # value: YOUR_AWS_ACCESS_KEY + # - name: AWS_SECRET_ACCESS_KEY + # value: YOUR_AWS_SECRET_ACCESS_KEY