Skip to content

Commit 8e85ebf

Browse files
Merge pull request openshift#133 from shiftstack/merge-upstream
OCPBUGS-21829: Merge upstream
2 parents 143b5f1 + 566fcd0 commit 8e85ebf

File tree

1,602 files changed

+215118
-80859
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,602 files changed

+215118
-80859
lines changed

charts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The following table lists the configurable parameters of the latest NFS CSI Driv
4747
| `driver.mountPermissions` | default mounted folder permissions | `0`
4848
| `feature.enableFSGroupPolicy` | enable [`fsGroupPolicy`](https://kubernetes.io/blog/2020/12/14/kubernetes-release-1.20-fsgroupchangepolicy-fsgrouppolicy/#allow-csi-drivers-to-declare-support-for-fsgroup-based-permissions) on a k8s 1.20+ cluster | `true` |
4949
| `feature.enableInlineVolume` | enable inline volume | `false` |
50+
| `feature.propagateHostMountOptions` | use the default host NFS mount configuration file [`/etc/nfsmount.conf`](https://man7.org/linux/man-pages/man5/nfsmount.conf.5.html) and/or the default host `/etc/nfsmount.d` mount configuration directory as source for mount options | `false` |
5051
| `kubeletDir` | alternative kubelet directory | `/var/lib/kubelet` |
5152
| `image.nfs.repository` | csi-driver-nfs image | `registry.k8s.io/sig-storage/nfsplugin` |
5253
| `image.nfs.tag` | csi-driver-nfs image tag | `latest` |
117 Bytes
Binary file not shown.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ spec:
5656
- "--leader-election"
5757
- "--leader-election-namespace={{ .Release.Namespace }}"
5858
- "--extra-create-metadata=true"
59+
- "--timeout=1200s"
5960
env:
6061
- name: ADDRESS
6162
value: /csi/csi.sock
@@ -73,6 +74,7 @@ spec:
7374
- "--csi-address=$(ADDRESS)"
7475
- "--leader-election-namespace={{ .Release.Namespace }}"
7576
- "--leader-election"
77+
- "--timeout=1200s"
7678
env:
7779
- name: ADDRESS
7880
value: /csi/csi.sock

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ spec:
125125
- name: pods-mount-dir
126126
mountPath: {{ .Values.kubeletDir }}/pods
127127
mountPropagation: "Bidirectional"
128+
{{- if .Values.feature.propagateHostMountOptions }}
129+
- name: host-nfsmount-conf
130+
mountPath: /etc/nfsmount.conf
131+
- name: host-nfsmount-conf-d
132+
mountPath: /etc/nfsmount.conf.d
133+
{{- end }}
128134
resources: {{- toYaml .Values.node.resources.nfs | nindent 12 }}
129135
volumes:
130136
- name: socket-dir
@@ -139,3 +145,13 @@ spec:
139145
path: {{ .Values.kubeletDir }}/plugins_registry
140146
type: Directory
141147
name: registration-dir
148+
{{- if .Values.feature.propagateHostMountOptions }}
149+
- hostPath:
150+
path: /etc/nfsmount.conf
151+
type: FileOrCreate
152+
name: host-nfsmount-conf
153+
- hostPath:
154+
path: /etc/nfsmount.conf.d
155+
type: DirectoryOrCreate
156+
name: host-nfsmount-conf-d
157+
{{- end }}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ driver:
4141
feature:
4242
enableFSGroupPolicy: true
4343
enableInlineVolume: false
44+
propagateHostMountOptions: false
4445

4546
kubeletDir: /var/lib/kubelet
4647

14 Bytes
Binary file not shown.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ spec:
5656
- "--leader-election"
5757
- "--leader-election-namespace={{ .Release.Namespace }}"
5858
- "--extra-create-metadata=true"
59+
- "--timeout=1200s"
5960
env:
6061
- name: ADDRESS
6162
value: /csi/csi.sock
@@ -73,6 +74,7 @@ spec:
7374
- "--csi-address=$(ADDRESS)"
7475
- "--leader-election-namespace={{ .Release.Namespace }}"
7576
- "--leader-election"
77+
- "--timeout=1200s"
7678
env:
7779
- name: ADDRESS
7880
value: /csi/csi.sock

cmd/nfsplugin/main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,9 @@ var (
3434
defaultOnDeletePolicy = flag.String("default-ondelete-policy", "", "default policy for deleting subdirectory when deleting a volume")
3535
)
3636

37-
func init() {
38-
_ = flag.Set("logtostderr", "true")
39-
}
40-
4137
func main() {
4238
klog.InitFlags(nil)
39+
_ = flag.Set("logtostderr", "true")
4340
flag.Parse()
4441
if *nodeID == "" {
4542
klog.Warning("nodeid is empty")

deploy/csi-nfs-controller.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ spec:
4242
- "--leader-election"
4343
- "--leader-election-namespace=kube-system"
4444
- "--extra-create-metadata=true"
45+
- "--timeout=1200s"
4546
env:
4647
- name: ADDRESS
4748
value: /csi/csi.sock
@@ -61,6 +62,7 @@ spec:
6162
- "--csi-address=$(ADDRESS)"
6263
- "--leader-election-namespace=kube-system"
6364
- "--leader-election"
65+
- "--timeout=1200s"
6466
env:
6567
- name: ADDRESS
6668
value: /csi/csi.sock

deploy/v4.4.0/csi-nfs-controller.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ spec:
4242
- "--leader-election"
4343
- "--leader-election-namespace=kube-system"
4444
- "--extra-create-metadata=true"
45+
- "--timeout=1200s"
4546
env:
4647
- name: ADDRESS
4748
value: /csi/csi.sock
@@ -61,6 +62,7 @@ spec:
6162
- "--csi-address=$(ADDRESS)"
6263
- "--leader-election-namespace=kube-system"
6364
- "--leader-election"
65+
- "--timeout=1200s"
6466
env:
6567
- name: ADDRESS
6668
value: /csi/csi.sock

0 commit comments

Comments
 (0)