diff --git a/charts/cinder-csi-plugin/Chart.yaml b/charts/cinder-csi-plugin/Chart.yaml index 99db4944f6..fa4f815454 100644 --- a/charts/cinder-csi-plugin/Chart.yaml +++ b/charts/cinder-csi-plugin/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 -appVersion: latest +appVersion: v1.22.0 description: Cinder CSI Chart for OpenStack name: openstack-cinder-csi -version: 1.4.8 +version: 1.4.9 home: https://github.com/kubernetes/cloud-provider-openstack icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png maintainers: diff --git a/charts/manila-csi-plugin/Chart.yaml b/charts/manila-csi-plugin/Chart.yaml index 35342c7e8c..e036aebf51 100644 --- a/charts/manila-csi-plugin/Chart.yaml +++ b/charts/manila-csi-plugin/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 -appVersion: latest +appVersion: v1.22.0 description: Manila CSI Chart for OpenStack name: openstack-manila-csi -version: 1.3.2 +version: 1.3.3 home: http://github.com/kubernetes/cloud-provider-openstack icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png maintainers: diff --git a/charts/openstack-cloud-controller-manager/Chart.yaml b/charts/openstack-cloud-controller-manager/Chart.yaml index f8936935d1..7a92ad6355 100644 --- a/charts/openstack-cloud-controller-manager/Chart.yaml +++ b/charts/openstack-cloud-controller-manager/Chart.yaml @@ -1,10 +1,10 @@ apiVersion: v1 -appVersion: "latest" +appVersion: v1.22.0 description: Openstack Cloud Controller Manager Helm Chart icon: https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/6e4619c416ff4bd19e1c087f27a43eea/www-images-prod/openstack-logo/OpenStack-Logo-Vertical.png home: https://github.com/kubernetes/cloud-provider-openstack name: openstack-cloud-controller-manager -version: 1.1.1 +version: 1.1.2 maintainers: - name: morremeyer email: kubernetes@maurice-meyer.de diff --git a/examples/webhook/keystone-deployment.yaml b/examples/webhook/keystone-deployment.yaml index 902318bcb9..4dd96bcd76 100644 --- a/examples/webhook/keystone-deployment.yaml +++ b/examples/webhook/keystone-deployment.yaml @@ -18,7 +18,7 @@ spec: serviceAccountName: k8s-keystone containers: - name: k8s-keystone-auth - image: k8scloudprovider/k8s-keystone-auth:latest + image: k8scloudprovider/k8s-keystone-auth:v1.22.0 args: - ./bin/k8s-keystone-auth - --tls-cert-file diff --git a/manifests/barbican-kms/pod.yaml b/manifests/barbican-kms/pod.yaml index c0e8a20c9a..8e68d66bd4 100644 --- a/manifests/barbican-kms/pod.yaml +++ b/manifests/barbican-kms/pod.yaml @@ -5,7 +5,7 @@ metadata: spec: containers: - name: barbican-kms - image: docker.io/k8scloudprovider/barbican-kms-plugin:latest + image: docker.io/k8scloudprovider/barbican-kms-plugin:v1.22.0 args: - "--socketpath=/kms/kms.sock" - "--cloud-config=/etc/kubernetes/cloud-config" diff --git a/manifests/cinder-csi-plugin/cinder-csi-controllerplugin.yaml b/manifests/cinder-csi-plugin/cinder-csi-controllerplugin.yaml index 51dfde8c92..f0d43853d3 100644 --- a/manifests/cinder-csi-plugin/cinder-csi-controllerplugin.yaml +++ b/manifests/cinder-csi-plugin/cinder-csi-controllerplugin.yaml @@ -99,7 +99,7 @@ spec: - mountPath: /var/lib/csi/sockets/pluginproxy/ name: socket-dir - name: cinder-csi-plugin - image: docker.io/k8scloudprovider/cinder-csi-plugin:latest + image: docker.io/k8scloudprovider/cinder-csi-plugin:v1.22.0 args: - /bin/cinder-csi-plugin - "--endpoint=$(CSI_ENDPOINT)" diff --git a/manifests/cinder-csi-plugin/cinder-csi-nodeplugin.yaml b/manifests/cinder-csi-plugin/cinder-csi-nodeplugin.yaml index 0642480cd8..f63e4dfc7a 100644 --- a/manifests/cinder-csi-plugin/cinder-csi-nodeplugin.yaml +++ b/manifests/cinder-csi-plugin/cinder-csi-nodeplugin.yaml @@ -53,7 +53,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: docker.io/k8scloudprovider/cinder-csi-plugin:latest + image: docker.io/k8scloudprovider/cinder-csi-plugin:v1.22.0 args: - /bin/cinder-csi-plugin - "--endpoint=$(CSI_ENDPOINT)" diff --git a/manifests/controller-manager/openstack-cloud-controller-manager-ds.yaml b/manifests/controller-manager/openstack-cloud-controller-manager-ds.yaml index cd1af8cb61..d3ab9e7aa1 100644 --- a/manifests/controller-manager/openstack-cloud-controller-manager-ds.yaml +++ b/manifests/controller-manager/openstack-cloud-controller-manager-ds.yaml @@ -36,7 +36,7 @@ spec: serviceAccountName: cloud-controller-manager containers: - name: openstack-cloud-controller-manager - image: docker.io/k8scloudprovider/openstack-cloud-controller-manager:latest + image: docker.io/k8scloudprovider/openstack-cloud-controller-manager:v1.22.0 args: - /bin/openstack-cloud-controller-manager - --v=1 diff --git a/manifests/controller-manager/openstack-cloud-controller-manager-pod.yaml b/manifests/controller-manager/openstack-cloud-controller-manager-pod.yaml index b3f643dee4..8f9a14b430 100644 --- a/manifests/controller-manager/openstack-cloud-controller-manager-pod.yaml +++ b/manifests/controller-manager/openstack-cloud-controller-manager-pod.yaml @@ -11,7 +11,7 @@ metadata: spec: containers: - name: openstack-cloud-controller-manager - image: docker.io/k8scloudprovider/openstack-cloud-controller-manager:latest + image: docker.io/k8scloudprovider/openstack-cloud-controller-manager:v1.22.0 args: - /bin/openstack-cloud-controller-manager - --v=1 diff --git a/manifests/magnum-auto-healer/magnum-auto-healer.yaml b/manifests/magnum-auto-healer/magnum-auto-healer.yaml index b750498b87..481a11f29e 100644 --- a/manifests/magnum-auto-healer/magnum-auto-healer.yaml +++ b/manifests/magnum-auto-healer/magnum-auto-healer.yaml @@ -88,7 +88,7 @@ spec: node-role.kubernetes.io/master: "" containers: - name: magnum-auto-healer - image: docker.io/k8scloudprovider/magnum-auto-healer:latest + image: docker.io/k8scloudprovider/magnum-auto-healer:v1.22.0 imagePullPolicy: Always args: - /bin/magnum-auto-healer diff --git a/manifests/manila-csi-plugin/csi-controllerplugin.yaml b/manifests/manila-csi-plugin/csi-controllerplugin.yaml index 4218013f7b..254a5ceeab 100644 --- a/manifests/manila-csi-plugin/csi-controllerplugin.yaml +++ b/manifests/manila-csi-plugin/csi-controllerplugin.yaml @@ -77,7 +77,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: "k8scloudprovider/manila-csi-plugin:latest" + image: "k8scloudprovider/manila-csi-plugin:v1.22.0" command: ["/bin/sh", "-c", '/bin/manila-csi-plugin --nodeid=$(NODE_ID) diff --git a/manifests/manila-csi-plugin/csi-nodeplugin.yaml b/manifests/manila-csi-plugin/csi-nodeplugin.yaml index b9606d0ded..2f4e9da8c1 100644 --- a/manifests/manila-csi-plugin/csi-nodeplugin.yaml +++ b/manifests/manila-csi-plugin/csi-nodeplugin.yaml @@ -50,7 +50,7 @@ spec: capabilities: add: ["SYS_ADMIN"] allowPrivilegeEscalation: true - image: "k8scloudprovider/manila-csi-plugin:latest" + image: "k8scloudprovider/manila-csi-plugin:v1.22.0" command: ["/bin/sh", "-c", '/bin/manila-csi-plugin --nodeid=$(NODE_ID) diff --git a/pkg/autohealing/cmd/root.go b/pkg/autohealing/cmd/root.go index ce79e67eca..44e3d3390d 100644 --- a/pkg/autohealing/cmd/root.go +++ b/pkg/autohealing/cmd/root.go @@ -77,7 +77,7 @@ var rootCmd = &cobra.Command{ Name: "k8s-auto-healer", }) - sigCh := make(chan os.Signal) + sigCh := make(chan os.Signal, 1) signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM) <-sigCh }, diff --git a/pkg/csi/cinder/controllerserver.go b/pkg/csi/cinder/controllerserver.go index d45f24ed26..04554ac7b7 100644 --- a/pkg/csi/cinder/controllerserver.go +++ b/pkg/csi/cinder/controllerserver.go @@ -365,7 +365,10 @@ func (cs *controllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateS properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.cluster} // see https://github.com/kubernetes-csi/external-snapshotter/pull/375/ - for _, mKey := range []string{"csi.storage.k8s.io/volumesnapshot/name", "csi.storage.k8s.io/volumesnapshot/namespace", "csi.storage.k8s.io/volumesnapshotcontent/name"} { + // Also, we don't want to tag every param but we still want to send the + // 'force-create' flag to openstack layer so that we will honor the + // force create functions + for _, mKey := range []string{"csi.storage.k8s.io/volumesnapshot/name", "csi.storage.k8s.io/volumesnapshot/namespace", "csi.storage.k8s.io/volumesnapshotcontent/name", openstack.SnapshotForceCreate} { if v, ok := req.Parameters[mKey]; ok { properties[mKey] = v } diff --git a/pkg/csi/cinder/controllerserver_test.go b/pkg/csi/cinder/controllerserver_test.go index bf7563f92b..3a44a59a2b 100644 --- a/pkg/csi/cinder/controllerserver_test.go +++ b/pkg/csi/cinder/controllerserver_test.go @@ -441,6 +441,7 @@ func TestCreateSnapshotWithExtraMetadata(t *testing.T) { "csi.storage.k8s.io/volumesnapshot/name": FakeSnapshotName, "csi.storage.k8s.io/volumesnapshotcontent/name": FakeSnapshotContentName, "csi.storage.k8s.io/volumesnapshot/namespace": FakeSnapshotNamespace, + openstack.SnapshotForceCreate: "true", } osmock.On("CreateSnapshot", FakeSnapshotName, FakeVolID, &properties).Return(&FakeSnapshotRes, nil) @@ -458,6 +459,7 @@ func TestCreateSnapshotWithExtraMetadata(t *testing.T) { "csi.storage.k8s.io/volumesnapshot/name": FakeSnapshotName, "csi.storage.k8s.io/volumesnapshotcontent/name": FakeSnapshotContentName, "csi.storage.k8s.io/volumesnapshot/namespace": FakeSnapshotNamespace, + openstack.SnapshotForceCreate: "true", }, } diff --git a/pkg/csi/cinder/openstack/openstack_snapshots.go b/pkg/csi/cinder/openstack/openstack_snapshots.go index 478b5bfde4..1e1a54ac28 100644 --- a/pkg/csi/cinder/openstack/openstack_snapshots.go +++ b/pkg/csi/cinder/openstack/openstack_snapshots.go @@ -37,7 +37,7 @@ const ( snapReadySteps = 10 snapshotDescription = "Created by OpenStack Cinder CSI driver" - snapshotForceCreate = "force-create" + SnapshotForceCreate = "force-create" ) // CreateSnapshot issues a request to take a Snapshot of the specified Volume with the corresponding ID and @@ -47,14 +47,14 @@ func (os *OpenStack) CreateSnapshot(name, volID string, tags *map[string]string) force := false // if no flag given, then force will be false by default // if flag it given , check it - if item, ok := (*tags)[snapshotForceCreate]; ok { + if item, ok := (*tags)[SnapshotForceCreate]; ok { var err error force, err = strconv.ParseBool(item) if err != nil { klog.V(5).Infof("Make force create flag to false due to: %v", err) } - delete(*tags, snapshotForceCreate) + delete(*tags, SnapshotForceCreate) } // Force the creation of snapshot even the Volume is in in-use state opts := &snapshots.CreateOpts{ diff --git a/pkg/csi/manila/controllerserver.go b/pkg/csi/manila/controllerserver.go index 116b000944..5f575715c2 100644 --- a/pkg/csi/manila/controllerserver.go +++ b/pkg/csi/manila/controllerserver.go @@ -445,7 +445,7 @@ func (cs *controllerServer) ControllerExpandVolume(ctx context.Context, req *csi } // Check for pending operations on this volume - if _, isPending := pendingVolumes.LoadOrStore(req.GetVolumeId(), true); isPending { + if _, isPending := pendingVolumes.LoadOrStore(share.Name, true); isPending { return nil, status.Errorf(codes.Aborted, "volume %s is already being processed", share.Name) } defer pendingVolumes.Delete(share.Name) diff --git a/pkg/util/blockdevice/blockdevice_unsupported.go b/pkg/util/blockdevice/blockdevice_unsupported.go index a19150574f..a75c69be7b 100644 --- a/pkg/util/blockdevice/blockdevice_unsupported.go +++ b/pkg/util/blockdevice/blockdevice_unsupported.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux /*