Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency updates (Go 1.17, K8s 1.23.4, controller-runtime 0.11.1, sdk 1.17.0) #1578

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
namespace: openshift
name: release
tag: rhel-8-release-golang-1.16-openshift-4.8
tag: rhel-8-release-golang-1.17-openshift-4.11
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ else
GOBIN=$(shell go env GOBIN)
endif

CONTROLLER_GEN_VERSION=v0.4.1
CRD_OPTIONS ?= "crd:trivialVersions=true"
KUSTOMIZE_VERSION=v4.5.2
CONTROLLER_GEN_VERSION=v0.8.0

all: ocs-operator ocs-registry ocs-must-gather

Expand Down Expand Up @@ -177,7 +177,7 @@ generate: controller-gen
# Generate manifests e.g. CRD, RBAC etc.
manifests: controller-gen
@echo Updating generated manifests
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=manager-role crd paths=./api/... webhook paths="./..." output:crd:artifacts:config=config/crd/bases

verify-deps: deps-update
@echo "Verifying dependency files"
Expand All @@ -199,14 +199,16 @@ run: manifests generate

# find or download controller-gen if necessary
controller-gen:
ifeq (, $(shell which controller-gen))
ifneq ($(CONTROLLER_GEN_VERSION), $(shell controller-gen --version | awk -F ":" '{print $2}'))
@{ \
echo "Installing controller-gen@$(CONTROLLER_GEN_VERSION)" ;\
set -e ;\
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION) ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
echo "Installed controller-gen@$(CONTROLLER_GEN_VERSION)" ;\
}
CONTROLLER_GEN=$(GOBIN)/controller-gen
else
Expand All @@ -216,12 +218,14 @@ endif
kustomize:
ifeq (, $(shell which kustomize))
@{ \
echo "Installing kustomize/v4@${KUSTOMIZE_VERSION}" ;\
set -e ;\
KUSTOMIZE_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$KUSTOMIZE_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/kustomize/kustomize/[email protected] ;\
go get sigs.k8s.io/kustomize/kustomize/v4@${KUSTOMIZE_VERSION} ;\
rm -rf $$KUSTOMIZE_GEN_TMP_DIR ;\
echo "Installed kustomize/v4@${KUSTOMIZE_VERSION}" ;\
}
export KUSTOMIZE=$(GOBIN)/kustomize
else
Expand Down
20 changes: 16 additions & 4 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,27 @@ layout: go.kubebuilder.io/v2
projectName: ocs-operator
repo: github.com/red-hat-storage/ocs-operator
resources:
- group: ocs
-
controller: true
domain: openshift.io
group: ocs
kind: OCSInitialization
path: github.com/red-hat-storage/ocs-operator/api/v1
version: v1
- group: ocs
-
controller: true
domain: openshift.io
group: ocs
kind: StorageCluster
path: github.com/red-hat-storage/ocs-operator/api/v1
version: v1
- group: ocs
-
controller: true
domain: openshift.io
group: ocs
kind: StorageConsumer
path: github.com/red-hat-storage/ocs-operator/api/v1alpha1
version: v1alpha1
version: 3-alpha
version: "3"
plugins:
go.sdk.operatorframework.io/v2-alpha: {}
1 change: 1 addition & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions build/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# FROM registry.access.redhat.com/ubi8/go-toolset AS builder
# ubi8/go-toolset only supports up to Go v1.15 (20 Aug 2021)
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /go/src/github.com/red-hat-storage/ocs-operator
COPY . .
Expand Down
29 changes: 14 additions & 15 deletions config/crd/bases/ocs.openshift.io_ocsinitializations.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: ocsinitializations.ocs.openshift.io
spec:
Expand Down Expand Up @@ -138,23 +137,23 @@ spec:
description: 'ObjectReference contains enough information to let
you inspect or modify the referred object. --- New uses of this
type are discouraged because of difficulty describing its usage
when embedded in APIs. 1. Ignored fields. It includes many fields
when embedded in APIs. 1. Ignored fields. It includes many fields
which are not generally honored. For instance, ResourceVersion
and FieldPath are both very rarely valid in actual usage. 2.
Invalid usage help. It is impossible to add specific help for
individual usage. In most embedded usages, there are particular restrictions
and FieldPath are both very rarely valid in actual usage. 2. Invalid
usage help. It is impossible to add specific help for individual
usage. In most embedded usages, there are particular restrictions
like, "must refer only to types A and B" or "UID not honored"
or "name must be restricted". Those cannot be well described
when embedded. 3. Inconsistent validation. Because the usages
are different, the validation rules are different by usage, which
makes it hard for users to predict what will happen. 4. The fields
or "name must be restricted". Those cannot be well described when
embedded. 3. Inconsistent validation. Because the usages are
different, the validation rules are different by usage, which
makes it hard for users to predict what will happen. 4. The fields
are both imprecise and overly precise. Kind is not a precise
mapping to a URL. This can produce ambiguity during interpretation
mapping to a URL. This can produce ambiguity during interpretation
and require a REST mapping. In most cases, the dependency is
on the group,resource tuple and the version of the actual
struct is irrelevant. 5. We cannot easily change it. Because
this type is embedded in many locations, updates to this type will
affect numerous schemas. Don''t make new APIs embed an underspecified
on the group,resource tuple and the version of the actual struct
is irrelevant. 5. We cannot easily change it. Because this type
is embedded in many locations, updates to this type will affect
numerous schemas. Don''t make new APIs embed an underspecified
API type they do not control. Instead of using this type, create
a locally provided and used type that is well-focused on your
reference. For example, ServiceReferences for admission registration:
Expand Down
Loading