diff --git a/Dockerfile b/Dockerfile index 94be6e94aa..ed4a7c26a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ WORKDIR $SRC RUN COMPONENT=${COMPONENT} make clean build -FROM oraclelinux:8-slim +FROM oraclelinux:8 COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/dist/* /usr/local/bin/ COPY --from=0 /go/src/github.com/oracle/oci-cloud-controller-manager/image/* /usr/local/bin/ diff --git a/Makefile b/Makefile index 7ed17120cd..676b96c54f 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ else VERSION ?= ${VERSION} endif -RELEASE = v1.28.0 +RELEASE = v1.29.0 GOOS ?= linux ARCH ?= amd64 diff --git a/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml b/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml index 6405a59622..327a2f5db7 100644 --- a/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml +++ b/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml @@ -42,7 +42,7 @@ spec: path: /etc/kubernetes containers: - name: oci-cloud-controller-manager - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/yashwantgohokar/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/oci-cloud-controller-manager"] args: - --cloud-config=/etc/oci/cloud-provider.yaml diff --git a/manifests/container-storage-interface/oci-csi-controller-driver.yaml b/manifests/container-storage-interface/oci-csi-controller-driver.yaml index f50407f92b..3fa3d59a98 100644 --- a/manifests/container-storage-interface/oci-csi-controller-driver.yaml +++ b/manifests/container-storage-interface/oci-csi-controller-driver.yaml @@ -22,7 +22,7 @@ spec: node-role.kubernetes.io/control-plane: "" containers: - name: csi-volume-provisioner - image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v5.0.1 args: - --csi-address=/var/run/shared-tmpfs/csi.sock - --volume-name-prefix=csi @@ -37,7 +37,7 @@ spec: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - name: csi-fss-volume-provisioner - image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.0 + image: registry.k8s.io/sig-storage/csi-provisioner:v5.0.1 args: - --csi-address=/var/run/shared-tmpfs/csi-fss.sock - --volume-name-prefix=csi-fss @@ -52,7 +52,7 @@ spec: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - name: csi-attacher - image: registry.k8s.io/sig-storage/csi-attacher:v4.4.0 + image: registry.k8s.io/sig-storage/csi-attacher:v4.6.1 args: - --csi-address=/var/run/shared-tmpfs/csi.sock - --timeout=120s @@ -65,7 +65,7 @@ spec: - mountPath: /var/run/shared-tmpfs name: shared-tmpfs - name: csi-resizer - image: registry.k8s.io/sig-storage/csi-resizer:v1.9.0 + image: registry.k8s.io/sig-storage/csi-resizer:v1.11.1 args: - --csi-address=/var/run/shared-tmpfs/csi.sock - --leader-election @@ -96,7 +96,7 @@ spec: - --fss-csi-endpoint=unix://var/run/shared-tmpfs/csi-fss.sock command: - /usr/local/bin/oci-csi-controller-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: gghcr.io/yashwantgohokar/cloud-provider-oci:v1.29.0 imagePullPolicy: IfNotPresent volumeMounts: - name: config diff --git a/manifests/container-storage-interface/oci-csi-node-driver.yaml b/manifests/container-storage-interface/oci-csi-node-driver.yaml index 68ad946e39..a07d31914b 100644 --- a/manifests/container-storage-interface/oci-csi-node-driver.yaml +++ b/manifests/container-storage-interface/oci-csi-node-driver.yaml @@ -117,7 +117,7 @@ spec: fieldPath: spec.nodeName - name: PATH value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/bin:/host/sbin - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/yashwantgohokar/cloud-provider-oci:v1.29.0 securityContext: privileged: true volumeMounts: diff --git a/manifests/flexvolume-driver/oci-flexvolume-driver.yaml b/manifests/flexvolume-driver/oci-flexvolume-driver.yaml index 8f2e385895..8b47ef05ee 100644 --- a/manifests/flexvolume-driver/oci-flexvolume-driver.yaml +++ b/manifests/flexvolume-driver/oci-flexvolume-driver.yaml @@ -40,7 +40,7 @@ spec: secretName: oci-flexvolume-driver containers: - name: oci-flexvolume-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/yashwantgohokar/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/install.py", "-c", "/tmp/config.yaml"] securityContext: privileged: true @@ -76,7 +76,7 @@ spec: type: DirectoryOrCreate containers: - name: oci-flexvolume-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/yashwantgohokar/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/install.py"] securityContext: privileged: true diff --git a/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml b/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml index 0486391327..1e95ab4596 100644 --- a/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml +++ b/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml @@ -35,7 +35,7 @@ spec: secretName: oci-volume-provisioner containers: - name: oci-volume-provisioner - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/yashwantgohokar/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/oci-volume-provisioner"] env: - name: NODE_NAME diff --git a/manifests/volume-provisioner/oci-volume-provisioner.yaml b/manifests/volume-provisioner/oci-volume-provisioner.yaml index 8a83c9bf79..ae9b9e779e 100644 --- a/manifests/volume-provisioner/oci-volume-provisioner.yaml +++ b/manifests/volume-provisioner/oci-volume-provisioner.yaml @@ -35,7 +35,7 @@ spec: secretName: oci-volume-provisioner containers: - name: oci-volume-provisioner - image: ghcr.io/oracle/cloud-provider-oci:v1.28.0 + image: ghcr.io/yashwantgohokar/cloud-provider-oci:v1.29.0 command: ["/usr/local/bin/oci-volume-provisioner"] env: - name: NODE_NAME diff --git a/test/e2e/cloud-provider-oci/csi_snapshot_restore.go b/test/e2e/cloud-provider-oci/csi_snapshot_restore.go index 241832f39c..afd8950c61 100644 --- a/test/e2e/cloud-provider-oci/csi_snapshot_restore.go +++ b/test/e2e/cloud-provider-oci/csi_snapshot_restore.go @@ -37,88 +37,88 @@ const ( var _ = Describe("Snapshot Creation and Restore", func() { f := framework.NewBackupFramework("snapshot-restore") - Context("[cloudprovider][storage][csi][snapshot][restore]", func() { - tests := []struct{ - attachmentType string - backupType string - fsType string - }{ - {framework.AttachmentTypeParavirtualized, framework.BackupTypeIncremental, ""}, - {framework.AttachmentTypeParavirtualized, framework.BackupTypeFull, ""}, - {framework.AttachmentTypeISCSI, framework.BackupTypeIncremental, ""}, - {framework.AttachmentTypeISCSI, framework.BackupTypeFull, ""}, - {framework.AttachmentTypeISCSI, framework.BackupTypeIncremental, "xfs"}, - {framework.AttachmentTypeParavirtualized, framework.BackupTypeFull, "ext3"}, - } - for _, entry := range tests { - entry := entry - testName := "Should be able to create and restore " + entry.backupType + " snapshot from " + entry.attachmentType + " volume " - if entry.fsType != "" { - testName += " with " + entry.fsType + " fsType" - } - It(testName, func() { - scParams := map[string]string{framework.AttachmentType: entry.attachmentType} - vscParams := map[string]string{framework.BackupType: entry.backupType} - scParams[framework.FstypeKey] = entry.fsType - testSnapshotAndRestore(f, scParams, vscParams) - }) - } - It("FS should get expanded when a PVC is restored with a lesser size backup (iscsi)", func() { - checkOrInstallCRDs(f) - scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI} - vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") - pvcJig.InitialiseSnapClient(f.SnapClientSet) - - scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - - _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - time.Sleep(60 * time.Second) //waiting for pod to up and running - - vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) - vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) - - pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) - podRestoreName := pvcJig.NewPodForCSI("pod-restored", f.Namespace.Name, pvcRestore.Name, setupF.AdLabel) - - time.Sleep(60 * time.Second) //waiting for pod to up and running - - pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") - - f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) - _ = f.DeleteStorageClass(f.Namespace.Name) - }) - It("FS should get expanded when a PVC is restored with a lesser size backup (paravirtualized)", func() { - checkOrInstallCRDs(f) - scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized} - vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") - pvcJig.InitialiseSnapClient(f.SnapClientSet) - - scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - - _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - time.Sleep(60 * time.Second) //waiting for pod to up and running - - vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) - vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) - - pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) - podRestoreName := pvcJig.NewPodForCSI("pod-restored", f.Namespace.Name, pvcRestore.Name, setupF.AdLabel) - - time.Sleep(60 * time.Second) //waiting for pod to up and running - - pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") - - f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) - _ = f.DeleteStorageClass(f.Namespace.Name) - }) + Context("[cloudprovider][storage][csi][snapshot][restore][test1]", func() { + //tests := []struct{ + // attachmentType string + // backupType string + // fsType string + //}{ + // {framework.AttachmentTypeParavirtualized, framework.BackupTypeIncremental, ""}, + // {framework.AttachmentTypeParavirtualized, framework.BackupTypeFull, ""}, + // {framework.AttachmentTypeISCSI, framework.BackupTypeIncremental, ""}, + // {framework.AttachmentTypeISCSI, framework.BackupTypeFull, ""}, + // {framework.AttachmentTypeISCSI, framework.BackupTypeIncremental, "xfs"}, + // {framework.AttachmentTypeParavirtualized, framework.BackupTypeFull, "ext3"}, + //} + //for _, entry := range tests { + // entry := entry + // testName := "Should be able to create and restore " + entry.backupType + " snapshot from " + entry.attachmentType + " volume " + // if entry.fsType != "" { + // testName += " with " + entry.fsType + " fsType" + // } + // It(testName, func() { + // scParams := map[string]string{framework.AttachmentType: entry.attachmentType} + // vscParams := map[string]string{framework.BackupType: entry.backupType} + // scParams[framework.FstypeKey] = entry.fsType + // testSnapshotAndRestore(f, scParams, vscParams) + // }) + //} + //It("FS should get expanded when a PVC is restored with a lesser size backup (iscsi)", func() { + // checkOrInstallCRDs(f) + // scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI} + // vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} + // pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") + // pvcJig.InitialiseSnapClient(f.SnapClientSet) + // + // scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + // pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + // + // _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) + // + // time.Sleep(60 * time.Second) //waiting for pod to up and running + // + // vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) + // vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) + // + // pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) + // podRestoreName := pvcJig.NewPodForCSI("pod-restored", f.Namespace.Name, pvcRestore.Name, setupF.AdLabel) + // + // time.Sleep(60 * time.Second) //waiting for pod to up and running + // + // pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") + // + // f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) + // _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + // _ = f.DeleteStorageClass(f.Namespace.Name) + //}) + //It("FS should get expanded when a PVC is restored with a lesser size backup (paravirtualized)", func() { + // checkOrInstallCRDs(f) + // scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized} + // vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} + // pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") + // pvcJig.InitialiseSnapClient(f.SnapClientSet) + // + // scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + // pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + // + // _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) + // + // time.Sleep(60 * time.Second) //waiting for pod to up and running + // + // vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) + // vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) + // + // pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) + // podRestoreName := pvcJig.NewPodForCSI("pod-restored", f.Namespace.Name, pvcRestore.Name, setupF.AdLabel) + // + // time.Sleep(60 * time.Second) //waiting for pod to up and running + // + // pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") + // + // f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) + // _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + // _ = f.DeleteStorageClass(f.Namespace.Name) + //}) It("Should be able to create and restore a snapshot from a backup(static case)", func() { checkOrInstallCRDs(f) scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI} diff --git a/test/e2e/cloud-provider-oci/csi_volume_creation.go b/test/e2e/cloud-provider-oci/csi_volume_creation.go index 82b03c2c9d..f21743ff7e 100644 --- a/test/e2e/cloud-provider-oci/csi_volume_creation.go +++ b/test/e2e/cloud-provider-oci/csi_volume_creation.go @@ -44,7 +44,6 @@ var _ = Describe("CSI Volume Creation", func() { // volume name duplicate should not exist for _, volume := range volumes { framework.Logf("volume details %v :", volume) - framework.Logf("cluster ocid from setup is %s", setupF.ClusterOcid) if setupF.AddOkeSystemTags && !framework.HasOkeSystemTags(volume.SystemTags) { framework.Failf("the resource %s is expected to have oke system tags", *volume.Id) } diff --git a/test/e2e/cloud-provider-oci/load_balancer.go b/test/e2e/cloud-provider-oci/load_balancer.go index a2c0a0a4da..cf59336297 100644 --- a/test/e2e/cloud-provider-oci/load_balancer.go +++ b/test/e2e/cloud-provider-oci/load_balancer.go @@ -16,10 +16,8 @@ package e2e import ( "context" - "encoding/json" "fmt" "net" - "reflect" "strconv" "strings" @@ -27,7 +25,6 @@ import ( . "github.com/onsi/gomega" cloudprovider "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci" sharedfw "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" - "github.com/oracle/oci-go-sdk/v65/containerengine" "github.com/oracle/oci-go-sdk/v65/core" "go.uber.org/zap" @@ -59,7 +56,7 @@ var _ = Describe("Service [Slow]", func() { }, }, } - Context("[cloudprovider][ccm][lb][SL][system-tags]", func() { + Context("[cloudprovider][ccm][lb][SL][system-tags][test]", func() { It("should be possible to create and mutate a Service type:LoadBalancer (change nodeport) [Canary]", func() { for _, test := range basicTestArray { By("Running test for: " + test.lbType) @@ -120,7 +117,6 @@ var _ = Describe("Service [Slow]", func() { loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), lbType, "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) sharedfw.Logf("Loadbalancer details %v:", loadBalancer) - sharedfw.Logf("cluster ocid from setup is %s", setupF.ClusterOcid) if setupF.AddOkeSystemTags && !sharedfw.HasOkeSystemTags(loadBalancer.SystemTags) { sharedfw.Failf("Loadbalancer is expected to have the system tags") } diff --git a/test/e2e/cloud-provider-oci/setup.go b/test/e2e/cloud-provider-oci/setup.go index 07f7d616e4..97f5477803 100644 --- a/test/e2e/cloud-provider-oci/setup.go +++ b/test/e2e/cloud-provider-oci/setup.go @@ -1,12 +1,8 @@ package e2e import ( - "time" - "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" sharedfw "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" - oke "github.com/oracle/oci-go-sdk/v65/containerengine" ) var setupF *sharedfw.Framework diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 7cc652c651..238ddba901 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -15,26 +15,13 @@ package framework import ( - "context" "flag" "fmt" - "io/ioutil" "math/rand" - "os" - "strconv" "strings" "time" imageutils "k8s.io/kubernetes/test/utils/image" - - "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" - - . "github.com/onsi/gomega" - "github.com/oracle/oci-go-sdk/v65/common" - oke "github.com/oracle/oci-go-sdk/v65/containerengine" - "github.com/oracle/oci-go-sdk/v65/core" - "github.com/oracle/oci-go-sdk/v65/identity" - "gopkg.in/yaml.v2" ) const (