-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2479 from Rei1010/supportNFS
Add csi driver nfs charts
- Loading branch information
Showing
22 changed files
with
2,999 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export USE_OPENSOURCE_CHART=false | ||
|
||
# must | ||
|
||
export REPO_URL=https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts | ||
export REPO_NAME=csi-driver-nfs | ||
export CHART_NAME=csi-driver-nfs | ||
export VERSION=v4.9.0 | ||
|
||
# pr, issue, none | ||
|
||
export UPGRADE_METHOD=pr | ||
export UPGRADE_REVIWER=rei1010 | ||
export TEST_ASSIGNER=liyuerich | ||
|
||
# push to daocloud repo | ||
|
||
export DAOCLOUD_REPO_PROJECT=addon | ||
export CUSTOM_SHELL=custom.sh | ||
export NO_TRIVY=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- "{{ .csi-driver-nfs.image.baseRepo }}/{{ .csi-driver-nfs.image.csiProvisioner.repository}}:{{ .csi-driver-nfs.image.csiProvisioner.tag }}" | ||
- "{{ .csi-driver-nfs.image.baseRepo }}/{{ .csi-driver-nfs.image.csiSnapshotter.repository}}:{{ .csi-driver-nfs.image.csiSnapshotter.tag }}" | ||
- "{{ .csi-driver-nfs.image.baseRepo }}/{{ .csi-driver-nfs.image.externalSnapshotter.repository}}:{{ .csi-driver-nfs.image.externalSnapshotter.tag }}" | ||
- "{{ .csi-driver-nfs.image.baseRepo }}/{{ .csi-driver-nfs.image.livenessProbe.repository}}:{{ .csi-driver-nfs.image.livenessProbe.tag }}" | ||
- "{{ .csi-driver-nfs.image.baseRepo }}/{{ .csi-driver-nfs.image.nfs.repository}}:{{ .csi-driver-nfs.image.nfs.tag }}" | ||
- "{{ .csi-driver-nfs.image.baseRepo }}/{{ .csi-driver-nfs.image.nodeDriverRegistrar.repository}}:{{ .csi-driver-nfs.image.nodeDriverRegistrar.tag }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
appVersion: v4.9.0 | ||
description: CSI NFS Driver for Kubernetes | ||
name: csi-driver-nfs | ||
version: v4.9.0 | ||
dependencies: | ||
- name: csi-driver-nfs | ||
version: "v4.9.0" | ||
repository: "https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts" | ||
keywords: | ||
- storage |
22 changes: 22 additions & 0 deletions
22
charts/csi-driver-nfs/csi-driver-nfs/charts/csi-driver-nfs/.helmignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
5 changes: 5 additions & 0 deletions
5
charts/csi-driver-nfs/csi-driver-nfs/charts/csi-driver-nfs/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
appVersion: v4.9.0 | ||
description: CSI NFS Driver for Kubernetes | ||
name: csi-driver-nfs | ||
version: v4.9.0 |
5 changes: 5 additions & 0 deletions
5
charts/csi-driver-nfs/csi-driver-nfs/charts/csi-driver-nfs/templates/NOTES.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The CSI NFS Driver is getting deployed to your cluster. | ||
|
||
To check CSI NFS Driver pods status, please run: | ||
|
||
kubectl --namespace={{ .Release.Namespace }} get pods --selector="app.kubernetes.io/instance={{ .Release.Name }}" --watch |
19 changes: 19 additions & 0 deletions
19
charts/csi-driver-nfs/csi-driver-nfs/charts/csi-driver-nfs/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{/* Expand the name of the chart.*/}} | ||
{{- define "nfs.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* labels for helm resources */}} | ||
{{- define "nfs.labels" -}} | ||
labels: | ||
app.kubernetes.io/instance: "{{ .Release.Name }}" | ||
app.kubernetes.io/managed-by: "{{ .Release.Service }}" | ||
app.kubernetes.io/name: "{{ template "nfs.name" . }}" | ||
app.kubernetes.io/version: "{{ .Chart.AppVersion }}" | ||
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
{{- if .Values.customLabels }} | ||
{{ toYaml .Values.customLabels | indent 2 -}} | ||
{{- end }} | ||
{{- end -}} |
843 changes: 843 additions & 0 deletions
843
charts/csi-driver-nfs/csi-driver-nfs/charts/csi-driver-nfs/templates/crd-csi-snapshot.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
174 changes: 174 additions & 0 deletions
174
charts/csi-driver-nfs/csi-driver-nfs/charts/csi-driver-nfs/templates/csi-nfs-controller.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
--- | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: {{ .Values.controller.name }} | ||
namespace: {{ .Release.Namespace }} | ||
{{ include "nfs.labels" . | indent 2 }} | ||
spec: | ||
replicas: {{ .Values.controller.replicas }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.controller.name }} | ||
strategy: | ||
type: {{ .Values.controller.strategyType }} | ||
template: | ||
metadata: | ||
{{ include "nfs.labels" . | indent 6 }} | ||
app: {{ .Values.controller.name }} | ||
spec: | ||
{{- if .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{ toYaml .Values.imagePullSecrets | indent 8 }} | ||
{{- end }} | ||
hostNetwork: true # controller also needs to mount nfs to create dir | ||
dnsPolicy: {{ .Values.controller.dnsPolicy }} | ||
serviceAccountName: {{ .Values.serviceAccount.controller }} | ||
{{- with .Values.controller.affinity }} | ||
affinity: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
nodeSelector: | ||
kubernetes.io/os: linux | ||
{{- if .Values.controller.runOnMaster}} | ||
node-role.kubernetes.io/master: "" | ||
{{- end}} | ||
{{- if .Values.controller.runOnControlPlane}} | ||
node-role.kubernetes.io/control-plane: "" | ||
{{- end}} | ||
{{- with .Values.controller.nodeSelector }} | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
priorityClassName: {{ .Values.controller.priorityClassName }} | ||
securityContext: | ||
seccompProfile: | ||
type: RuntimeDefault | ||
{{- with .Values.controller.tolerations }} | ||
tolerations: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: csi-provisioner | ||
{{- if hasPrefix "/" .Values.image.csiProvisioner.repository }} | ||
image: "{{ .Values.image.baseRepo }}/{{.Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}" | ||
{{- else }} | ||
image: "{{ .Values.image.baseRepo }}/{{.Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}" | ||
{{- end }} | ||
args: | ||
- "-v=2" | ||
- "--csi-address=$(ADDRESS)" | ||
- "--leader-election" | ||
- "--leader-election-namespace={{ .Release.Namespace }}" | ||
- "--extra-create-metadata=true" | ||
- "--feature-gates=HonorPVReclaimPolicy=true" | ||
- "--timeout=1200s" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: {{ .Values.image.csiProvisioner.pullPolicy }} | ||
volumeMounts: | ||
- mountPath: /csi | ||
name: socket-dir | ||
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }} | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
capabilities: | ||
drop: | ||
- ALL | ||
- name: csi-snapshotter | ||
{{- if hasPrefix "/" .Values.image.csiSnapshotter.repository }} | ||
image: "{{ .Values.image.baseRepo }}/{{.Values.image.csiSnapshotter.repository }}:{{ .Values.image.csiSnapshotter.tag }}" | ||
{{- else }} | ||
image: "{{ .Values.image.baseRepo }}/{{.Values.image.csiSnapshotter.repository }}:{{ .Values.image.csiSnapshotter.tag }}" | ||
{{- end }} | ||
args: | ||
- "--v=2" | ||
- "--csi-address=$(ADDRESS)" | ||
- "--leader-election-namespace={{ .Release.Namespace }}" | ||
- "--leader-election" | ||
- "--timeout=1200s" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: {{ .Values.image.csiSnapshotter.pullPolicy }} | ||
resources: {{- toYaml .Values.controller.resources.csiSnapshotter | nindent 12 }} | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
securityContext: | ||
capabilities: | ||
drop: | ||
- ALL | ||
- name: liveness-probe | ||
{{- if hasPrefix "/" .Values.image.livenessProbe.repository }} | ||
image: "{{ .Values.image.baseRepo }}/{{.Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" | ||
{{- else }} | ||
image: "{{ .Values.image.baseRepo }}/{{.Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" | ||
{{- end }} | ||
args: | ||
- --csi-address=/csi/csi.sock | ||
- --probe-timeout=3s | ||
- --http-endpoint=localhost:{{ .Values.controller.livenessProbe.healthPort }} | ||
- --v=2 | ||
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }} | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
resources: {{- toYaml .Values.controller.resources.livenessProbe | nindent 12 }} | ||
securityContext: | ||
readOnlyRootFilesystem: true | ||
capabilities: | ||
drop: | ||
- ALL | ||
- name: nfs | ||
{{- if hasPrefix "/" .Values.image.nfs.repository }} | ||
image: "{{ .Values.image.baseRepo }}/{{.Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}" | ||
{{- else }} | ||
image: "{{ .Values.image.baseRepo }}/{{.Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}" | ||
{{- end }} | ||
securityContext: | ||
privileged: true | ||
capabilities: | ||
add: ["SYS_ADMIN"] | ||
drop: | ||
- ALL | ||
allowPrivilegeEscalation: true | ||
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }} | ||
args: | ||
- "--v={{ .Values.controller.logLevel }}" | ||
- "--nodeid=$(NODE_ID)" | ||
- "--endpoint=$(CSI_ENDPOINT)" | ||
- "--drivername={{ .Values.driver.name }}" | ||
- "--mount-permissions={{ .Values.driver.mountPermissions }}" | ||
- "--working-mount-dir={{ .Values.controller.workingMountDir }}" | ||
- "--default-ondelete-policy={{ .Values.controller.defaultOnDeletePolicy }}" | ||
env: | ||
- name: NODE_ID | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: CSI_ENDPOINT | ||
value: unix:///csi/csi.sock | ||
livenessProbe: | ||
failureThreshold: 5 | ||
httpGet: | ||
host: localhost | ||
path: /healthz | ||
port: {{ .Values.controller.livenessProbe.healthPort }} | ||
initialDelaySeconds: 30 | ||
timeoutSeconds: 10 | ||
periodSeconds: 30 | ||
volumeMounts: | ||
- name: pods-mount-dir | ||
mountPath: {{ .Values.kubeletDir }}/pods | ||
mountPropagation: "Bidirectional" | ||
- mountPath: /csi | ||
name: socket-dir | ||
resources: {{- toYaml .Values.controller.resources.nfs | nindent 12 }} | ||
volumes: | ||
- name: pods-mount-dir | ||
hostPath: | ||
path: {{ .Values.kubeletDir }}/pods | ||
type: Directory | ||
- name: socket-dir | ||
emptyDir: {} |
15 changes: 15 additions & 0 deletions
15
charts/csi-driver-nfs/csi-driver-nfs/charts/csi-driver-nfs/templates/csi-nfs-driverinfo.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
apiVersion: storage.k8s.io/v1 | ||
kind: CSIDriver | ||
metadata: | ||
name: {{ .Values.driver.name }} | ||
spec: | ||
attachRequired: false | ||
volumeLifecycleModes: | ||
- Persistent | ||
{{- if .Values.feature.enableInlineVolume}} | ||
- Ephemeral | ||
{{- end}} | ||
{{- if .Values.feature.enableFSGroupPolicy}} | ||
fsGroupPolicy: File | ||
{{- end}} |
Oops, something went wrong.