From 7e22aa6062abcb93572570d9368bbed3326d1d03 Mon Sep 17 00:00:00 2001 From: Vicente Cheng Date: Thu, 14 Nov 2024 09:57:20 +0800 Subject: [PATCH 1/2] Bump Harvester CSI driver v0.1.21 and support k8s v1.31 Signed-off-by: Vicente Cheng --- .../generated-changes/patch/Chart.yaml.patch | 8 ++++---- packages/harvester/harvester-csi-driver/package.yaml | 4 ++-- release.yaml | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/harvester/harvester-csi-driver/generated-changes/patch/Chart.yaml.patch b/packages/harvester/harvester-csi-driver/generated-changes/patch/Chart.yaml.patch index 00791181a5..05085646bc 100644 --- a/packages/harvester/harvester-csi-driver/generated-changes/patch/Chart.yaml.patch +++ b/packages/harvester/harvester-csi-driver/generated-changes/patch/Chart.yaml.patch @@ -5,15 +5,15 @@ catalog.cattle.io/certified: rancher catalog.cattle.io/display-name: Harvester CSI Driver - catalog.cattle.io/kube-version: '>= 1.18.0-0 < 1.26.0-0' -+ catalog.cattle.io/kube-version: '>= 1.23.0-0 < 1.31.0-0' ++ catalog.cattle.io/kube-version: '>= 1.23.0-0 < 1.32.0-0' catalog.cattle.io/namespace: kube-system catalog.cattle.io/os: linux catalog.cattle.io/permits-os: linux - catalog.cattle.io/rancher-version: '>= 2.6.1-0 < 2.8.0-0' -+ catalog.cattle.io/rancher-version: '>= 2.9.0-0 < 2.10.0-0' ++ catalog.cattle.io/rancher-version: '>= 2.10.0-0 < 2.11.0-0' catalog.cattle.io/release-name: harvester-csi-driver catalog.cattle.io/ui-component: harvester-csi-driver -+ catalog.cattle.io/upstream-version: 0.1.17 ++ catalog.cattle.io/upstream-version: 0.1.21 apiVersion: v2 - appVersion: v0.1.6 + appVersion: v0.2.2 description: A Helm chart for Harvester CSI driver diff --git a/packages/harvester/harvester-csi-driver/package.yaml b/packages/harvester/harvester-csi-driver/package.yaml index 14ad53e538..8fbec67471 100644 --- a/packages/harvester/harvester-csi-driver/package.yaml +++ b/packages/harvester/harvester-csi-driver/package.yaml @@ -1,3 +1,3 @@ -url: https://github.com/harvester/charts/releases/download/harvester-csi-driver-0.1.17/harvester-csi-driver-0.1.17.tgz -version: 104.0.0 +url: https://github.com/harvester/charts/releases/download/harvester-csi-driver-0.1.21/harvester-csi-driver-0.1.21.tgz +version: 105.0.0 doNotRelease: false \ No newline at end of file diff --git a/release.yaml b/release.yaml index 611edfa077..74a4e63735 100644 --- a/release.yaml +++ b/release.yaml @@ -1,5 +1,7 @@ harvester-cloud-provider: - 105.0.0+up0.2.6 +harvester-csi-driver: + - 105.0.0+up0.1.21 prometheus-federator: - 105.0.1+up0.4.3 rancher-cis-benchmark: From 7a73fd4aeedce69515d8bf2ab2907ee4cdbc3029 Mon Sep 17 00:00:00 2001 From: Vicente Cheng Date: Thu, 14 Nov 2024 10:00:39 +0800 Subject: [PATCH 2/2] make charts Signed-off-by: Vicente Cheng --- .../harvester-csi-driver-105.0.0+up0.1.21.tgz | Bin 0 -> 3846 bytes .../105.0.0+up0.1.21/.helmignore | 23 +++ .../105.0.0+up0.1.21/Chart.yaml | 22 +++ .../105.0.0+up0.1.21/questions.yml | 11 ++ .../105.0.0+up0.1.21/templates/NOTES.txt | 1 + .../105.0.0+up0.1.21/templates/_helpers.tpl | 62 +++++++ .../105.0.0+up0.1.21/templates/csidriver.yaml | 10 ++ .../105.0.0+up0.1.21/templates/daemonset.yaml | 152 ++++++++++++++++++ .../templates/deployment.yaml | 95 +++++++++++ .../105.0.0+up0.1.21/templates/rbac.yaml | 75 +++++++++ .../templates/storageclass.yaml | 10 ++ .../105.0.0+up0.1.21/values.yaml | 56 +++++++ index.yaml | 26 +++ 13 files changed, 543 insertions(+) create mode 100644 assets/harvester-csi-driver/harvester-csi-driver-105.0.0+up0.1.21.tgz create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/.helmignore create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/Chart.yaml create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/questions.yml create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/templates/NOTES.txt create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/templates/_helpers.tpl create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/templates/csidriver.yaml create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/templates/daemonset.yaml create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/templates/deployment.yaml create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/templates/rbac.yaml create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/templates/storageclass.yaml create mode 100644 charts/harvester-csi-driver/105.0.0+up0.1.21/values.yaml diff --git a/assets/harvester-csi-driver/harvester-csi-driver-105.0.0+up0.1.21.tgz b/assets/harvester-csi-driver/harvester-csi-driver-105.0.0+up0.1.21.tgz new file mode 100644 index 0000000000000000000000000000000000000000..2e0a4a4ecaca0ceeb202594a6bf660dc56567cbd GIT binary patch literal 3846 zcmV+h5BcyPiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PH+#bK5wQ`OII@$7E|W*(LSxYfE*$s;uSRb=|~vMN^sDy1H^f zWJ|&t1ULYwSd-*_`xO9^A}Q+ON1Vxy@WG})pt}L|3*8`QM9xuZltH9u5KB5o**TjL zslx?H*o&tq-EOyge0XU8ce~x@|K35r`=WPv(mU#(oOF99FS@;>{!#Y@be{zKmXaw= zIoDaR4Mu z8I3HfdgZu!-J`G@cK?*6`3S$YJbiDaRsYWk%TPU;0obDd`$xUQrv5iod;R|mSjt)GJCS;1nZj?RD4}eHfr}W)V0EwwkR13K%%}8gB zIy2=ZT+LBR8lwU|L$G*2lPP?h355{nG*kE5DX6733v)1ODy5JZ2TbtkOh`_JrP+YV2@hlesET{u4-dkw=in;(>*fhrhbHe@1KbPy zIp9=^IW?nx81PE>2Ial5Z)=Fw#DI7R^rCMK^g-AUdmccVF?KB&jTQsAm|O~dEm0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q?trwFJF6=^fZFZT{-|<=r&T7!jZ>BG zq3;1qU2x3LFa0o8F5s`Uqfmp)x+A~=M|3ovM>9xFApmJ9{>RV|3;-% I0{~= 1.23.0-0 < 1.32.0-0' + catalog.cattle.io/namespace: kube-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux + catalog.cattle.io/rancher-version: '>= 2.10.0-0 < 2.11.0-0' + catalog.cattle.io/release-name: harvester-csi-driver + catalog.cattle.io/ui-component: harvester-csi-driver + catalog.cattle.io/upstream-version: 0.1.21 +apiVersion: v2 +appVersion: v0.2.2 +description: A Helm chart for Harvester CSI driver +keywords: +- infrastructure +- harvester +maintainers: +- name: harvester +name: harvester-csi-driver +type: application +version: 105.0.0+up0.1.21 diff --git a/charts/harvester-csi-driver/105.0.0+up0.1.21/questions.yml b/charts/harvester-csi-driver/105.0.0+up0.1.21/questions.yml new file mode 100644 index 0000000000..0c703a0f29 --- /dev/null +++ b/charts/harvester-csi-driver/105.0.0+up0.1.21/questions.yml @@ -0,0 +1,11 @@ +categories: +- infrastructure +- harvester +namespace: kube-system +questions: +- variable: cloudConfig.hostPath + label: Cloud config file path + description: "Specify the path of the cloud config." + group: "Default" + type: string + default: "/etc/kubernetes/cloud-config" diff --git a/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/NOTES.txt b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/NOTES.txt new file mode 100644 index 0000000000..ba09c6d518 --- /dev/null +++ b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/NOTES.txt @@ -0,0 +1 @@ +Successfully deployed Harvester CSI driver to the {{ .Release.Namespace }} namespace. diff --git a/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/_helpers.tpl b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/_helpers.tpl new file mode 100644 index 0000000000..def471b21d --- /dev/null +++ b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "harvester-csi-driver.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "harvester-csi-driver.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "harvester-csi-driver.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "harvester-csi-driver.labels" -}} +helm.sh/chart: {{ include "harvester-csi-driver.chart" . }} +{{ include "harvester-csi-driver.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "harvester-csi-driver.selectorLabels" -}} +app.kubernetes.io/name: {{ include "harvester-csi-driver.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Global system default registry +*/}} +{{- define "system_default_registry" -}} +{{- if .Values.global.cattle.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.cattle.systemDefaultRegistry -}} +{{- else -}} +{{- "" -}} +{{- end -}} +{{- end -}} diff --git a/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/csidriver.yaml b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/csidriver.yaml new file mode 100644 index 0000000000..5fc6ec84a2 --- /dev/null +++ b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/csidriver.yaml @@ -0,0 +1,10 @@ +apiVersion: storage.k8s.io/v1 +kind: CSIDriver +metadata: + name: driver.harvesterhci.io +spec: + attachRequired: true + fsGroupPolicy: ReadWriteOnceWithFSType + podInfoOnMount: true + volumeLifecycleModes: + - Persistent diff --git a/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/daemonset.yaml b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/daemonset.yaml new file mode 100644 index 0000000000..6ccb3203a0 --- /dev/null +++ b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/daemonset.yaml @@ -0,0 +1,152 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: {{ include "harvester-csi-driver.name" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "harvester-csi-driver.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + component: csi-driver + {{- include "harvester-csi-driver.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + component: csi-driver + {{- include "harvester-csi-driver.selectorLabels" . | nindent 8 }} + spec: + containers: + - args: + - --v=5 + - --csi-address=$(ADDRESS) + - --kubelet-registration-path={{ .Values.kubeletRootDir }}/harvester-plugins/driver.harvesterhci.io/csi.sock + env: + - name: ADDRESS + value: /csi/csi.sock + image: {{ template "system_default_registry" . }}{{ .Values.image.csi.nodeDriverRegistrar.repository }}:{{ .Values.image.csi.nodeDriverRegistrar.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + lifecycle: + preStop: + exec: + command: + - /bin/sh + - -c + - rm -rf /registration/driver.harvesterhci.io-reg.sock + /csi//* + name: node-driver-registrar + securityContext: + privileged: true + volumeMounts: + - mountPath: /csi/ + name: socket-dir + - mountPath: /registration + name: registration-dir + - args: + - --nodeid=$(NODE_ID) + - --endpoint=$(CSI_ENDPOINT) + - --kubeconfig=/var/lib/harvester/cloud-provider-config + {{- if .Values.hostStorageClass }} + - --host-storage-class={{ .Values.hostStorageClass }} + {{- end }} + env: + - name: NODE_ID + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: CSI_ENDPOINT + value: unix:///csi/csi.sock + image: {{ template "system_default_registry" . }}{{ .Values.image.harvester.csiDriver.repository }}:{{ .Values.image.harvester.csiDriver.tag | default .Chart.AppVersion }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + lifecycle: + preStop: + exec: + command: + - /bin/sh + - -c + - rm -f /csi//* + name: harvester-csi-driver + securityContext: + allowPrivilegeEscalation: true + capabilities: + add: + - SYS_ADMIN + privileged: true + volumeMounts: + - name: cloud-config + readOnly: true + mountPath: /var/lib/harvester + - name: kubernetes + readOnly: true + mountPath: /etc/kubernetes + - mountPath: {{ .Values.kubeletRootDir }}/plugins/kubernetes.io/csi + mountPropagation: Bidirectional + name: kubernetes-csi-dir + - mountPath: /csi/ + name: socket-dir + - mountPath: {{ .Values.kubeletRootDir }}/pods + mountPropagation: Bidirectional + name: pods-mount-dir + - mountPath: /dev + name: host-dev + - mountPath: /sys + name: host-sys + - mountPath: /rootfs + mountPropagation: Bidirectional + name: host + - mountPath: /lib/modules + name: lib-modules + readOnly: true + hostPID: true + serviceAccountName: {{ include "harvester-csi-driver.name" . }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + - name: cloud-config + {{- if .Values.cloudConfig.secretName }} + secret: + secretName: {{ .Values.cloudConfig.secretName }} + {{- else }} + hostPath: + path: {{ .Values.cloudConfig.hostPath }} + type: DirectoryOrCreate + {{- end }} + - hostPath: + path: /etc/kubernetes + type: DirectoryOrCreate + name: kubernetes + - hostPath: + path: {{ .Values.kubeletRootDir }}/plugins/kubernetes.io/csi + type: DirectoryOrCreate + name: kubernetes-csi-dir + - hostPath: + path: {{ .Values.kubeletRootDir }}/plugins_registry + type: Directory + name: registration-dir + - hostPath: + path: {{ .Values.kubeletRootDir }}/harvester-plugins/driver.harvesterhci.io + type: DirectoryOrCreate + name: socket-dir + - hostPath: + path: {{ .Values.kubeletRootDir }}/pods + type: DirectoryOrCreate + name: pods-mount-dir + - hostPath: + path: /dev + name: host-dev + - hostPath: + path: /sys + name: host-sys + - hostPath: + path: / + name: host + - hostPath: + path: /lib/modules + name: lib-modules diff --git a/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/deployment.yaml b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/deployment.yaml new file mode 100644 index 0000000000..bb511dfa7b --- /dev/null +++ b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/deployment.yaml @@ -0,0 +1,95 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "harvester-csi-driver.name" . }}-controllers + namespace: {{ .Release.Namespace }} + labels: + {{- include "harvester-csi-driver.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicasCount }} + selector: + matchLabels: + component: csi-controllers + {{- include "harvester-csi-driver.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + component: csi-controllers + {{- include "harvester-csi-driver.selectorLabels" . | nindent 8 }} + spec: + containers: + - args: + - --v=5 + - --csi-address=$(ADDRESS) + - --timeout=1m50s + - --leader-election + - --leader-election-namespace=$(POD_NAMESPACE) + env: + - name: ADDRESS + value: /csi/csi.sock + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: {{ template "system_default_registry" . }}{{ .Values.image.csi.resizer.repository }}:{{ .Values.image.csi.resizer.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + name: csi-resizer + volumeMounts: + - mountPath: /csi/ + name: socket-dir + - args: + - --v=5 + - --csi-address=$(ADDRESS) + - --timeout=1m50s + - --leader-election + - --leader-election-namespace=$(POD_NAMESPACE) + - --default-fstype=ext4 + env: + - name: ADDRESS + value: /csi/csi.sock + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: {{ template "system_default_registry" . }}{{ .Values.image.csi.provisioner.repository }}:{{ .Values.image.csi.provisioner.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + name: csi-provisioner + volumeMounts: + - mountPath: /csi/ + name: socket-dir + - args: + - --v=5 + - --csi-address=$(ADDRESS) + - --timeout=1m50s + - --leader-election + - --leader-election-namespace=$(POD_NAMESPACE) + env: + - name: ADDRESS + value: /csi/csi.sock + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: {{ template "system_default_registry" . }}{{ .Values.image.csi.attacher.repository }}:{{ .Values.image.csi.attacher.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + name: csi-attacher + volumeMounts: + - mountPath: /csi/ + name: socket-dir + serviceAccountName: {{ include "harvester-csi-driver.name" . }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + - hostPath: + path: {{ .Values.kubeletRootDir }}/harvester-plugins/driver.harvesterhci.io + type: DirectoryOrCreate + name: socket-dir diff --git a/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/rbac.yaml b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/rbac.yaml new file mode 100644 index 0000000000..2ba042a26b --- /dev/null +++ b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/rbac.yaml @@ -0,0 +1,75 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "harvester-csi-driver.name" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "harvester-csi-driver.labels" . | nindent 4 }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "harvester-csi-driver.name" . }} + labels: + {{- include "harvester-csi-driver.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "harvester-csi-driver.name" . }} +subjects: + - kind: ServiceAccount + name: {{ include "harvester-csi-driver.name" . }} + namespace: {{ .Release.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "harvester-csi-driver.name" . }} + labels: + {{- include "harvester-csi-driver.labels" . | nindent 4 }} +rules: + - apiGroups: [ "coordination.k8s.io" ] + resources: [ "leases" ] + verbs: [ "get", "watch", "list", "delete", "update", "create" ] + - apiGroups: [ "storage.k8s.io" ] + resources: [ "csistoragecapacities" ] + verbs: [ "get", "list", "watch", "create", "update", "patch", "delete" ] + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: [ "get", "list", "watch", "create","update", "patch", "delete" ] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["get", "list", "watch", "create","update", "patch", "delete" ] + - apiGroups: [""] + resources: ["persistentvolumeclaims/status"] + verbs: ["patch"] + - apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["get", "list", "watch"] + - apiGroups: ["snapshot.storage.k8s.io"] + resources: ["volumesnapshots"] + verbs: ["get", "list"] + - apiGroups: ["snapshot.storage.k8s.io"] + resources: ["volumesnapshotcontents"] + verbs: ["get", "list"] + - apiGroups: [ "storage.k8s.io" ] + resources: [ "csinodes" ] + verbs: [ "get", "list", "watch" ] + - apiGroups: [ "" ] + resources: [ "events" ] + verbs: [ "list", "watch", "create", "update", "patch" ] + - apiGroups: [ "" ] + resources: [ "pods" ] + verbs: [ "get", "list", "watch" ] + - apiGroups: [ "apps" ] + resources: [ "replicasets" ] + verbs: [ "get" ] + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get", "list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments"] + verbs: ["get", "list", "watch", "patch"] + - apiGroups: [ "storage.k8s.io" ] + resources: [ "volumeattachments/status" ] + verbs: [ "patch" ] diff --git a/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/storageclass.yaml b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/storageclass.yaml new file mode 100644 index 0000000000..a29c9c7da0 --- /dev/null +++ b/charts/harvester-csi-driver/105.0.0+up0.1.21/templates/storageclass.yaml @@ -0,0 +1,10 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: harvester + annotations: + storageclass.kubernetes.io/is-default-class: "true" +allowVolumeExpansion: true +provisioner: driver.harvesterhci.io +reclaimPolicy: Delete +volumeBindingMode: Immediate diff --git a/charts/harvester-csi-driver/105.0.0+up0.1.21/values.yaml b/charts/harvester-csi-driver/105.0.0+up0.1.21/values.yaml new file mode 100644 index 0000000000..fe6b120cbd --- /dev/null +++ b/charts/harvester-csi-driver/105.0.0+up0.1.21/values.yaml @@ -0,0 +1,56 @@ +# Default values for harvester-csi-driver. + +replicasCount: 3 + +image: + harvester: + csiDriver: + repository: rancher/harvester-csi-driver + # Overrides the image tag whose default is the chart appVersion. + tag: "v0.2.2" + csi: + nodeDriverRegistrar: + repository: rancher/mirrored-longhornio-csi-node-driver-registrar + tag: v2.3.0 + resizer: + repository: rancher/mirrored-longhornio-csi-resizer + tag: v1.2.0 + provisioner: + repository: rancher/mirrored-longhornio-csi-provisioner + tag: v2.1.2 + attacher: + repository: rancher/mirrored-longhornio-csi-attacher + tag: v3.2.1 + pullPolicy: IfNotPresent + +nameOverride: "" +fullnameOverride: "" + +# This field can be used to specify the corresponding StorageClass on the host cluster. +hostStorageClass: "" +kubeletRootDir: /var/lib/kubelet +cloudConfig: + secretName: "" + hostPath: "/var/lib/rancher/rke2/etc/config-files/" + +nodeSelector: + kubernetes.io/os: linux + +tolerations: + - effect: NoSchedule + key: kubevirt.io/drain + operator: Exists + - effect: NoSchedule + key: node-role.kubernetes.io/control-plane + operator: Equal + - effect: NoExecute + key: node-role.kubernetes.io/etcd + operator: Equal + - key: cattle.io/os + operator: Equal + value: "linux" + effect: NoSchedule + +global: + cattle: + systemDefaultRegistry: "" diff --git a/index.yaml b/index.yaml index 560947482a..6cbfa7c901 100755 --- a/index.yaml +++ b/index.yaml @@ -3104,6 +3104,32 @@ entries: - assets/harvester-cloud-provider/harvester-cloud-provider-101.0.0+up0.1.13.tgz version: 101.0.0+up0.1.13 harvester-csi-driver: + - annotations: + catalog.cattle.io/certified: rancher + catalog.cattle.io/display-name: Harvester CSI Driver + catalog.cattle.io/kube-version: '>= 1.23.0-0 < 1.32.0-0' + catalog.cattle.io/namespace: kube-system + catalog.cattle.io/os: linux + catalog.cattle.io/permits-os: linux + catalog.cattle.io/rancher-version: '>= 2.10.0-0 < 2.11.0-0' + catalog.cattle.io/release-name: harvester-csi-driver + catalog.cattle.io/ui-component: harvester-csi-driver + catalog.cattle.io/upstream-version: 0.1.21 + apiVersion: v2 + appVersion: v0.2.2 + created: "2024-11-14T12:35:27.419746979+08:00" + description: A Helm chart for Harvester CSI driver + digest: 40894ce82f86712f7d20395214b8a066a0d970cea792d9481d8b773a0fb44391 + keywords: + - infrastructure + - harvester + maintainers: + - name: harvester + name: harvester-csi-driver + type: application + urls: + - assets/harvester-csi-driver/harvester-csi-driver-105.0.0+up0.1.21.tgz + version: 105.0.0+up0.1.21 - annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/display-name: Harvester CSI Driver