-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(kuma-cp): fix issue with pod labels overriding existing dataplane…
… labels (#12589) Fixes: #12142 ## Motivation We should not override already present dataplane labels with pod labels <!-- > Changelog: skip --> <!-- Uncomment the above section to explicitly set a [`> Changelog:` entry here](https://github.com/kumahq/kuma/blob/master/CONTRIBUTING.md#submitting-a-patch)? --> --------- Signed-off-by: Marcin Skalski <skalskimarcin33@gmail.com>
- Loading branch information
Showing
30 changed files
with
342 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/egress/01.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/egress/02.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/egress/03.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/egress/04.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/egress/05.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
pkg/plugins/runtime/k8s/controllers/testdata/egress/egress-exists-labels.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app: kuma-egress | ||
k8s.kuma.io/namespace: kuma-system | ||
kuma.io/proxy-type: zoneegress | ||
test: new | ||
spec: | ||
networking: | ||
address: 192.168.0.1 | ||
port: 10002 | ||
zone: zone-1 |
12 changes: 12 additions & 0 deletions
12
...gins/runtime/k8s/controllers/testdata/egress/egress-exists-labels.existing-dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app: kuma-egress | ||
k8s.kuma.io/namespace: kuma-system | ||
kuma.io/proxy-type: zoneegress | ||
test: old | ||
spec: | ||
networking: | ||
address: 192.168.0.1 | ||
port: 10002 | ||
zone: zone-1 |
8 changes: 8 additions & 0 deletions
8
pkg/plugins/runtime/k8s/controllers/testdata/egress/egress-exists-labels.node.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Node | ||
metadata: | ||
name: sample-node | ||
status: | ||
addresses: | ||
- address: 10.128.15.193 | ||
type: InternalIP |
14 changes: 14 additions & 0 deletions
14
pkg/plugins/runtime/k8s/controllers/testdata/egress/egress-exists-labels.pod.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
metadata: | ||
namespace: kuma-system | ||
name: kuma-egress | ||
labels: | ||
app: kuma-egress | ||
test: new | ||
annotations: | ||
kuma.io/egress: enabled | ||
spec: | ||
containers: | ||
- ports: | ||
- containerPort: 10002 | ||
status: | ||
podIP: 192.168.0.1 |
12 changes: 12 additions & 0 deletions
12
...lugins/runtime/k8s/controllers/testdata/egress/egress-exists-labels.services-for-pod.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
metadata: | ||
namespace: kuma-system | ||
name: kuma-egress | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 10002 | ||
targetPort: 10002 | ||
nodePort: 12345 | ||
selector: | ||
app: kuma-egress |
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/ingress/01.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/ingress/02.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/ingress/03.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/ingress/04.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/ingress/05.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
pkg/plugins/runtime/k8s/controllers/testdata/ingress/06.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
pkg/plugins/runtime/k8s/controllers/testdata/ingress/ingress-exists-labels.dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app: kuma-ingress | ||
k8s.kuma.io/namespace: kuma-system | ||
kuma.io/proxy-type: zoneingress | ||
test: new | ||
spec: | ||
availableServices: | ||
- instances: 3 | ||
mesh: mesh-1 | ||
tags: | ||
kuma.io/protocol: http | ||
kuma.io/service: service-1-zone-2 | ||
networking: | ||
address: 192.168.0.1 | ||
advertisedAddress: 192.168.100.1 | ||
advertisedPort: 10001 | ||
port: 10001 |
16 changes: 16 additions & 0 deletions
16
...ns/runtime/k8s/controllers/testdata/ingress/ingress-exists-labels.existing-dataplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
test: old | ||
spec: | ||
availableServices: | ||
- instances: 3 | ||
mesh: mesh-1 | ||
tags: | ||
kuma.io/protocol: http | ||
kuma.io/service: service-1-zone-2 | ||
networking: | ||
address: 192.168.0.1 | ||
advertisedAddress: 192.168.100.1 | ||
advertisedPort: 10001 | ||
port: 10001 |
Oops, something went wrong.