Skip to content

Commit

Permalink
feat(helm): add value to customize kubeletDir (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
asteinba authored Oct 4, 2023
1 parent bd179ff commit 501fbe3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
2 changes: 2 additions & 0 deletions chart/.snapshots/full.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ node:
imagePullPolicy: Always
command: [ 'sh', '-c', 'echo "hello world"' ]

kubeletDir: /var/lib/k0s/kubelet

serviceAccount:
annotations:
service-account-annotation: service-account-annotation
Expand Down
10 changes: 5 additions & 5 deletions chart/.snapshots/full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ spec:
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.7.0
imagePullPolicy: Always
args:
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi.hetzner.cloud/socket
- --kubelet-registration-path=/var/lib/k0s/kubelet/plugins/csi.hetzner.cloud/socket
volumeMounts:
- name: plugin-dir
mountPath: /run/csi
Expand Down Expand Up @@ -298,7 +298,7 @@ spec:
command: [/bin/hcloud-csi-driver-node]
volumeMounts:
- name: kubelet-dir
mountPath: /var/lib/kubelet
mountPath: /var/lib/k0s/kubelet
mountPropagation: "Bidirectional"
- name: plugin-dir
mountPath: /run/csi
Expand Down Expand Up @@ -371,15 +371,15 @@ spec:
volumes:
- name: kubelet-dir
hostPath:
path: /var/lib/kubelet
path: /var/lib/k0s/kubelet
type: Directory
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/csi.hetzner.cloud/
path: /var/lib/k0s/kubelet/plugins/csi.hetzner.cloud/
type: DirectoryOrCreate
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/
path: /var/lib/k0s/kubelet/plugins_registry/
type: Directory
- name: device-dir
hostPath:
Expand Down
10 changes: 5 additions & 5 deletions chart/templates/node/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
image: {{ tpl .Values.node.image.csiNodeDriverRegistrar.name . }}
imagePullPolicy: {{ .Values.node.image.csiNodeDriverRegistrar.pullPolicy }}
args:
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi.hetzner.cloud/socket
- --kubelet-registration-path={{ .Values.node.kubeletDir }}/plugins/csi.hetzner.cloud/socket
volumeMounts:
- name: plugin-dir
mountPath: /run/csi
Expand All @@ -104,7 +104,7 @@ spec:
command: [/bin/hcloud-csi-driver-node]
volumeMounts:
- name: kubelet-dir
mountPath: /var/lib/kubelet
mountPath: {{ .Values.node.kubeletDir }}
mountPropagation: "Bidirectional"
- name: plugin-dir
mountPath: /run/csi
Expand Down Expand Up @@ -158,15 +158,15 @@ spec:
volumes:
- name: kubelet-dir
hostPath:
path: /var/lib/kubelet
path: {{ .Values.node.kubeletDir }}
type: Directory
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/csi.hetzner.cloud/
path: {{ .Values.node.kubeletDir }}/plugins/csi.hetzner.cloud/
type: DirectoryOrCreate
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/
path: {{ .Values.node.kubeletDir }}/plugins_registry/
type: Directory
- name: device-dir
hostPath:
Expand Down
3 changes: 3 additions & 0 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,9 @@
"initContainers": {
"type": "array"
},
"kubeletDir": {
"type": "string"
},
"lifecycleHooks": {
"type": "object"
},
Expand Down
14 changes: 10 additions & 4 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ controller:
## - myRegistryKeySecretName
##
pullSecrets: []

livenessProbe:
name: registry.k8s.io/sig-storage/livenessprobe:v2.9.0
## Specify a imagePullPolicy
Expand Down Expand Up @@ -165,7 +165,7 @@ controller:
## @param controller.service.ports.metrics controller service metrics port
ports:
metrics: 9189

## @param controller.service.annotations Additional custom annotations for controller service
annotations: {}

Expand Down Expand Up @@ -395,7 +395,7 @@ node:
## - myRegistryKeySecretName
##
pullSecrets: []

livenessProbe:
name: registry.k8s.io/sig-storage/livenessprobe:v2.9.0
## Specify a imagePullPolicy
Expand Down Expand Up @@ -443,7 +443,7 @@ node:
##
ports:
metrics: 9189

## @param node.service.annotations Additional custom annotations for node service
##
annotations: {}
Expand Down Expand Up @@ -621,6 +621,12 @@ node:
##
initContainers: []

## @param node.kubeletDir Location of the /var/lib/kubelet directory as some k8s distribution differ from the standard.
## e.g:
## kubeletDir: /var/lib/k0s/kubelet
##
kubeletDir: /var/lib/kubelet

## @section Other Parameters
##

Expand Down

0 comments on commit 501fbe3

Please sign in to comment.