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

Add support for play/generate kube PersistentVolumeClaims and Podman volumes #9935

Merged

Conversation

EduardoVega
Copy link
Contributor

Signed-off-by: Eduardo Vega [email protected]

This PR provides the ability to support Kubernetes PersistentVolumeClaims for podman play or generate kube. A k8s PersistentVolumeClaim represents a Podman volume, only the PVC name is required to create the volume. Podman volume options can be set using PVC annotations.

This is based on this PR #8266 and related to this Issue #5788.

@TomSweeneyRedHat
Copy link
Member

@EduardoVega looks like you've some trailing space issues.
Otherwise this LGTM

@EduardoVega EduardoVega force-pushed the 5788-kube-volume branch 5 times, most recently from 6e14a90 to 854679d Compare April 6, 2021 20:12
@rhatdan
Copy link
Member

rhatdan commented Apr 7, 2021

/approve
@umohnani8 @haircommander PTAL

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

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

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2021
// attributes, so they can be configured using annotations since they will not affect k8s.
for k, v := range pvcYAML.GetAnnotations() {
switch k {
case "podman.volume/driver":
Copy link
Collaborator

Choose a reason for hiding this comment

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

2 questions for consideration:

  • should these be kept as constants anywhere?
  • often, these special annotations follow the format of a url: io.podman.volume does it make sense to apply that here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Let me change that.
  2. You're correct. The url format does not provide any special functionality but it is better to stick to the k8s syntax. What about something like this volume.podman.io/driver based on node.kubernetes.io/instance-type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been changed.

@haircommander
Copy link
Collaborator

A couple of questions but none of them blocking. This looks great @EduardoVega, I especially like the idea about using annotations to get special podman options

@rhatdan
Copy link
Member

rhatdan commented Apr 12, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2021
@rhatdan
Copy link
Member

rhatdan commented Apr 12, 2021

Thanks @EduardoVega

@openshift-merge-robot openshift-merge-robot merged commit 9d3e310 into containers:master Apr 12, 2021
@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 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants