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

KEP-5040: Remove gitRepo volume driver. #5039

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vinayakankugoyal
Copy link
Contributor

@vinayakankugoyal vinayakankugoyal commented Jan 14, 2025

  • One-line PR description: Initial KEP to remove support for gitRepo volume driver.
  • Other comments:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 14, 2025
@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 14, 2025
@vinayakankugoyal vinayakankugoyal marked this pull request as draft January 14, 2025 01:46
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 14, 2025
@xing-yang
Copy link
Contributor

Can you open an enhancement issue? Are you planning to target Alpha in 1.33?

@vinayakankugoyal
Copy link
Contributor Author

Can you open an enhancement issue? Are you planning to target Alpha in 1.33?

#5040. Yeah we are planning to target Alpha in 1.33

@vinayakankugoyal vinayakankugoyal changed the title KEP-NNNN: remove gitRepo volume driver. KEP-5040: Remove gitRepo volume driver. Jan 14, 2025
@vinayakankugoyal
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jan 14, 2025
@vinayakankugoyal
Copy link
Contributor Author

/retest

@thockin thockin self-assigned this Jan 14, 2025
@vinayakankugoyal vinayakankugoyal marked this pull request as ready for review January 16, 2025 00:32
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 16, 2025
Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

I am LGTM on technicals - need th testing and release and PRR sections.

Comment on lines 177 to 166
We propose removing support for the in-tree gitRepo volume driver.

We acknowledge that this is highly unusual, but there are mitigating circumstances:
* gitRepo volume types can be exploited to gain remote code execution as root on the nodes as shown in [CVE-2024-10220](https://nvd.nist.gov/vuln/detail/cve-2024-10220)
* gitRepo has perfectly workable alternatives:
* Using [git-sync](https://github.com/kubernetes/git-sync)
* Using an initContainer. See https://kubernetes.io/docs/concepts/storage/volumes/#gitrepo for more details
* gitRepo has been deprecated for a long time and is unmaintained
* gitRepo has low usage (based on limited data)
* there exists precedent for removing volume drivers which were unmaintained like [glusterfs](https://kubernetes.io/docs/concepts/storage/volumes/#glusterfs)

Given this, we think kubernetes should EOL this feature with urgency.
Copy link
Contributor

Choose a reason for hiding this comment

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

💭 Who's “we“? KEPs are usually written in the persona of the Kubernetes project, or maybe of a lead SIG.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We here and in other locations is meant to represent the author(s). Would you like me to say the following instead?

"Give this, Kubernetes thinks it should EOL this feature with urgency."

keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
keps/sig-storage/5040-remove-gitrepo-driver/kep.yaml Outdated Show resolved Hide resolved
keps/sig-storage/5040-remove-gitrepo-driver/kep.yaml Outdated Show resolved Hide resolved
keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
@sftim
Copy link
Contributor

sftim commented Jan 17, 2025

@saad-ali I support this change, but the KEP document is not not ready to merge as implementable. It needs work.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 17, 2025
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@vinayakankugoyal vinayakankugoyal force-pushed the gitRepo branch 3 times, most recently from 42ef30b to bb72740 Compare January 17, 2025 21:35
Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

[took a first pass as PRR Shadow]

Independently: personal +1 for this effort overall, thank you.

**For non-optional features moving to GA, the graduation criteria must include
[conformance tests].**

[conformance tests]: https://git.k8s.io/community/contributors/devel/sig-architecture/conformance-tests.md
Copy link
Member

Choose a reason for hiding this comment

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

Noting: We do not have a conformance test for this volume type: https://github.com/kubernetes/kubernetes/blob/master/test/conformance/testdata/conformance.yaml

node_e2e tests are not conformance tests, and I think for this "feature" it's reasonable to not have one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved

### Validating Admission Policy

Users can prevent workloads with gitRepo volumes from being admitted
Copy link
Member

Choose a reason for hiding this comment

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

Should we discuss creating a git repo to hold VAPs like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we just put the VAP in the gitRepo volume documentation here?

Copy link
Contributor

Choose a reason for hiding this comment

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

@thockin I think we should, and we should try to make that allow for a future, more rich way to manage add ons.

I know maybe WAGNI (we ain't gonna need it), but at least some demand is there.

Should we just put the VAP in the gitRepo volume documentation here?

No, partly because of kubernetes/website#42590 (the detailed list of volume types doesn't really belong in that page) and partly because I wouldn't put it there.
We could put the VAP in the removal announcement and make it evergreen; after we do that, other pages can hyperlink there. Hyperlinking to more detail is the right approach.

Copy link
Member

Choose a reason for hiding this comment

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

@sftim:

We could put the VAP in the removal announcement and make it evergreen;

Fotr the less clueful, what does that mean concretely?

Copy link
Contributor

@sftim sftim Jan 28, 2025

Choose a reason for hiding this comment

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

[evergreen]

See https://kubernetes.io/docs/contribute/new-content/blogs-case-studies/#guidelines-and-expectations and kubernetes/website#31934

Also https://kubernetes.io/docs/contribute/new-content/blogs-case-studies/#technical-considerations-for-submitting-a-blog-post for what front matter you set.

@thockin I noted your encyclopedic knowledge on many things Kubernetes and inferred you'd know this detail. Sorry about that.

Copy link
Member

Choose a reason for hiding this comment

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

Definitely arch, perhaps security given at least the first one we'd propose there?
I imagine cluster lifecycle would appreciate at least FYI as well, though that may steer things into the addon-management topic :+)

Copy link
Member

Choose a reason for hiding this comment

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

[Also, this is not a blocker for the KEP, I think it's a good idea to publish a VAP, and we need to find an appropriate home, but I don't think the repo needs to be a hard requirement]

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd want to block off-by-default on having this in place. But not a merge of this PR.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think we should plan to publish a VAP somewhere, and that should exist by off-by-default, but for alpha it can be a detail we're working out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added that we plan to publish the VAPs to a public repository both in the VAP section and in the graduation criteria section.

@vinayakankugoyal vinayakankugoyal force-pushed the gitRepo branch 6 times, most recently from 8169ca0 to e99c213 Compare January 19, 2025 19:42
Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

Whose approvals do we need to secure to get this merged? PRR obviously, and @saad-ali has already approved - anyone else?

/approve

keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
Recall that end users cannot usually observe component logs or access metrics.
-->

- [ ] Events
Copy link
Member

Choose a reason for hiding this comment

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

Should kubelet issue an event that it used an insecure volume?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there precedent for doing that?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think so, but that doesn't make a bad idea out of hand :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't mean to suggest that it was a bad idea, actually sounds like a good idea, I'm just not sure if its possible because I don't know enough about how those events are generated.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not saying it's a great idea either :) - it's an idea, please consider it and apply your context and wisdom.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: saad-ali, thockin, vinayakankugoyal
Once this PR has been reviewed and has the lgtm label, please ask for approval from jpbetz. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 28, 2025
@vinayakankugoyal vinayakankugoyal force-pushed the gitRepo branch 2 times, most recently from f89e04e to 0ca41e9 Compare January 28, 2025 22:20
Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

This is looking good to me as a PRR shadow, making some remaining minor non-blocking suggestions. Thanks!

keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
keps/sig-storage/5040-remove-gitrepo-driver/README.md Outdated Show resolved Hide resolved
@vinayakankugoyal vinayakankugoyal force-pushed the gitRepo branch 2 times, most recently from 53125eb to ba70c27 Compare January 31, 2025 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lead-opted-in Denotes that an issue has been opted in to a release ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants