Skip to content

Commit

Permalink
Support setting HostNetwork and DnsPolicy using helm chart values (
Browse files Browse the repository at this point in the history
…#460)

Issue #, if available:

Description of changes:
- Support setting `HostNetwork` and `DnsPolicy` using helm chart values

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
kahirokunn authored Sep 14, 2023
1 parent daee073 commit 892f29d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion templates/config/controller/deployment.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ spec:
terminationGracePeriodSeconds: 10
serviceAccountName: {{ .ServiceAccountName }}
hostIPC: false
hostNetwork: false
hostPID: false
hostNetwork: false
dnsPolicy: ClusterFirst
3 changes: 2 additions & 1 deletion templates/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ spec:
priorityClassName: {{ .Values.deployment.priorityClassName }}
{{ end -}}
hostIPC: false
hostNetwork: false
hostPID: false
hostNetwork: {{ .Values.deployment.hostNetwork }}
dnsPolicy: {{ .Values.deployment.dnsPolicy }}
volumes:
{{- if .Values.aws.credentials.secretName -}}
- name: {{ .Values.aws.credentials.secretName }}
Expand Down
13 changes: 11 additions & 2 deletions templates/helm/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ deployment:
# Which priorityClassName to set?
# See: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority
priorityClassName: ""
# Specifies the hostname of the Pod.
# If not specified, the pod's hostname will be set to a system-defined value.
hostNetwork: false
# Set DNS policy for the pod.
# Defaults to "ClusterFirst".
# Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.
# To have DNS options set along with hostNetwork, you have to specify DNS policy
# explicitly to 'ClusterFirstWithHostNet'.
dnsPolicy: ClusterFirst
extraVolumes: []
extraVolumeMounts: []

Expand All @@ -56,7 +65,7 @@ deployment:
# If "installScope: cluster" then these labels will be applied to ClusterRole
role:
labels: {}

metrics:
service:
# Set to true to automatically create a Kubernetes Service resource for the
Expand Down Expand Up @@ -84,7 +93,7 @@ aws:
# Secret stringData key that contains the credentials
secretKey: "credentials"
# Profile used for AWS credentials
profile: "default"
profile: "default"

# log level for the controller
log:
Expand Down

0 comments on commit 892f29d

Please sign in to comment.