-
Notifications
You must be signed in to change notification settings - Fork 140
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
make kubelet path configurable from helm values #110
make kubelet path configurable from helm values #110
Conversation
Hi @boddumanohar. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Pull Request Test Coverage Report for Build 244151853
💛 - Coveralls |
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.
thanks for the contribution.
Could you only make change on master branch? and also add a new parameter in charts/README.md description, thanks.
@andyzhangx I am sorry, Did you mean to say to keep the changes in only |
yes, only make change in |
1cfd600
to
48c1188
Compare
Update:
|
charts/README.md
Outdated
@@ -70,6 +70,7 @@ The following table lists the configurable parameters of the latest SMB CSI Driv | |||
| `windows.image.nodeDriverRegistrar.repository` | windows csi-node-driver-registrar docker image | mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar | | |||
| `windows.image.nodeDriverRegistrar.tag` | windows csi-node-driver-registrar docker image tag | v1.2.1-alpha.1-windows-1809-amd64 | | |||
| `windows.image.nodeDriverRegistrar.pullPolicy` | windows csi-node-driver-registrar image pull policy | IfNotPresent | | |||
| `kubelet.path` | configure the kubelet path | `/var/lib/kubelet/` | |
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 would suggest set /var/lib/kubelet
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.
use /var/lib/kubelet/
may cause error in volumeMounts string concatenate
@@ -115,15 +115,15 @@ spec: | |||
memory: 20Mi | |||
volumes: | |||
- hostPath: | |||
path: /var/lib/kubelet/plugins/smb.csi.k8s.io | |||
path: {{ .Values.kubelet.path }}plugins/smb.csi.k8s.io |
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.
{{ .Values.kubelet.path }}/plugins/smb.csi.k8s.io
type: DirectoryOrCreate | ||
name: mountpoint-dir | ||
- hostPath: | ||
path: /var/lib/kubelet/plugins_registry/ | ||
path: {{ .Values.kubelet.path }}plugins_registry/ |
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.
{{ .Values.kubelet.path }}/plugins_registry/
@@ -103,7 +103,7 @@ spec: | |||
volumeMounts: | |||
- mountPath: /csi | |||
name: socket-dir | |||
- mountPath: /var/lib/kubelet/ | |||
- mountPath: {{ .Values.kubelet.path }} |
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.
don't need to change value here, it's inside container, let's keep /var/lib/kubelet/
@@ -53,7 +53,7 @@ spec: | |||
- name: ADDRESS | |||
value: /csi/csi.sock | |||
- name: DRIVER_REG_SOCK_PATH | |||
value: /var/lib/kubelet/plugins/smb.csi.k8s.io/csi.sock | |||
value: {{ .Values.kubelet.path }}plugins/smb.csi.k8s.io/csi.sock |
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.
don't need to change value here, it's inside container, let's keep /var/lib/kubelet/
eee19ee
to
37b04dc
Compare
/ok-to-test |
updated as per comments. |
@@ -43,3 +43,6 @@ windows: | |||
repository: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar | |||
tag: v1.2.1-alpha.1-windows-1809-amd64 | |||
pullPolicy: IfNotPresent | |||
|
|||
kubelet: | |||
path: /var/lib/kubelet |
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.
actually there is windows kubelet too, by default it's C:\var\lib\kubelet
, so it could better be:
kubelet:
linuxPath: /var/lib/kubelet
windowsPath: 'C:\var\lib\kubelet'
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.
Ok. What value should I specify for volumes.hostPath
? Earlier we have only one(Kubelet.path
) but now we will have to values: kubelet.linuxPath
and Kubelet.windowsPath
. Is there's a way to conditionally take values in helm based on Node Types(windows or linux)?
Or Else can have one more parameter called: node.os
(supported values: windows
, linux
). If the node.os
is windows
, then we use windows paths or else we use linux paths.
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 only need to change hostPath field here:
csi-driver-smb/charts/latest/csi-driver-smb/templates/csi-smb-node-windows.yaml
Lines 129 to 140 in 99b7bbe
- name: registration-dir | |
hostPath: | |
path: C:\var\lib\kubelet\plugins_registry\ | |
type: Directory | |
- name: kubelet-dir | |
hostPath: | |
path: C:\var\lib\kubelet\ | |
type: Directory | |
- name: plugin-dir | |
hostPath: | |
path: C:\var\lib\kubelet\plugins\smb.csi.k8s.io\ | |
type: DirectoryOrCreate |
37b04dc
to
e2fb804
Compare
Thanks, updated as per comments. |
charts/README.md
Outdated
@@ -70,6 +70,8 @@ The following table lists the configurable parameters of the latest SMB CSI Driv | |||
| `windows.image.nodeDriverRegistrar.repository` | windows csi-node-driver-registrar docker image | mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar | | |||
| `windows.image.nodeDriverRegistrar.tag` | windows csi-node-driver-registrar docker image tag | v1.2.1-alpha.1-windows-1809-amd64 | | |||
| `windows.image.nodeDriverRegistrar.pullPolicy` | windows csi-node-driver-registrar image pull policy | IfNotPresent | | |||
| `kubelet.linuxPath` | configure the kubelet path for linux nodes | `/var/lib/kubelet` | |
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.
for Linux node
charts/README.md
Outdated
@@ -70,6 +70,8 @@ The following table lists the configurable parameters of the latest SMB CSI Driv | |||
| `windows.image.nodeDriverRegistrar.repository` | windows csi-node-driver-registrar docker image | mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar | | |||
| `windows.image.nodeDriverRegistrar.tag` | windows csi-node-driver-registrar docker image tag | v1.2.1-alpha.1-windows-1809-amd64 | | |||
| `windows.image.nodeDriverRegistrar.pullPolicy` | windows csi-node-driver-registrar image pull policy | IfNotPresent | | |||
| `kubelet.linuxPath` | configure the kubelet path for linux nodes | `/var/lib/kubelet` | | |||
| `kubelet.windowsPath` | configure the kubelet path windows nodes | `'C:\var\lib\kubelet'` | |
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.
for Windows node
e2fb804
to
68ac597
Compare
updated as per comments |
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, boddumanohar 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 |
…-workaround prow.sh: work around "kind build node-image" failure
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Typically when setting kubernetes, the Kubelet path varies for different kind of setups. For example in Racher2 boxes, the Kubelet path is
/opt/rke/var/lib/kubelet/
not/var/lib/kubelet/
The changes in this PR help make the Kubelet path configurable from helm template
Which issue(s) this PR fixes:
Fixes #69
Requirements:
Special notes for your reviewer:
Release note: