Skip to content

Commit

Permalink
Parameterize kubelet path for s3-csi manifests (kubeflow#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomcli authored Apr 1, 2022
1 parent 7b692b6 commit 9adc788
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion install/v1.2.0/kfp-tekton.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3289,4 +3289,4 @@ webhooks:
namespace: tekton-pipelines
failurePolicy: Fail
name: validation.webhook.pipelineloop.custom.tekton.dev
sideEffects: None
sideEffects: None
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ spec:
args:
- --v=5
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=/var/data/kubelet/plugins/kfp-csi-s3/csi.sock
- --kubelet-registration-path=$(kubelet-path)/kubelet/plugins/kfp-csi-s3/csi.sock
securityContext:
# This is necessary only for systems with SELinux, where
# non-privileged sidecar containers cannot access unix domain socket
Expand Down Expand Up @@ -414,22 +414,22 @@ spec:
volumeMounts:
- mountPath: /csi
name: socket-dir
- mountPath: /var/data/kubelet/pods
- mountPath: $(kubelet-path)/kubelet/pods
mountPropagation: Bidirectional
name: mountpoint-dir
- mountPath: /dev
name: dev-dir
volumes:
- hostPath:
path: /var/data/kubelet/plugins/kfp-csi-s3
path: $(kubelet-path)/kubelet/plugins/kfp-csi-s3
type: DirectoryOrCreate
name: socket-dir
- hostPath:
path: /var/data/kubelet/pods
path: $(kubelet-path)/kubelet/pods
type: DirectoryOrCreate
name: mountpoint-dir
- hostPath:
path: /var/data/kubelet/plugins_registry
path: $(kubelet-path)/kubelet/plugins_registry
type: Directory
name: registration-dir
- hostPath:
Expand Down Expand Up @@ -475,7 +475,7 @@ spec:
name: socket-dir
volumes:
- hostPath:
path: /var/data/kubelet/plugins/kfp-csi-s3
path: $(kubelet-path)/kubelet/plugins/kfp-csi-s3
type: DirectoryOrCreate
name: socket-dir
---
Expand Down Expand Up @@ -517,7 +517,7 @@ spec:
name: socket-dir
volumes:
- hostPath:
path: /var/data/kubelet/plugins/kfp-csi-s3
path: $(kubelet-path)/kubelet/plugins/kfp-csi-s3
type: DirectoryOrCreate
name: socket-dir
---
Expand Down
8 changes: 8 additions & 0 deletions manifests/kustomize/third-party/kfp-csi-s3/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ configMapGenerator:
- bucket-base64=bWxwaXBlbGluZQ==
- accessKeyID-base64=bWluaW8=
- secretAccessKey-bas64=bWluaW8xMjM=
- kubelet-path=/var/data
generatorOptions:
disableNameSuffixHash: true
vars:
Expand Down Expand Up @@ -46,6 +47,13 @@ vars:
apiVersion: v1
fieldref:
fieldpath: data.secretAccessKey-bas64
- name: kubelet-path
objref:
kind: ConfigMap
name: csi-s3-parameters
apiVersion: v1
fieldref:
fieldpath: data.kubelet-path

configurations:
- params.yaml
8 changes: 8 additions & 0 deletions manifests/kustomize/third-party/kfp-csi-s3/params.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
varReference:
- path: data
kind: Secret
- path: spec/template/spec/volumes/hostPath/path
kind: StatefulSet
- path: spec/template/spec/containers/*/args/2
kind: DaemonSet
- path: spec/template/spec/containers/*/volumeMounts/*/mountPath
kind: DaemonSet
- path: spec/template/spec/volumes/hostPath/path
kind: DaemonSet

0 comments on commit 9adc788

Please sign in to comment.