Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge https://github.com/kubernetes-csi/csi-driver-nfs:master into master #87

Merged
merged 8 commits into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include release-tools/build.make

GIT_COMMIT = $(shell git rev-parse HEAD)
BUILD_DATE = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
IMAGE_VERSION ?= v4.1.0
IMAGE_VERSION ?= v4.2.0
LDFLAGS = -X ${PKG}/pkg/nfs.driverVersion=${IMAGE_VERSION} -X ${PKG}/pkg/nfs.gitCommit=${GIT_COMMIT} -X ${PKG}/pkg/nfs.buildDate=${BUILD_DATE}
EXT_LDFLAGS = -s -w -extldflags "-static"
# Use a custom version for E2E tests if we are testing in CI
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ This is a repository for [NFS](https://en.wikipedia.org/wiki/Network_File_System
|driver version | supported k8s version | status |
|----------------|-----------------------|--------|
|master branch | 1.20+ | GA |
|v4.0.0 | 1.10+ | GA |
|v4.1.0 | 1.20+ | GA |
|v4.0.0 | 1.20+ | GA |
|v3.1.0 | 1.19+ | beta |
|v3.0.0 | 1.19+ | beta |
|v2.0.0 | 1.14+ | alpha |

### Install driver on a Kubernetes cluster
> [install NFS CSI driver on microk8s](https://microk8s.io/docs/nfs)
Expand All @@ -35,6 +34,10 @@ Please refer to [`nfs.csi.k8s.io` driver parameters](./docs/driver-parameters.md
## Kubernetes Development
Please refer to [development guide](./docs/csi-dev.md)

### View CI Results
- testgrid [sig-storage-csi-nfs](https://testgrid.k8s.io/sig-storage-csi-other) dashboard.
- Driver image build pipeline: [post-csi-driver-nfs-push-images](https://k8s-testgrid.appspot.com/sig-storage-image-build#post-csi-driver-nfs-push-images)

### Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/).
Expand Down
2 changes: 1 addition & 1 deletion charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
### install a specific version
```console
helm repo add csi-driver-nfs https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts
helm install csi-driver-nfs csi-driver-nfs/csi-driver-nfs --namespace kube-system --version v4.0.0
helm install csi-driver-nfs csi-driver-nfs/csi-driver-nfs --namespace kube-system --version v4.1.0
```

### install driver with customized driver name, deployment name
Expand Down
25 changes: 17 additions & 8 deletions charts/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@ entries:
csi-driver-nfs:
- apiVersion: v1
appVersion: latest
created: "2022-05-06T12:35:56.694935968Z"
created: "2022-07-04T02:47:55.628668339Z"
description: CSI NFS Driver for Kubernetes
digest: 9138032fc8c0e8188acd492bb722cd428bae5de4fd1032b60fb1ce8245e82447
digest: 7f4b76fe3c725916299e7836a49acccab74efa74862608d882100a868be573be
name: csi-driver-nfs
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts/latest/csi-driver-nfs-v4.1.0.tgz
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts/latest/csi-driver-nfs-v4.2.0.tgz
version: v4.2.0
- apiVersion: v1
appVersion: v4.1.0
created: "2022-07-04T02:47:55.631791653Z"
description: CSI NFS Driver for Kubernetes
digest: f6c513b1f58bc7508032c7609738756f8690555f0e23a3a2ba02dbbd585b7ead
name: csi-driver-nfs
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts/v4.1.0/csi-driver-nfs-v4.1.0.tgz
version: v4.1.0
- apiVersion: v1
appVersion: v4.0.0
created: "2022-05-06T12:35:56.6991353Z"
created: "2022-07-04T02:47:55.63110795Z"
description: CSI NFS Driver for Kubernetes
digest: cb537287512ce9f99adaead8cd4904ed7284780bdc44c9b8d6705e66f28bfa5c
name: csi-driver-nfs
Expand All @@ -21,7 +30,7 @@ entries:
version: v4.0.0
- apiVersion: v1
appVersion: v3.1.0
created: "2022-05-06T12:35:56.698222193Z"
created: "2022-07-04T02:47:55.630400547Z"
description: CSI NFS Driver for Kubernetes
digest: 7e51bb9188b013195cafc265102fa365de9ec5513780e1dfc5363289f811a4d9
name: csi-driver-nfs
Expand All @@ -30,7 +39,7 @@ entries:
version: v3.1.0
- apiVersion: v1
appVersion: v3.0.0
created: "2022-05-06T12:35:56.696122977Z"
created: "2022-07-04T02:47:55.629646543Z"
description: CSI NFS Driver for Kubernetes
digest: 44406231cd5cdada1c62a0541b93b4f5d5a70ccc8c50b33553a8692fe6cfae96
name: csi-driver-nfs
Expand All @@ -39,11 +48,11 @@ entries:
version: v3.0.0
- apiVersion: v1
appVersion: v2.0.0
created: "2022-05-06T12:35:56.695364072Z"
created: "2022-07-04T02:47:55.629065141Z"
description: CSI NFS Driver for Kubernetes
digest: 1a32c6fc016526fe19a0c9e0dfbe83d0ddde67ced533bb5f5d24d713f706c613
name: csi-driver-nfs
urls:
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts/v2.0.0/csi-driver-nfs-v2.0.0.tgz
version: v2.0.0
generated: "2022-05-06T12:35:56.693722959Z"
generated: "2022-07-04T02:47:55.627545934Z"
Binary file removed charts/latest/csi-driver-nfs-v4.1.0.tgz
Binary file not shown.
Binary file added charts/latest/csi-driver-nfs-v4.2.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion charts/latest/csi-driver-nfs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: latest
description: CSI NFS Driver for Kubernetes
name: csi-driver-nfs
version: v4.1.0
version: v4.2.0
Binary file added charts/v4.1.0/csi-driver-nfs-v4.1.0.tgz
Binary file not shown.
22 changes: 22 additions & 0 deletions charts/v4.1.0/csi-driver-nfs/.helmignore
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 charts/v4.1.0/csi-driver-nfs/Chart.yaml
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
5 changes: 5 additions & 0 deletions charts/v4.1.0/csi-driver-nfs/templates/NOTES.txt
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
19 changes: 19 additions & 0 deletions charts/v4.1.0/csi-driver-nfs/templates/_helpers.tpl
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 charts/v4.1.0/csi-driver-nfs/templates/csi-nfs-controller.yaml
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 charts/v4.1.0/csi-driver-nfs/templates/csi-nfs-driverinfo.yaml
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}}
Loading