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 5 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
18 changes: 15 additions & 3 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,28 @@ does not have any particular instructions.

## Upcoming release

### http api
### **List of breaking changes**
lukidzi marked this conversation as resolved.
Show resolved Hide resolved

#### **Naming of Serviceless has changed**
lukidzi marked this conversation as resolved.
Show resolved Hide resolved

Currently, serviceless pods' name is generated based on the `Pod` name. `Kuma-cp` takes the pod's name and removes 2 last elements after splitting by `-`. This behavior is correct when `Pod` is managed by `Deployment` or `CronJob` but not for other types. We've introduced the change that takes the name from the parent resource which breaks current behavior.
lukidzi marked this conversation as resolved.
Show resolved Hide resolved
Before upgrade:
1. Identify all serviceless pods that are not managed by `Deployment` or `CronJob`.
2. Create policies that were created for services but with a new name. The name is an owner name, in case there is no owner `Kuma` uses `Pod` name.
3. Upgrade `Kuma`.
lukidzi marked this conversation as resolved.
Show resolved Hide resolved
lukidzi marked this conversation as resolved.
Show resolved Hide resolved

### Other changes
lukidzi marked this conversation as resolved.
Show resolved Hide resolved

#### http api
lukidzi marked this conversation as resolved.
Show resolved Hide resolved

We've removed the endpoint `POST /tokens` which has been moved by `POST /tokens/dataplane` (same request and response) some time ago.
Make sure you are using a recent `kumactl` or that you use the right path if using the api directly to upgrade with no issues.

### Kubernetes
#### Kubernetes
lukidzi marked this conversation as resolved.
Show resolved Hide resolved

The sidecar container is always injected first (since [#5436](https://github.com/kumahq/kuma/pull/5436)). This should only impact you when modifying the sidecar container with a container-patch. If you do so, upgrade Kuma and then change your container patch to modify the right container.

### Kumactl
#### Kumactl
lukidzi marked this conversation as resolved.
Show resolved Hide resolved

`--valid-for` must be set for all token types, before it was defaulting to 10 years.

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