Skip to content

Commit d8994a3

Browse files
authored
add init container option to helm chart (#62)
1 parent 3b9887e commit d8994a3

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

helm/gke-metadata-server/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type: application
3030
# This is the chart version. This version number should be incremented each time you make changes
3131
# to the chart and its templates, including the app version.
3232
# Versions are expected to follow Semantic Versioning (https://semver.org/)
33-
version: 0.2.0
33+
version: 0.2.1
3434

3535
# This is the version number of the application being deployed. This version number should be
3636
# incremented each time you make changes to the application. Versions are not expected to

helm/gke-metadata-server/templates/daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ spec:
4747
priorityClassName: {{ .Values.priorityClass }}
4848
hostNetwork: {{ .Values.hostNetwork }}
4949
dnsPolicy: ClusterFirstWithHostNet
50+
{{- if .Values.initContainers }}
51+
initContainers:
52+
{{- toYaml .Values.initContainers | nindent 6 }}
53+
{{- end }}
5054
containers:
5155
- name: server
5256
{{- if .Values.image.digest }}

helm/gke-metadata-server/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,10 @@ priorityClass: system-node-critical
8080

8181
# This Pod needs to listen on the host network, port 80.
8282
hostNetwork: true
83+
84+
# Pod .spec.initContainers. Can be used for initializing the Node loopback interface
85+
# with the the Google Metadata IP address (169.254.169.254) using the CLI "init-network"
86+
# command (see k8s/test-pod.yaml). This allows your pods to run without the sidecar,
87+
# but also requires the emulator to listen on port 80 (in the host network!). Please
88+
# assess the risk of opening port 80 in your Nodes before choosing this approach.
89+
initContainers:

0 commit comments

Comments
 (0)