Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change vcluster coredns app label #2319

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions chart/templates/coredns-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -139,15 +139,15 @@ data:
maxUnavailable: 1
selector:
matchLabels:
k8s-app: kube-dns
k8s-app: vcluster-kube-dns
template:
metadata:
{{- if .Values.controlPlane.coredns.deployment.pods.annotations }}
annotations:
{{ 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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
26 changes: 13 additions & 13 deletions chart/tests/coredns-configmap_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ controlPlane:
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
k8s-app: kube-dns
k8s-app: vcluster-kube-dns

service:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion test/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}},
},
},
Expand Down
Loading