-
Notifications
You must be signed in to change notification settings - Fork 217
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
Moves hostpath driver from kubernetes-csi/drivers monorepo #1
Moves hostpath driver from kubernetes-csi/drivers monorepo #1
Conversation
Signed-off-by: Huamin Chen <[email protected]>
add hostpath driver to test create/delete volume
Signed-off-by: Huamin Chen <[email protected]>
hostpath: create and delete volume
Signed-off-by: Huamin Chen <[email protected]>
hostpath: mount volume
Refactor based on feedback from @jsafrane
CSI based ISCSI driver
…loyment images - Test end to end
- Add csi-nodeplugin-simplenfs-flexdriver dockerfile & kubernetes dep…
Fix annotation
Refactor to app & pkg directories
add csi cinder driver
deploy/deploy-hostpath.sh
Outdated
# where it is executed. | ||
|
||
K8S_RELEASE=${K8S_RELEASE:-"release-1.13"} | ||
CSI_RELEASE=${CSI_RELEASE:-"release-1.0"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these two variables are a bit misleading. Instead of selecting one particular, well-tested release they reference the latest code in certain release branches.
I understand that this is easier to implement and review, but is it really what we want?
I personally would prefer a solution where for each of the sidecars we install exactly the RBAC rules released together with that sidecar image.
There's also no guarantee that we will always have the same release branch for all apps. For example, we might release an external-provisioner 1.1.0 on a release-1.1 branch while the rest need no major new release and thus stay on the release-1.0 branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One way to avoid duplicating the versions of the sidecars would be to grep for each image in the .yaml file and rename it with sed to obtain the corresponding RBAC yaml URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pohly I am taking a simple approach, in the next push, to just create a variable for each component. That way user of the script can set versions independently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment that explains the simplification and warns about the downside ("pick the latest version on a branch, which might not match what was released together with the current set of containers")?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and changed it so that the version for the RBAC files is taken from the version in the .yaml: vladimirvivien@557d126
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: csi-node-sa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this entire file is obsolete.
The hostpath driver should use the RBAC rules required by the csi-node-driver-registrar. At least on master, that file was removed (kubernetes-csi/node-driver-registrar#7 (comment)), but the release-1.0 still has it and therefore it should be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pohly Ok removed the rbac rule for node-driver-registrar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably haven't pushed that change yet, have you? I updated the version of the node-driver-registrar
and in the process removed the RBAC file and service account because it was removed also from that new release: vladimirvivien@76766f1
app/main.go
Outdated
/* | ||
Copyright 2017 The Kubernetes Authors. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move to a cmd/hostpathplugin
directory.
deploy/deploy-hostpath.sh
Outdated
|
||
# apply CSIDriver and CSINodeInfo API objects | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/csi-api/${K8S_RELEASE}/pkg/crd/manifests/csidriver.yaml --validate=false | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/csi-api/${K8S_RELEASE}/pkg/crd/manifests/csinodeinfo.yaml --validate=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not always needed, is it?
Worse, can it fail when the CRDs were already installed, which (if I'm not mistaken) is how clusters now should be brought up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pohly I don't have a good fix for this. I will add a flag (or try to detect if they are there) to install only when needed. Thanks for pointing this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with how this is now handled (installation disabled by default).
44f210d
to
57bcb23
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vladimirvivien If they are not already assigned, you can assign the PR to them by writing 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 |
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
57bcb23
to
2bd6115
Compare
The RBAC rules were already obsolete before and in 1.0.2 they were also removed officially (https://github.com/kubernetes-csi/node-driver-registrar/releases/tag/v1.0.2).
Picking the RBAC rules from a release branch is not quite accurate (we want the rules released together with the tagged version) and is something that must be kept in sync manually. It is better to not hard-code this in the script and instead get the exact versions from the .yaml files. There should be no need for users to pass parameters to the script, so let's just mention that this is possible without going into details in the README.md. The previous instructions were out-dated, too.
/lgtm We can merge this PR as-is right now and then merge vladimirvivien#1 on top of it, or @vladimirvivien can accept it into his branch and then we merge here. I'm fine with both approaches. |
deployment tweaks
New changes are detected. LGTM label has been removed. |
/lgtm @saad-ali you might have to push this PR directly to master because of the CLA check for some of the commits that this is pulling in from the old repo. @dims ran into a similar issue with moving code into kubernetes/utils, see kubernetes/utils#55 (comment) for the suggested solution (same as above). |
Ack merging |
initial content
This PR is to setup and migrate the Hostpath CSI driver from the github.com/kubernetes-csi/drivers mono repo to its own repository.
deploy/deploy-hostpath.sh
to automatically install hostpath in cluster