From 6a951ce2cad001f697cc016c10da2927487fe7ab Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Thu, 13 May 2021 05:03:20 -0400 Subject: [PATCH 1/5] add env mapping --- charts/generic/templates/deployment.yaml | 2 ++ charts/generic/values.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/charts/generic/templates/deployment.yaml b/charts/generic/templates/deployment.yaml index 6ee5d64..8b97a6a 100644 --- a/charts/generic/templates/deployment.yaml +++ b/charts/generic/templates/deployment.yaml @@ -33,6 +33,8 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + {{- toYaml .Values.pod.env | nindent 12 }} ports: - name: http containerPort: {{ .Values.pod.port }} diff --git a/charts/generic/values.yaml b/charts/generic/values.yaml index 2962497..4071c81 100644 --- a/charts/generic/values.yaml +++ b/charts/generic/values.yaml @@ -12,6 +12,7 @@ fullnameOverride: "" pod: port: 80 + env: {} serviceAccount: # -- Specifies whether a service account should be created From a791d804bf3f6384429ebef16c22cb18ec150542 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Thu, 13 May 2021 05:03:33 -0400 Subject: [PATCH 2/5] add a basic ci entry for the generic chart --- charts/generic/ci/all-values.yaml | 81 +++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 charts/generic/ci/all-values.yaml diff --git a/charts/generic/ci/all-values.yaml b/charts/generic/ci/all-values.yaml new file mode 100644 index 0000000..bb64d20 --- /dev/null +++ b/charts/generic/ci/all-values.yaml @@ -0,0 +1,81 @@ +replicaCount: 1 + +image: + repository: nginx + pullPolicy: IfNotPresent + # -- Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +pod: + port: 80 + env: + - name: "TEST_ENV" + value: "SOME_VALUE" + +serviceAccount: + # -- Specifies whether a service account should be created + create: true + # -- Annotations to add to the service account + annotations: {} + # -- The name of the service account to use. + # -- If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} From d21862636afe0042359397f73bacb6e1147cc203 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Thu, 13 May 2021 05:05:10 -0400 Subject: [PATCH 3/5] bump version add news entry --- charts/generic/Chart.yaml | 2 +- charts/generic/NEWS.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/generic/Chart.yaml b/charts/generic/Chart.yaml index 763de4b..04df406 100644 --- a/charts/generic/Chart.yaml +++ b/charts/generic/Chart.yaml @@ -3,7 +3,7 @@ name: generic description: A generic Helm chart for Kubernetes type: application -version: 0.1.1 +version: 0.1.2 appVersion: latest maintainers: - name: colearendt diff --git a/charts/generic/NEWS.md b/charts/generic/NEWS.md index 3717142..8680762 100644 --- a/charts/generic/NEWS.md +++ b/charts/generic/NEWS.md @@ -1,3 +1,7 @@ +# 0.1.2 + +- Add `pod.env` values for setting pod environment variables + # 0.1.1 - Update maintainer From a53ebadaedf24ad413981e35176b67de273da6c1 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Thu, 13 May 2021 05:11:05 -0400 Subject: [PATCH 4/5] switch to an array for env --- charts/generic/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/generic/values.yaml b/charts/generic/values.yaml index 4071c81..6420993 100644 --- a/charts/generic/values.yaml +++ b/charts/generic/values.yaml @@ -12,7 +12,7 @@ fullnameOverride: "" pod: port: 80 - env: {} + env: [] serviceAccount: # -- Specifies whether a service account should be created From 4496e2479aaf964dc389aabb22498aeb4700aa0f Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Thu, 13 May 2021 05:12:03 -0400 Subject: [PATCH 5/5] set empty values --- charts/generic/ci/empty-values.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 charts/generic/ci/empty-values.yaml diff --git a/charts/generic/ci/empty-values.yaml b/charts/generic/ci/empty-values.yaml new file mode 100644 index 0000000..e69de29