Skip to content

Commit

Permalink
Merge pull request #9 from colearendt/add-env
Browse files Browse the repository at this point in the history
Add env
  • Loading branch information
colearendt authored May 13, 2021
2 parents 420c3aa + 4496e24 commit 6288f90
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/generic/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions charts/generic/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.1.2

- Add `pod.env` values for setting pod environment variables

# 0.1.1

- Update maintainer
Expand Down
81 changes: 81 additions & 0 deletions charts/generic/ci/all-values.yaml
Original file line number Diff line number Diff line change
@@ -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: {}
Empty file.
2 changes: 2 additions & 0 deletions charts/generic/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions charts/generic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fullnameOverride: ""

pod:
port: 80
env: []

serviceAccount:
# -- Specifies whether a service account should be created
Expand Down

0 comments on commit 6288f90

Please sign in to comment.