From 09964b934b2c7da150cef74b976786ebb6d88df8 Mon Sep 17 00:00:00 2001 From: Cyril Jouve Date: Tue, 11 Feb 2025 00:17:52 +0100 Subject: [PATCH] set dnsPolicy: ClusterFirstWithHostNet when hostNetwork is true --- charts/hnc/Chart.yaml | 2 +- charts/hnc/templates/replication/controller-manager-ha.yaml | 3 +++ charts/hnc/templates/replication/controller-manager.yaml | 3 +++ charts/hnc/templates/standalone/controller-manager.yaml | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/hnc/Chart.yaml b/charts/hnc/Chart.yaml index 8517705..7ba6d15 100644 --- a/charts/hnc/Chart.yaml +++ b/charts/hnc/Chart.yaml @@ -3,7 +3,7 @@ name: hnc description: Hierarchical Namespace Controller (HNC). Policies and delegated creation to Kubernetes namespaces. icon: https://raw.githubusercontent.com/KDE/breeze-icons/master/icons/actions/16/view-list-tree.svg type: application -version: 0.8.0 +version: 0.8.1 appVersion: v1.1.0 dependencies: - name: common diff --git a/charts/hnc/templates/replication/controller-manager-ha.yaml b/charts/hnc/templates/replication/controller-manager-ha.yaml index e101a63..cca54b6 100644 --- a/charts/hnc/templates/replication/controller-manager-ha.yaml +++ b/charts/hnc/templates/replication/controller-manager-ha.yaml @@ -40,6 +40,9 @@ spec: nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} hostNetwork: {{ .Values.hostNetwork }} + {{- if .Values.hostNetwork }} + dnsPolicy: ClusterFirstWithHostNet + {{- end }} containers: - args: - --webhook-server-port=9443 diff --git a/charts/hnc/templates/replication/controller-manager.yaml b/charts/hnc/templates/replication/controller-manager.yaml index dc2d280..713881a 100644 --- a/charts/hnc/templates/replication/controller-manager.yaml +++ b/charts/hnc/templates/replication/controller-manager.yaml @@ -31,6 +31,9 @@ spec: spec: {{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image) "context" $) | nindent 6 }} hostNetwork: {{ .Values.hostNetwork }} + {{- if .Values.hostNetwork }} + dnsPolicy: ClusterFirstWithHostNet + {{- end }} containers: - args: - --webhook-server-port=9443 diff --git a/charts/hnc/templates/standalone/controller-manager.yaml b/charts/hnc/templates/standalone/controller-manager.yaml index b7a47cd..7d4aa96 100644 --- a/charts/hnc/templates/standalone/controller-manager.yaml +++ b/charts/hnc/templates/standalone/controller-manager.yaml @@ -32,6 +32,9 @@ spec: spec: {{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image) "context" $) | nindent 6 }} hostNetwork: {{ .Values.hostNetwork }} + {{- if .Values.hostNetwork }} + dnsPolicy: ClusterFirstWithHostNet + {{- end }} containers: - args: - --webhook-server-port=9443