Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding the configmap template to the helm deployment template #382

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
6 changes: 6 additions & 0 deletions template/deployments/helm/charts/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: configmap
data:

Vidya2606 marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions template/deployments/helm/charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
envFrom:
- configMapRef:
name: {{ .Values.configMapName }}
Vidya2606 marked this conversation as resolved.
Show resolved Hide resolved
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
5 changes: 4 additions & 1 deletion template/deployments/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,7 @@ tolerations: []

affinity: {}

generatorLabel: {{.GENERATORLABEL}}
generatorLabel: {{.GENERATORLABEL}}

# environment variables will be read from the configmap.yaml
Vidya2606 marked this conversation as resolved.
Show resolved Hide resolved
configMapName: configmap
6 changes: 6 additions & 0 deletions template/deployments/kustomize/base/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: configmap
data:
Vidya2606 marked this conversation as resolved.
Show resolved Hide resolved

5 changes: 4 additions & 1 deletion template/deployments/kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ spec:
image: {{.IMAGENAME}}:{{.IMAGETAG}}
imagePullPolicy: Always
ports:
- containerPort: {{.PORT}}
- containerPort: {{.PORT}}
envFrom:
- configMapRef:
Vidya2606 marked this conversation as resolved.
Show resolved Hide resolved
name: configmap
3 changes: 2 additions & 1 deletion template/deployments/kustomize/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
- service.yaml
- configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: configmap
data:
Vidya2606 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ spec:
spec:
containers:
- name: {{.APPNAME}}
image: {{.IMAGENAME}}:{{.IMAGETAG}}
image: {{.IMAGENAME}}:{{.IMAGETAG}}
envFrom:
- configMapRef:
Vidya2606 marked this conversation as resolved.
Show resolved Hide resolved
name: configmap
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ resources:
- ../../base
patchesStrategicMerge:
- deployment.yaml
- service.yaml
- service.yaml
- configmap.yaml
5 changes: 5 additions & 0 deletions template/deployments/manifests/manifests/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: configmap
data:
Vidya2606 marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 4 additions & 1 deletion template/deployments/manifests/manifests/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ spec:
image: {{.IMAGENAME}}:{{.IMAGETAG}}
imagePullPolicy: Always
ports:
- containerPort: {{.PORT}}
- containerPort: {{.PORT}}
envFrom:
- configMapRef:
Vidya2606 marked this conversation as resolved.
Show resolved Hide resolved
name: configmap
Loading