diff --git a/chart/templates/coredns-configmap.yaml b/chart/templates/coredns-configmap.yaml index b39d546ab..e821191b5 100644 --- a/chart/templates/coredns-configmap.yaml +++ b/chart/templates/coredns-configmap.yaml @@ -35,7 +35,7 @@ data: {{ toYaml .Values.controlPlane.coredns.service.annotations | indent 8 }} {{- end }} labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns kubernetes.io/cluster-service: "true" kubernetes.io/name: "CoreDNS" {{- if .Values.controlPlane.coredns.service.labels }} @@ -126,7 +126,7 @@ data: {{ toYaml .Values.controlPlane.coredns.deployment.annotations | indent 8 }} {{- end }} labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns kubernetes.io/name: "CoreDNS" {{- if .Values.controlPlane.coredns.deployment.labels }} {{ toYaml .Values.controlPlane.coredns.deployment.labels | indent 8 }} @@ -139,7 +139,7 @@ data: maxUnavailable: 1 selector: matchLabels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns template: metadata: {{- if .Values.controlPlane.coredns.deployment.pods.annotations }} @@ -147,7 +147,7 @@ data: {{ toYaml .Values.controlPlane.coredns.deployment.pods.annotations | indent 12 }} {{- end }} labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns {{- if .Values.controlPlane.coredns.deployment.pods.labels }} {{ toYaml .Values.controlPlane.coredns.deployment.pods.labels | indent 12 }} {{- end }} @@ -258,7 +258,7 @@ data: {{ toYaml .Values.controlPlane.coredns.service.annotations | indent 8 }} {{- end }} labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns kubernetes.io/cluster-service: "true" kubernetes.io/name: "CoreDNS" {{- if .Values.controlPlane.coredns.service.labels }} @@ -268,7 +268,7 @@ data: {{ toYaml .Values.controlPlane.coredns.service.spec | indent 6 }} {{- if not .Values.controlPlane.coredns.service.spec.selector }} selector: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns {{- end }} {{- if not .Values.controlPlane.coredns.service.spec.ports }} ports: diff --git a/chart/templates/networkpolicy.yaml b/chart/templates/networkpolicy.yaml index efdf30f3c..4198bec64 100644 --- a/chart/templates/networkpolicy.yaml +++ b/chart/templates/networkpolicy.yaml @@ -94,7 +94,7 @@ spec: kubernetes.io/metadata.name: 'kube-system' podSelector: matchLabels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns {{- if .Values.policies.networkPolicy.outgoingConnections.platform }} - podSelector: matchLabels: diff --git a/chart/tests/coredns-configmap_test.yaml b/chart/tests/coredns-configmap_test.yaml index 263ce2b8d..88efcc4af 100644 --- a/chart/tests/coredns-configmap_test.yaml +++ b/chart/tests/coredns-configmap_test.yaml @@ -111,7 +111,7 @@ tests: name: coredns namespace: kube-system labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns kubernetes.io/name: "CoreDNS" spec: replicas: 1 @@ -121,11 +121,11 @@ tests: maxUnavailable: 1 selector: matchLabels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns template: metadata: labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns spec: priorityClassName: "" serviceAccountName: coredns @@ -134,7 +134,7 @@ tests: topologySpreadConstraints: - labelSelector: matchLabels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: DoNotSchedule @@ -212,13 +212,13 @@ tests: prometheus.io/port: "9153" prometheus.io/scrape: "true" labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns kubernetes.io/cluster-service: "true" kubernetes.io/name: "CoreDNS" spec: type: ClusterIP selector: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns ports: - name: dns port: 53 @@ -316,7 +316,7 @@ tests: prometheus.io/port: "9153" prometheus.io/scrape: "true" labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns kubernetes.io/cluster-service: "true" kubernetes.io/name: "CoreDNS" spec: @@ -441,7 +441,7 @@ tests: name: coredns namespace: kube-system labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns kubernetes.io/name: "CoreDNS" spec: replicas: 1 @@ -451,11 +451,11 @@ tests: maxUnavailable: 1 selector: matchLabels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns template: metadata: labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns spec: priorityClassName: "" serviceAccountName: coredns @@ -478,7 +478,7 @@ tests: topologySpreadConstraints: - labelSelector: matchLabels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: DoNotSchedule @@ -556,13 +556,13 @@ tests: prometheus.io/port: "9153" prometheus.io/scrape: "true" labels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns kubernetes.io/cluster-service: "true" kubernetes.io/name: "CoreDNS" spec: type: ClusterIP selector: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns ports: - name: dns port: 53 diff --git a/chart/values.yaml b/chart/values.yaml index 81ac67ad8..0490e84fb 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -478,7 +478,7 @@ controlPlane: whenUnsatisfiable: DoNotSchedule labelSelector: matchLabels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns # Service defines options for vCluster service deployed by Helm. service: diff --git a/config/values.yaml b/config/values.yaml index c4d81756d..1870f6aec 100644 --- a/config/values.yaml +++ b/config/values.yaml @@ -259,7 +259,7 @@ controlPlane: whenUnsatisfiable: DoNotSchedule labelSelector: matchLabels: - k8s-app: kube-dns + k8s-app: vcluster-kube-dns service: enabled: true diff --git a/test/framework/util.go b/test/framework/util.go index 5e6e0d885..546e88178 100644 --- a/test/framework/util.go +++ b/test/framework/util.go @@ -354,7 +354,7 @@ func (f *Framework) CreateEgressNetworkPolicyForDNS(ctx context.Context, ns stri }, To: []networkingv1.NetworkPolicyPeer{ { - PodSelector: &metav1.LabelSelector{MatchLabels: map[string]string{"k8s-app": "kube-dns"}}, + PodSelector: &metav1.LabelSelector{MatchLabels: map[string]string{"k8s-app": "vcluster-kube-dns"}}, NamespaceSelector: &metav1.LabelSelector{MatchLabels: map[string]string{"kubernetes.io/metadata.name": "kube-system"}}, }, },