Skip to content

Commit b8033f0

Browse files
authored
Revert "[Monochart] Feature: deployment.yaml volume mounts (#273)" (#274)
This reverts commit 61ffa1b.
1 parent 61ffa1b commit b8033f0

4 files changed

Lines changed: 7 additions & 44 deletions

File tree

incubator/monochart/templates/_helpers.tpl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,11 @@ env:
6161
value: {{ default "" $value | quote }}
6262
{{- end }}
6363
{{- end }}
64-
6564
{{/*
6665
https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/#use-pod-fields-as-values-for-environment-variables
6766
*/}}
6867
{{- with $root.Values.envFromFieldRefFieldPath }}
69-
70-
{{/* Only add env block if not used by above .Values.env */}}
71-
{{- if not $root.Values.env}}
7268
env:
73-
{{- end }}
7469
{{- range $name, $value := . }}
7570
- name: {{ $name }}
7671
valueFrom:

incubator/monochart/templates/deployment.yaml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,44 +96,33 @@ spec:
9696
protocol: {{ default "TCP" $port.protocol }}
9797
{{- end }}
9898
{{- end }}
99-
{{- if or .Values.deployment.pod.volumeMounts .Values.persistence.enabled .Values.configMaps.enabled .Values.secrets.enabled }}
10099
volumeMounts:
101-
{{- if .Values.deployment.pod.volumeMounts }}
102-
{{- toYaml .Values.deployment.pod.volumeMounts | nindent 8 }}
103-
{{- end }}
104100
{{- if .Values.persistence.enabled }}
105101
- mountPath: {{ .Values.persistence.mountPath | quote }}
106102
name: storage
107103
{{- end }}
108104
{{- include "monochart.files.volumeMounts" . | nindent 8 }}
109-
{{- end }}
110105
{{- with .Values.probes }}
111106
{{ toYaml . | indent 8 }}
112107
{{- end }}
113108
{{- with .Values.resources }}
114109
resources:
115110
{{ toYaml . | indent 10 }}
116111
{{- end }}
117-
{{- with .Values.deployment.pod.hostAliases }}
112+
{{- with .Values.deployment.pod.hostAliases }}
118113
hostAliases:
119-
{{- toYaml . | indent 8 }}
120-
{{- end }}
121-
{{- if or .Values.dockercfg.enabled .Values.image.pullSecrets }}
114+
{{ toYaml . | indent 8 }}
115+
{{- end }}
122116
imagePullSecrets:
123-
{{- end }}
124-
{{- if .Values.dockercfg.enabled }}
117+
{{- if .Values.dockercfg.enabled }}
125118
- name: {{ include "common.fullname" . }}
126-
{{- end }}
127-
{{- with .Values.image.pullSecrets }}
119+
{{- end }}
120+
{{- with .Values.image.pullSecrets }}
128121
{{- range . }}
129122
- name: {{ . }}
130123
{{- end }}
131-
{{- end }}
132-
{{- if or .Values.deployment.volumes .Values.persistence.enabled .Values.configMaps.enabled .Values.secrets.enabled }}
124+
{{- end }}
133125
volumes:
134-
{{- if .Values.deployment.volumes }}
135-
{{- toYaml .Values.deployment.volumes | nindent 6 }}
136-
{{- end }}
137126
{{- if .Values.persistence.enabled }}
138127
- name: storage
139128
{{- if .Values.persistence.enabled }}
@@ -144,6 +133,4 @@ spec:
144133
{{- end }}
145134
{{- end }}
146135
{{- include "monochart.files.volumes" . | nindent 6 }}
147-
{{- end }}
148-
149136
{{- end -}}

incubator/monochart/test/full.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@ deployment:
6565
## https://github.com/jtblin/kube2iam
6666
# iam.amazonaws.com/role: role-arn
6767
labels: {}
68-
69-
## Directly attach Volume
70-
volumeMounts:
71-
- name: apmsocketpath
72-
mountPath: /var/run/datadog
73-
volumes:
74-
- hostPath:
75-
path: /var/run/datadog/
76-
name: apmsocketpath
77-
7868
affinity:
7969
# use of simple rule
8070
affinityRule: "ShouldBeOnDifferentNode"

incubator/monochart/values.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,6 @@ deployment:
103103
labels: {}
104104
# command:
105105
args: []
106-
107-
volumeMounts: []
108-
# - name: apmsocketpath
109-
# mountPath: /var/run/datadog
110-
111-
volumes: []
112-
# - name: apmsocketpath
113-
# hostPath:
114-
# path: /var/run/datadog/
115106

116107
statefulset:
117108
enabled: false

0 commit comments

Comments
 (0)