From 0e4e10c01cb9cf699a923ff0efc981ba92d60d93 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Mon, 13 Jan 2025 02:54:26 +0000 Subject: [PATCH] feat: add feature flag for inline volume support --- charts/latest/csi-driver-smb-v0.0.0.tgz | Bin 5680 -> 5714 bytes .../templates/csi-smb-driver.yaml | 2 ++ .../templates/rbac-csi-smb.yaml | 3 ++- charts/latest/csi-driver-smb/values.yaml | 1 + test/e2e/dynamic_provisioning_test.go | 6 ++++++ test/e2e/suite_test.go | 3 ++- test/e2e/testsuites/testsuites.go | 11 +++++++++++ 7 files changed, 24 insertions(+), 2 deletions(-) diff --git a/charts/latest/csi-driver-smb-v0.0.0.tgz b/charts/latest/csi-driver-smb-v0.0.0.tgz index 757bd423c3d467ccb18d4c6f0c992afeb528771e..d04f15ebea9179d168fd765c488f7b34c82d88cd 100644 GIT binary patch delta 5706 zcmV-Q7PaZHEYd8HJAZv?ZzDI-a6Su||3GL0WU}wH4xjr9@P~=*B*tcJ!}4UYST6=t zcUj`&?q)B^maRDc?+p?i(pMBEJLUgoXn&?YD3grC)t4fQyy~++`#Z>e=w~Pw04fhE5d8pj*n&KjIOv z5Crg6hyxg)B1yHTDfnKe*Xgxhd&Jw4FD3q;Vm}7HVF56o|NFhey~8s9@9b~+|3wN3 z@E8UyghrUd6@Nr@fEbJk7i`wK`#bLt+T~>Ia6uU!Lkl4ujAV6$7(|p4LD_78#x9dJ z@BYpmF7TLyV<*?D%Y#wm$72$zh60ZV$i*RMGxa@+egBgB#GMV$+3h(Mmkcz_|yGPztd{~{|Y$y!v=fKG=C_xOgGG-?05P*i*fp73L$WQ z$><0yLrUI9@_i2aPN%=O7_~hx6pZ>l zFs<--FmkeI4##FKvbSo!Ic~Ms2)pGj%i2nLN{!jlt1`$x?6{m5N^G@m0gIR^;(-v4 zeE0>#@6?Y27z!+S3R1s33w;uTes5m2a@|j{RDXxjQY-2c7xMw?w-E9|o-D|*A9Dfh zXTrGnClQlhDHrD;5PFaB6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=YMg|RNB;+| zFx+kxvYFM>Tp2VIvQj7+PqZrVRu^+9-NQM{Y~QJ;*rIfz=8r_ZLRq{bC#)fX*TT@{ z0*km@f@sCBu*=-_=( vejzoOul(5e9a diff --git a/charts/latest/csi-driver-smb/templates/csi-smb-driver.yaml b/charts/latest/csi-driver-smb/templates/csi-smb-driver.yaml index 47a5ab8bbb2..6655aa32500 100755 --- a/charts/latest/csi-driver-smb/templates/csi-smb-driver.yaml +++ b/charts/latest/csi-driver-smb/templates/csi-smb-driver.yaml @@ -8,4 +8,6 @@ spec: podInfoOnMount: true volumeLifecycleModes: - Persistent + {{- if .Values.feature.enableInlineVolume }} - Ephemeral + {{- end }} diff --git a/charts/latest/csi-driver-smb/templates/rbac-csi-smb.yaml b/charts/latest/csi-driver-smb/templates/rbac-csi-smb.yaml index 8de7b91e894..6d89878eff2 100755 --- a/charts/latest/csi-driver-smb/templates/rbac-csi-smb.yaml +++ b/charts/latest/csi-driver-smb/templates/rbac-csi-smb.yaml @@ -98,6 +98,7 @@ roleRef: name: {{ .Values.rbac.name }}-external-resizer-role apiGroup: rbac.authorization.k8s.io --- +{{- if .Values.feature.enableInlineVolume }} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -107,7 +108,6 @@ rules: - apiGroups: [""] resources: ["secrets"] verbs: ["get"] - --- kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 @@ -122,4 +122,5 @@ roleRef: kind: ClusterRole name: csi-{{ .Values.rbac.name }}-node-secret-role apiGroup: rbac.authorization.k8s.io +{{- end }} {{ end }} diff --git a/charts/latest/csi-driver-smb/values.yaml b/charts/latest/csi-driver-smb/values.yaml index 4a7abb3e975..7cda0b0f43b 100755 --- a/charts/latest/csi-driver-smb/values.yaml +++ b/charts/latest/csi-driver-smb/values.yaml @@ -39,6 +39,7 @@ driver: feature: enableGetVolumeStats: true + enableInlineVolume: true controller: name: csi-smb-controller diff --git a/test/e2e/dynamic_provisioning_test.go b/test/e2e/dynamic_provisioning_test.go index 3c88f913020..9d9bc1083f5 100644 --- a/test/e2e/dynamic_provisioning_test.go +++ b/test/e2e/dynamic_provisioning_test.go @@ -535,6 +535,12 @@ var _ = ginkgo.Describe("Dynamic Provisioning", func() { }) ginkgo.It("should create an CSI inline volume", func(ctx ginkgo.SpecContext) { + secretName := "smbcreds" + ginkgo.By(fmt.Sprintf("creating secret %s in namespace %s", secretName, ns.Name)) + tsecret := testsuites.CopyTestSecret(ctx, cs, "default", ns, defaultSmbSecretName) + tsecret.Create(ctx) + defer tsecret.Cleanup(ctx) + pods := []testsuites.PodDetails{ { Cmd: convertToPowershellCommandIfNecessary("echo 'hello world' > /mnt/test-1/data && grep 'hello world' /mnt/test-1/data"), diff --git a/test/e2e/suite_test.go b/test/e2e/suite_test.go index 17c931cd921..ca299fa8f76 100644 --- a/test/e2e/suite_test.go +++ b/test/e2e/suite_test.go @@ -50,6 +50,7 @@ const ( defaultSmbSource = "//smb-server.default.svc.cluster.local/share" defaultSmbSecretName = "smbcreds" defaultSmbSecretNamespace = "default" + accountNameForTest = "YW5keXNzZGZpbGUK" ) var ( @@ -173,7 +174,7 @@ var _ = ginkgo.BeforeSuite(func() { } if isWindowsHostProcessDeployment { - decodedBytes, err := base64.StdEncoding.DecodeString("YW5keXNzZGZpbGUK") + decodedBytes, err := base64.StdEncoding.DecodeString(accountNameForTest) if err != nil { log.Printf("Error decoding base64 string: %v\n", err) return diff --git a/test/e2e/testsuites/testsuites.go b/test/e2e/testsuites/testsuites.go index e5ec7a45a99..73386f9c051 100644 --- a/test/e2e/testsuites/testsuites.go +++ b/test/e2e/testsuites/testsuites.go @@ -717,6 +717,17 @@ func NewTestSecret(c clientset.Interface, ns *v1.Namespace, name string, data ma } } +func CopyTestSecret(ctx context.Context, c clientset.Interface, sourceNamespace string, targetNamespace *v1.Namespace, secretName string) *TestSecret { + secret, err := c.CoreV1().Secrets(sourceNamespace).Get(ctx, secretName, metav1.GetOptions{}) + framework.ExpectNoError(err) + + return &TestSecret{ + client: c, + namespace: targetNamespace, + secret: secret, + } +} + func (t *TestSecret) Create(ctx context.Context) { var err error t.secret, err = t.client.CoreV1().Secrets(t.namespace.Name).Create(ctx, t.secret, metav1.CreateOptions{})