Skip to content

Commit

Permalink
Merge pull request loft-sh#2319 from rmweir/coredns-label
Browse files Browse the repository at this point in the history
Change vcluster coredns app label
  • Loading branch information
FabianKramm authored Dec 9, 2024
2 parents b611b0f + 928e4de commit 4f11a08
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
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

0 comments on commit 4f11a08

Please sign in to comment.