From deb0d1c09bf2ef35134e8ef758a6c44646e72b8b Mon Sep 17 00:00:00 2001 From: Malay Kumar Parida Date: Wed, 3 Jul 2024 11:51:49 +0530 Subject: [PATCH] Update Dockerfile and github workflow to use golang 1.22 Also update CONTROLLER_GEN_VERSION to v0.13.0 as earlier versions fail with golang 1.22 on github actions. Signed-off-by: Malay Kumar Parida --- .github/workflows/ocs-operator-ci.yaml | 6 +++--- Dockerfile | 2 +- Makefile | 2 +- api/v1/zz_generated.deepcopy.go | 4 ++-- api/v1alpha1/zz_generated.deepcopy.go | 1 - config/crd/bases/ocs.openshift.io_ocsinitializations.yaml | 3 +-- config/crd/bases/ocs.openshift.io_storageclusters.yaml | 3 +-- config/crd/bases/ocs.openshift.io_storageconsumers.yaml | 3 +-- config/crd/bases/ocs.openshift.io_storageprofiles.yaml | 3 +-- config/crd/bases/ocs.openshift.io_storagerequests.yaml | 3 +-- config/rbac/role.yaml | 1 - .../crds/ocs/ocs.openshift.io_ocsinitializations.yaml | 3 +-- .../crds/ocs/ocs.openshift.io_storageclusters.yaml | 3 +-- .../crds/ocs/ocs.openshift.io_storageconsumers.yaml | 3 +-- .../crds/ocs/ocs.openshift.io_storageprofiles.yaml | 3 +-- .../crds/ocs/ocs.openshift.io_storagerequests.yaml | 3 +-- deploy/ocs-operator/manifests/ocsinitialization.crd.yaml | 2 +- deploy/ocs-operator/manifests/storagecluster.crd.yaml | 2 +- deploy/ocs-operator/manifests/storageconsumer.crd.yaml | 2 +- deploy/ocs-operator/manifests/storageprofile.crd.yaml | 2 +- deploy/ocs-operator/manifests/storagerequest.crd.yaml | 2 +- metrics/Dockerfile | 2 +- .../ocs-operator/api/v4/v1/zz_generated.deepcopy.go | 4 ++-- .../ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go | 1 - .../ocs-operator/api/v4/v1/zz_generated.deepcopy.go | 4 ++-- .../ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go | 1 - 26 files changed, 27 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ocs-operator-ci.yaml b/.github/workflows/ocs-operator-ci.yaml index 069260016a..f70d7051f2 100644 --- a/.github/workflows/ocs-operator-ci.yaml +++ b/.github/workflows/ocs-operator-ci.yaml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - go: ["1.21"] + go: ["1.22"] steps: - uses: actions/checkout@v4 with: @@ -46,7 +46,7 @@ jobs: strategy: fail-fast: false matrix: - go: ["1.21"] + go: ["1.22"] steps: - uses: actions/setup-go@v5 with: @@ -66,7 +66,7 @@ jobs: strategy: fail-fast: false matrix: - go: ["1.21"] + go: ["1.22"] steps: - uses: actions/setup-go@v5 with: diff --git a/Dockerfile b/Dockerfile index 2db4c8c67b..d43476fd75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Build stage 1 -FROM golang:1.21 as builder +FROM docker.io/library/golang:1.22 as builder WORKDIR /workspace diff --git a/Makefile b/Makefile index 14d839d9f3..b1575352aa 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ LOCALBIN=$(shell pwd)/bin KUSTOMIZE_VERSION=v4.5.5 KUSTOMIZE=$(LOCALBIN)/kustomize -CONTROLLER_GEN_VERSION=v0.9.2 +CONTROLLER_GEN_VERSION=v0.13.0 CONTROLLER_GEN=$(LOCALBIN)/controller-gen diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 0c1983695b..7900ed5c84 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2020 Red Hat OpenShift Container Storage. @@ -575,7 +574,8 @@ func (in *NodeTopologyMap) DeepCopyInto(out *NodeTopologyMap) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = make(TopologyLabelValues, len(*in)) copy(*out, *in) } diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 9998592866..b6c82b4f46 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2020 Red Hat OpenShift Container Storage. diff --git a/config/crd/bases/ocs.openshift.io_ocsinitializations.yaml b/config/crd/bases/ocs.openshift.io_ocsinitializations.yaml index 2275ed84fc..505368e5b2 100644 --- a/config/crd/bases/ocs.openshift.io_ocsinitializations.yaml +++ b/config/crd/bases/ocs.openshift.io_ocsinitializations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: ocsinitializations.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/config/crd/bases/ocs.openshift.io_storageclusters.yaml b/config/crd/bases/ocs.openshift.io_storageclusters.yaml index ea69e44ef5..64f431a65f 100644 --- a/config/crd/bases/ocs.openshift.io_storageclusters.yaml +++ b/config/crd/bases/ocs.openshift.io_storageclusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storageclusters.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/config/crd/bases/ocs.openshift.io_storageconsumers.yaml b/config/crd/bases/ocs.openshift.io_storageconsumers.yaml index 95f8707b10..76eef4681f 100644 --- a/config/crd/bases/ocs.openshift.io_storageconsumers.yaml +++ b/config/crd/bases/ocs.openshift.io_storageconsumers.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storageconsumers.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/config/crd/bases/ocs.openshift.io_storageprofiles.yaml b/config/crd/bases/ocs.openshift.io_storageprofiles.yaml index f0f37aa6e0..e68feb425b 100644 --- a/config/crd/bases/ocs.openshift.io_storageprofiles.yaml +++ b/config/crd/bases/ocs.openshift.io_storageprofiles.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storageprofiles.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/config/crd/bases/ocs.openshift.io_storagerequests.yaml b/config/crd/bases/ocs.openshift.io_storagerequests.yaml index ee27bded28..c459b5e184 100644 --- a/config/crd/bases/ocs.openshift.io_storagerequests.yaml +++ b/config/crd/bases/ocs.openshift.io_storagerequests.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storagerequests.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index f6325d357d..5b617b7034 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: manager-role rules: - apiGroups: diff --git a/deploy/csv-templates/crds/ocs/ocs.openshift.io_ocsinitializations.yaml b/deploy/csv-templates/crds/ocs/ocs.openshift.io_ocsinitializations.yaml index 2275ed84fc..505368e5b2 100644 --- a/deploy/csv-templates/crds/ocs/ocs.openshift.io_ocsinitializations.yaml +++ b/deploy/csv-templates/crds/ocs/ocs.openshift.io_ocsinitializations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: ocsinitializations.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusters.yaml b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusters.yaml index ea69e44ef5..64f431a65f 100644 --- a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusters.yaml +++ b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageclusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storageclusters.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageconsumers.yaml b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageconsumers.yaml index 95f8707b10..76eef4681f 100644 --- a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageconsumers.yaml +++ b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageconsumers.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storageconsumers.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageprofiles.yaml b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageprofiles.yaml index f0f37aa6e0..e68feb425b 100644 --- a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageprofiles.yaml +++ b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storageprofiles.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storageprofiles.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storagerequests.yaml b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storagerequests.yaml index ee27bded28..c459b5e184 100644 --- a/deploy/csv-templates/crds/ocs/ocs.openshift.io_storagerequests.yaml +++ b/deploy/csv-templates/crds/ocs/ocs.openshift.io_storagerequests.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storagerequests.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/deploy/ocs-operator/manifests/ocsinitialization.crd.yaml b/deploy/ocs-operator/manifests/ocsinitialization.crd.yaml index eaeef0c0f5..0a3335902a 100644 --- a/deploy/ocs-operator/manifests/ocsinitialization.crd.yaml +++ b/deploy/ocs-operator/manifests/ocsinitialization.crd.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.13.0 name: ocsinitializations.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/deploy/ocs-operator/manifests/storagecluster.crd.yaml b/deploy/ocs-operator/manifests/storagecluster.crd.yaml index d42f6e6334..8bc0b03e4b 100644 --- a/deploy/ocs-operator/manifests/storagecluster.crd.yaml +++ b/deploy/ocs-operator/manifests/storagecluster.crd.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.13.0 name: storageclusters.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/deploy/ocs-operator/manifests/storageconsumer.crd.yaml b/deploy/ocs-operator/manifests/storageconsumer.crd.yaml index c0da146377..76eef4681f 100644 --- a/deploy/ocs-operator/manifests/storageconsumer.crd.yaml +++ b/deploy/ocs-operator/manifests/storageconsumer.crd.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.13.0 name: storageconsumers.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/deploy/ocs-operator/manifests/storageprofile.crd.yaml b/deploy/ocs-operator/manifests/storageprofile.crd.yaml index f3b6ef3a58..e68feb425b 100644 --- a/deploy/ocs-operator/manifests/storageprofile.crd.yaml +++ b/deploy/ocs-operator/manifests/storageprofile.crd.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.13.0 name: storageprofiles.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/deploy/ocs-operator/manifests/storagerequest.crd.yaml b/deploy/ocs-operator/manifests/storagerequest.crd.yaml index 6f5ddf43c0..c459b5e184 100644 --- a/deploy/ocs-operator/manifests/storagerequest.crd.yaml +++ b/deploy/ocs-operator/manifests/storagerequest.crd.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.13.0 name: storagerequests.ocs.openshift.io spec: group: ocs.openshift.io diff --git a/metrics/Dockerfile b/metrics/Dockerfile index fc8f244125..a7a032fbb5 100644 --- a/metrics/Dockerfile +++ b/metrics/Dockerfile @@ -1,6 +1,6 @@ # Build stage 1 -FROM golang:1.21 as builder +FROM docker.io/library/golang:1.22 as builder WORKDIR /workspace diff --git a/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go b/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go index 0c1983695b..7900ed5c84 100644 --- a/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go +++ b/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2020 Red Hat OpenShift Container Storage. @@ -575,7 +574,8 @@ func (in *NodeTopologyMap) DeepCopyInto(out *NodeTopologyMap) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = make(TopologyLabelValues, len(*in)) copy(*out, *in) } diff --git a/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go b/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go index 9998592866..b6c82b4f46 100644 --- a/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go +++ b/metrics/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2020 Red Hat OpenShift Container Storage. diff --git a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go index 0c1983695b..7900ed5c84 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2020 Red Hat OpenShift Container Storage. @@ -575,7 +574,8 @@ func (in *NodeTopologyMap) DeepCopyInto(out *NodeTopologyMap) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = make(TopologyLabelValues, len(*in)) copy(*out, *in) } diff --git a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go index 9998592866..b6c82b4f46 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2020 Red Hat OpenShift Container Storage.