diff --git a/charts/README.md b/charts/README.md index 7cb9bf75508..6445d7caea8 100644 --- a/charts/README.md +++ b/charts/README.md @@ -51,13 +51,13 @@ The following table lists the configurable parameters of the latest SMB CSI Driv | `image.smb.repository` | csi-driver-smb docker image | `gcr.io/k8s-staging-sig-storage/smbplugin` | | `image.smb.tag` | csi-driver-smb docker image tag | `canary` | | `image.smb.pullPolicy` | csi-driver-smb image pull policy | `IfNotPresent` | -| `image.csiProvisioner.tag` | csi-provisioner docker image tag | `v5.1.0` | +| `image.csiProvisioner.tag` | csi-provisioner docker image tag | `v5.2.0` | | `image.csiProvisioner.pullPolicy` | csi-provisioner image pull policy | `IfNotPresent` | | `image.livenessProbe.repository` | liveness-probe docker image | `/livenessprobe` | -| `image.livenessProbe.tag` | liveness-probe docker image tag | `v2.14.0` | +| `image.livenessProbe.tag` | liveness-probe docker image tag | `v2.15.0` | | `image.livenessProbe.pullPolicy` | liveness-probe image pull policy | `IfNotPresent` | | `image.nodeDriverRegistrar.repository` | csi-node-driver-registrar docker image | `/csi-node-driver-registrar` | -| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | `v2.12.0` | +| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | `v2.13.0` | | `image.nodeDriverRegistrar.pullPolicy` | csi-node-driver-registrar image pull policy | `IfNotPresent` | | `imagePullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | | `serviceAccount.create` | whether create service account of csi-smb-controller | `true` | diff --git a/charts/latest/csi-driver-smb-v0.0.0.tgz b/charts/latest/csi-driver-smb-v0.0.0.tgz index d04f15ebea9..a22b4060680 100644 Binary files a/charts/latest/csi-driver-smb-v0.0.0.tgz and b/charts/latest/csi-driver-smb-v0.0.0.tgz differ diff --git a/charts/latest/csi-driver-smb/values.yaml b/charts/latest/csi-driver-smb/values.yaml index 7cda0b0f43b..6e57d2e1dd8 100755 --- a/charts/latest/csi-driver-smb/values.yaml +++ b/charts/latest/csi-driver-smb/values.yaml @@ -6,19 +6,19 @@ image: pullPolicy: IfNotPresent csiProvisioner: repository: /csi-provisioner - tag: v5.1.0 + tag: v5.2.0 pullPolicy: IfNotPresent csiResizer: repository: registry.k8s.io/sig-storage/csi-resizer - tag: v1.12.0 + tag: v1.13.1 pullPolicy: IfNotPresent livenessProbe: repository: /livenessprobe - tag: v2.14.0 + tag: v2.15.0 pullPolicy: IfNotPresent nodeDriverRegistrar: repository: /csi-node-driver-registrar - tag: v2.12.0 + tag: v2.13.0 pullPolicy: IfNotPresent csiproxy: repository: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy diff --git a/deploy/csi-smb-controller.yaml b/deploy/csi-smb-controller.yaml index 2f03f11c9aa..fa7f2cde262 100644 --- a/deploy/csi-smb-controller.yaml +++ b/deploy/csi-smb-controller.yaml @@ -38,7 +38,7 @@ spec: effect: "NoSchedule" containers: - name: csi-provisioner - image: registry.k8s.io/sig-storage/csi-provisioner:v5.1.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v5.2.0 args: - "-v=2" - "--csi-address=$(ADDRESS)" @@ -65,7 +65,7 @@ spec: drop: - ALL - name: csi-resizer - image: registry.k8s.io/sig-storage/csi-resizer:v1.12.0 + image: registry.k8s.io/sig-storage/csi-resizer:v1.13.1 args: - "-csi-address=$(ADDRESS)" - "-v=2" @@ -89,7 +89,7 @@ spec: drop: - ALL - name: liveness-probe - image: registry.k8s.io/sig-storage/livenessprobe:v2.14.0 + image: registry.k8s.io/sig-storage/livenessprobe:v2.15.0 args: - --csi-address=/csi/csi.sock - --probe-timeout=3s diff --git a/deploy/csi-smb-node-windows-hostprocess.yaml b/deploy/csi-smb-node-windows-hostprocess.yaml index a9abc0df285..2bc1acf6af2 100644 --- a/deploy/csi-smb-node-windows-hostprocess.yaml +++ b/deploy/csi-smb-node-windows-hostprocess.yaml @@ -42,7 +42,7 @@ spec: - "New-Item -ItemType Directory -Path C:\\var\\lib\\kubelet\\plugins\\smb.csi.k8s.io\\ -Force" containers: - name: node-driver-registrar - image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v2.10.0 + image: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar:v2.13.0 imagePullPolicy: IfNotPresent command: - "csi-node-driver-registrar.exe" diff --git a/deploy/csi-smb-node-windows.yaml b/deploy/csi-smb-node-windows.yaml index d90f55af812..a7edd1c0cb7 100644 --- a/deploy/csi-smb-node-windows.yaml +++ b/deploy/csi-smb-node-windows.yaml @@ -33,7 +33,7 @@ spec: volumeMounts: - mountPath: C:\csi name: plugin-dir - image: registry.k8s.io/sig-storage/livenessprobe:v2.14.0 + image: registry.k8s.io/sig-storage/livenessprobe:v2.15.0 args: - --csi-address=$(CSI_ENDPOINT) - --probe-timeout=3s @@ -53,7 +53,7 @@ spec: drop: - ALL - name: node-driver-registrar - image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.12.0 + image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0 args: - --v=2 - --csi-address=$(CSI_ENDPOINT) diff --git a/deploy/csi-smb-node.yaml b/deploy/csi-smb-node.yaml index 55517907ca9..0aeb55e14e6 100644 --- a/deploy/csi-smb-node.yaml +++ b/deploy/csi-smb-node.yaml @@ -33,7 +33,7 @@ spec: volumeMounts: - mountPath: /csi name: socket-dir - image: registry.k8s.io/sig-storage/livenessprobe:v2.14.0 + image: registry.k8s.io/sig-storage/livenessprobe:v2.15.0 args: - --csi-address=/csi/csi.sock - --probe-timeout=3s @@ -50,7 +50,7 @@ spec: drop: - ALL - name: node-driver-registrar - image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.12.0 + image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0 args: - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) diff --git a/pkg/smb/smb_test.go b/pkg/smb/smb_test.go index 21761cbbd49..3102bfbc003 100644 --- a/pkg/smb/smb_test.go +++ b/pkg/smb/smb_test.go @@ -17,6 +17,7 @@ limitations under the License. package smb import ( + "context" "fmt" "os" "path/filepath" @@ -529,3 +530,30 @@ func createTestFile(path string) error { return nil } + +func TestGetUserNamePasswordFromSecret(t *testing.T) { + tests := []struct { + desc string + secretName string + secretNamespace string + expectedUsername string + expectedPassword string + expectedDomain string + expectedError error + }{ + { + desc: "kubeclient is nil", + secretName: "secretName", + expectedError: fmt.Errorf("could not username and password from secret(secretName): KubeClient is nil"), + }, + } + + d := NewFakeDriver() + for _, test := range tests { + username, password, domain, err := d.GetUserNamePasswordFromSecret(context.Background(), test.secretName, test.secretNamespace) + assert.Equal(t, test.expectedUsername, username, "test[%s]: unexpected username", test.desc) + assert.Equal(t, test.expectedPassword, password, "test[%s]: unexpected password", test.desc) + assert.Equal(t, test.expectedDomain, domain, "test[%s]: unexpected domain", test.desc) + assert.Equal(t, test.expectedError, err, "test[%s]: unexpected error", test.desc) + } +}