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

fix(kuma-cp): retrieve name from owner not parsing pod name for Deployments/CronJob #5569

Merged
merged 8 commits into from
Jan 9, 2023
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
11 changes: 11 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ does not have any particular instructions.

## Upcoming release

## **Breaking changes**

### **Naming Serviceless dataplanes has changed**

Currently, the `kuma.io/service` value of the inbound of a `Dataplane` generated for a `Pod` without a `Service` is based on the `Pod` name. The Kuma CP takes the pod's name and removes 2 last elements after splitting by `-`. This behavior is correct when the `Pod` is owned by a `Deployment` or `CronJob` but not for other owner kinds. Kuma will now use the name of the owner resource as the `kuma.io/service` value.
Before upgrade:
1. Identify all `Service`less `Pods` that are not managed by a `Deployment` or `CronJob`.
2. Create copies of policies that were created for the services corresponding to these `Pods`. The `kuma.io/service` value is the name of the owner resource. If there is no owner, `Kuma` uses the `Pod`'s name.

This breaking change is required to provide correct naming. The previous behavior could produce the same `kuma.io/service` value of the inbound of a `Dataplane` for many different serviceless Dataplanes.

### http api

We've removed the endpoint `POST /tokens` which has been moved by `POST /tokens/dataplane` (same request and response) some time ago.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -119,6 +120,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -119,6 +120,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3745,6 +3745,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -3753,6 +3754,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3745,6 +3745,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -3753,6 +3754,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3878,6 +3878,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -3886,6 +3887,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -64,6 +65,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -64,6 +65,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -65,6 +66,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -64,6 +65,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -64,6 +65,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -74,6 +75,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3765,6 +3765,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -3773,6 +3774,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -64,6 +65,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -74,6 +75,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -64,6 +65,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ rules:
- "apps"
resources:
- deployments
- replicasets
verbs:
- create
- delete
Expand All @@ -64,6 +65,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- "batch"
resources:
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
Expand Down
Loading