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

kube play: update the handling of PersistentVolumeClaim #16420

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

ygalblum
Copy link
Contributor

@ygalblum ygalblum commented Nov 6, 2022

Up - do not fail if volume already exists, use the existing one
Down - allow the user to remove the volume by passing --force
Add tests

Signed-off-by: Ygal Blum [email protected]

Does this PR introduce a user-facing change?

kube play: update the handling of PersistentVolumeClaim - reuse existing volumes and allow their removal with down

Resolves #16348

@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Nov 6, 2022
@ygalblum ygalblum force-pushed the kube_volume_down branch 3 times, most recently from 5f3babf to a5f5e65 Compare November 7, 2022 08:08
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM.

Are you intending to use that in the podman-kube@ template? If so, we need to massage that a bit I guess. kube play --replace does not remove volumes. It may be worth adding a StartPre directive using kube down.

cmd/podman/kube/down.go Show resolved Hide resolved
@vrothberg
Copy link
Member

vrothberg commented Nov 7, 2022

@baude @mheon PTAL

cmd/podman/kube/play.go Outdated Show resolved Hide resolved
@mheon
Copy link
Member

mheon commented Nov 7, 2022

Bunch of little things, overall looks fine

Up - do not fail if volume already exists, use the existing one
Down - allow the user to remove the volume by passing --force
Add tests
Update the documentation

Signed-off-by: Ygal Blum <[email protected]>
@rhatdan
Copy link
Member

rhatdan commented Nov 8, 2022

@umohnani8 PTAL

@umohnani8
Copy link
Member

code LGTM

@rhatdan
Copy link
Member

rhatdan commented Nov 8, 2022

/approve
/lgtm
/hold

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Nov 8, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 8, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan, ygalblum

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 8, 2022
@rhatdan
Copy link
Member

rhatdan commented Nov 8, 2022

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 8, 2022
@openshift-merge-robot openshift-merge-robot merged commit d720440 into containers:main Nov 8, 2022
@ygalblum ygalblum deleted the kube_volume_down branch November 8, 2022 14:38
@baude
Copy link
Member

baude commented Nov 17, 2022

/cherry-pick v4.3

@openshift-cherrypick-robot
Copy link
Collaborator

@baude: #16420 failed to apply on top of branch "v4.3":

Applying: kube play: update the handling of PersistentVolumeClaim
Using index info to reconstruct a base tree...
M	docs/source/markdown/podman-kube-play.1.md.in
M	pkg/api/handlers/libpod/kube.go
M	pkg/api/server/register_kube.go
M	pkg/bindings/kube/kube.go
M	pkg/bindings/kube/types.go
M	pkg/domain/entities/play.go
M	pkg/domain/infra/abi/play.go
A	pkg/domain/infra/tunnel/kube.go
M	test/e2e/play_kube_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/play_kube_test.go
Auto-merging pkg/domain/infra/tunnel/generate.go
CONFLICT (content): Merge conflict in pkg/domain/infra/tunnel/generate.go
Auto-merging pkg/domain/infra/abi/play.go
Auto-merging pkg/domain/entities/play.go
CONFLICT (content): Merge conflict in pkg/domain/entities/play.go
Auto-merging pkg/bindings/kube/types.go
CONFLICT (content): Merge conflict in pkg/bindings/kube/types.go
Auto-merging pkg/bindings/kube/kube.go
Auto-merging pkg/api/server/register_kube.go
Auto-merging pkg/api/handlers/libpod/kube.go
Auto-merging docs/source/markdown/podman-kube-play.1.md.in
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 kube play: update the handling of PersistentVolumeClaim
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick v4.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Change to remote API; merits scrutiny lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

play kube: cannot restart pod with named volumes
8 participants