-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72129b4
commit 935f29f
Showing
24 changed files
with
889 additions
and
18 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
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
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
Binary file not shown.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: v1 | ||
appVersion: latest | ||
appVersion: v4.1.0 | ||
description: CSI NFS Driver for Kubernetes | ||
name: csi-driver-nfs | ||
version: v4.1.0 |
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
Binary file not shown.
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/ |
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.1.0 | ||
description: CSI NFS Driver for Kubernetes | ||
name: csi-driver-nfs | ||
version: v4.1.0 |
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="release={{ .Release.Name }}" --watch |
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 -}} |
121 changes: 121 additions & 0 deletions
121
charts/v4.1.0/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,121 @@ | ||
--- | ||
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 }} | ||
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: system-cluster-critical | ||
{{- with .Values.controller.tolerations }} | ||
tolerations: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: csi-provisioner | ||
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}" | ||
args: | ||
- "-v=2" | ||
- "--csi-address=$(ADDRESS)" | ||
- "--leader-election" | ||
- "--leader-election-namespace={{ .Release.Namespace }}" | ||
- "--extra-create-metadata=true" | ||
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 }} | ||
- name: liveness-probe | ||
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" | ||
args: | ||
- --csi-address=/csi/csi.sock | ||
- --probe-timeout=3s | ||
- --health-port={{ .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 }} | ||
- name: nfs | ||
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}" | ||
securityContext: | ||
privileged: true | ||
capabilities: | ||
add: ["SYS_ADMIN"] | ||
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 }}" | ||
env: | ||
- name: NODE_ID | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: CSI_ENDPOINT | ||
value: unix:///csi/csi.sock | ||
ports: | ||
- containerPort: {{ .Values.controller.livenessProbe.healthPort }} | ||
name: healthz | ||
protocol: TCP | ||
livenessProbe: | ||
failureThreshold: 5 | ||
httpGet: | ||
path: /healthz | ||
port: healthz | ||
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/v4.1.0/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.