Skip to content

Commit 0e25f34

Browse files
Merge pull request openshift#125 from shiftstack/merge-bot-master
Merge https://github.com/kubernetes-csi/csi-driver-nfs:master into master
2 parents 9a1f564 + 9f795cf commit 0e25f34

File tree

1,254 files changed

+114610
-37034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,254 files changed

+114610
-37034
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ REGISTRY_NAME ?= $(shell echo $(REGISTRY) | sed "s/.azurecr.io//g")
4242
IMAGE_TAG = $(REGISTRY)/$(IMAGENAME):$(IMAGE_VERSION)
4343
IMAGE_TAG_LATEST = $(REGISTRY)/$(IMAGENAME):latest
4444

45-
E2E_HELM_OPTIONS ?= --set image.nfs.repository=$(REGISTRY)/$(IMAGENAME) --set image.nfs.tag=$(IMAGE_VERSION) --set image.nfs.pullPolicy=Always --set feature.enableInlineVolume=true
45+
E2E_HELM_OPTIONS ?= --set image.nfs.repository=$(REGISTRY)/$(IMAGENAME) --set image.nfs.tag=$(IMAGE_VERSION) --set image.nfs.pullPolicy=Always --set feature.enableInlineVolume=true --set externalSnapshotter.enabled=true
4646
E2E_HELM_OPTIONS += ${EXTRA_HELM_OPTIONS}
4747

4848
# Output type of docker buildx build

charts/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- [install Helm](https://helm.sh/docs/intro/quickstart/#install-helm)
55

66
### Tips
7+
- install csi snapshot controller: `--set externalSnapshotter.enabled=true`
78
- run controller on control plane node: `--set controller.runOnControlPlane=true`
89
- set replica of controller as `2`: `--set controller.replicas=2`
910
- Microk8s based kubernetes recommended settings:
@@ -72,6 +73,7 @@ The following table lists the configurable parameters of the latest NFS CSI Driv
7273
| `controller.affinity` | controller pod affinity | `{}` |
7374
| `controller.nodeSelector` | controller pod node selector | `{}` |
7475
| `controller.tolerations` | controller pod tolerations | |
76+
| `controller.priorityClassName` | controller pod priorityClassName | `system-cluster-critical` |
7577
| `controller.resources.csiProvisioner.limits.memory` | csi-provisioner memory limits | 100Mi |
7678
| `controller.resources.csiProvisioner.requests.cpu` | csi-provisioner cpu requests limits | 10m |
7779
| `controller.resources.csiProvisioner.requests.memory` | csi-provisioner memory requests limits | 20Mi |
@@ -88,6 +90,7 @@ The following table lists the configurable parameters of the latest NFS CSI Driv
8890
| `node.livenessProbe.healthPort ` | the health check port for liveness probe |`29653` |
8991
| `node.affinity` | node pod affinity | {} |
9092
| `node.nodeSelector` | node pod node selector | `{}` |
93+
| `node.priorityClassName` | node pod priority class name | `system-cluster-critical` |
9194
| `node.tolerations` | node pod tolerations | |
9295
| `node.resources.livenessProbe.limits.memory` | liveness-probe memory limits | 100Mi |
9396
| `node.resources.livenessProbe.requests.cpu` | liveness-probe cpu requests limits | 10m |
@@ -98,6 +101,13 @@ The following table lists the configurable parameters of the latest NFS CSI Driv
98101
| `node.resources.nfs.limits.memory` | csi-driver-nfs memory limits | 300Mi |
99102
| `node.resources.nfs.requests.cpu` | csi-driver-nfs cpu requests limits | 10m |
100103
| `node.resources.nfs.requests.memory` | csi-driver-nfs memory requests limits | 20Mi |
104+
| `externalSnapshotter.enabled` | enable snapshot-controller | `false`
105+
| `externalSnapshotter.name` | name of snapshot-controller | `snapshot-controller`
106+
| `externalSnapshotter.controller.replicas` | replica number of snapshot-controller | 1
107+
| `externalSnapshotter.resources.limits.memory` | snapshot-controller memory limits | 300Mi |
108+
| `externalSnapshotter.resources.requests.cpu` | snapshot-controller cpu requests limits | 10m |
109+
| `externalSnapshotter.resources.requests.memory` | snapshot-controller memory requests limits | 20Mi |
110+
101111

102112
## troubleshooting
103113
- Add `--wait -v=5 --debug` in `helm install` command to get detailed error
118 Bytes
Binary file not shown.

charts/latest/csi-driver-nfs/templates/crd-csi-snapshot.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
{{- if .Values.externalSnapshotter.enabled -}}
1+
{{- if and .Values.externalSnapshotter.enabled .Values.externalSnapshotter.customResourceDefinitions.enabled -}}
22
---
33
apiVersion: apiextensions.k8s.io/v1
44
kind: CustomResourceDefinition
55
metadata:
66
annotations:
77
controller-gen.kubebuilder.io/version: v0.8.0
88
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/665"
9+
"helm.sh/resource-policy": keep
910
creationTimestamp: null
1011
name: volumesnapshots.snapshot.storage.k8s.io
1112
spec:
@@ -314,6 +315,7 @@ metadata:
314315
annotations:
315316
controller-gen.kubebuilder.io/version: v0.8.0
316317
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/665"
318+
"helm.sh/resource-policy": keep
317319
creationTimestamp: null
318320
name: volumesnapshotclasses.snapshot.storage.k8s.io
319321
spec:
@@ -448,6 +450,7 @@ metadata:
448450
annotations:
449451
controller-gen.kubebuilder.io/version: v0.8.0
450452
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/665"
453+
"helm.sh/resource-policy": keep
451454
creationTimestamp: null
452455
name: volumesnapshotcontents.snapshot.storage.k8s.io
453456
spec:

charts/latest/csi-driver-nfs/templates/csi-nfs-controller.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
{{- with .Values.controller.nodeSelector }}
4040
{{ toYaml . | indent 8 }}
4141
{{- end }}
42-
priorityClassName: system-cluster-critical
42+
priorityClassName: {{ .Values.controller.priorityClassName }}
4343
securityContext:
4444
seccompProfile:
4545
type: RuntimeDefault
@@ -66,7 +66,6 @@ spec:
6666
resources: {{- toYaml .Values.controller.resources.csiProvisioner | nindent 12 }}
6767
securityContext:
6868
readOnlyRootFilesystem: true
69-
{{- if .Values.externalSnapshotter.enabled }}
7069
- name: csi-snapshotter
7170
image: "{{ .Values.image.csiSnapshotter.repository }}:{{ .Values.image.csiSnapshotter.tag }}"
7271
args:
@@ -82,7 +81,6 @@ spec:
8281
volumeMounts:
8382
- name: socket-dir
8483
mountPath: /csi
85-
{{- end }}
8684
- name: liveness-probe
8785
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}"
8886
args:

charts/latest/csi-driver-nfs/templates/csi-nfs-node.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
2626
dnsPolicy: {{ .Values.controller.dnsPolicy }}
2727
serviceAccountName: csi-nfs-node-sa
28-
priorityClassName: system-node-critical
28+
priorityClassName: {{ .Values.node.priorityClassName }}
2929
securityContext:
3030
seccompProfile:
3131
type: RuntimeDefault

charts/latest/csi-driver-nfs/templates/csi-snapshot-controller.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ spec:
4040
app: {{ .Values.externalSnapshotter.name }}
4141
spec:
4242
serviceAccountName: {{ .Values.externalSnapshotter.name }}
43+
{{- if .Values.imagePullSecrets }}
44+
imagePullSecrets:
45+
{{ toYaml .Values.imagePullSecrets | indent 8 }}
46+
{{- end }}
4347
nodeSelector:
4448
kubernetes.io/os: linux
45-
priorityClassName: system-cluster-critical
49+
priorityClassName: {{ .Values.externalSnapshotter.priorityClassName }}
4650
securityContext:
4751
seccompProfile:
4852
type: RuntimeDefault

charts/latest/csi-driver-nfs/values.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ controller:
5757
defaultOnDeletePolicy: delete # available values: delete, retain
5858
affinity: {}
5959
nodeSelector: {}
60+
priorityClassName: system-cluster-critical
6061
tolerations:
6162
- key: "node-role.kubernetes.io/master"
6263
operator: "Exists"
@@ -102,6 +103,7 @@ node:
102103
healthPort: 29653
103104
affinity: {}
104105
nodeSelector: {}
106+
priorityClassName: system-cluster-critical
105107
tolerations:
106108
- operator: "Exists"
107109
resources:
@@ -125,8 +127,9 @@ node:
125127
memory: 20Mi
126128

127129
externalSnapshotter:
128-
enabled: true
130+
enabled: false
129131
name: snapshot-controller
132+
priorityClassName: system-cluster-critical
130133
controller:
131134
replicas: 1
132135
resources:
@@ -135,6 +138,10 @@ externalSnapshotter:
135138
requests:
136139
cpu: 10m
137140
memory: 20Mi
141+
# Create volume snapshot CRDs.
142+
customResourceDefinitions:
143+
enabled: true #if set true, VolumeSnapshot, VolumeSnapshotContent and VolumeSnapshotClass CRDs will be created. Set it false, If they already exist in cluster.
144+
138145
## Reference to one or more secrets to be used when pulling images
139146
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
140147
##
25 Bytes
Binary file not shown.

charts/v4.4.0/csi-driver-nfs/templates/csi-nfs-controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
{{- with .Values.controller.nodeSelector }}
4040
{{ toYaml . | indent 8 }}
4141
{{- end }}
42-
priorityClassName: system-cluster-critical
42+
priorityClassName: {{ .Values.controller.priorityClassName }}
4343
securityContext:
4444
seccompProfile:
4545
type: RuntimeDefault

0 commit comments

Comments
 (0)