Skip to content

Commit

Permalink
add init container option to helm chart (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheuscscp authored Jan 10, 2024
1 parent 3b9887e commit d8994a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helm/gke-metadata-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.2.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 4 additions & 0 deletions helm/gke-metadata-server/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ spec:
priorityClassName: {{ .Values.priorityClass }}
hostNetwork: {{ .Values.hostNetwork }}
dnsPolicy: ClusterFirstWithHostNet
{{- if .Values.initContainers }}
initContainers:
{{- toYaml .Values.initContainers | nindent 6 }}
{{- end }}
containers:
- name: server
{{- if .Values.image.digest }}
Expand Down
7 changes: 7 additions & 0 deletions helm/gke-metadata-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,10 @@ priorityClass: system-node-critical

# This Pod needs to listen on the host network, port 80.
hostNetwork: true

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

0 comments on commit d8994a3

Please sign in to comment.