Skip to content

Commit ea851a7

Browse files
committed
[KOGITO-9428]Update Operator SDK
Signed-off-by: desmax74 <mdessi@redhat.com>
1 parent 021b7bf commit ea851a7

10 files changed

+47
-16
lines changed

.github/workflows/checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,5 @@ jobs:
106106
- name: Check generations
107107
run: |
108108
make generate-all
109-
changed_files=$(git status -s)
110-
[[ -z "$changed_files" ]] || (printf "Generation has not been done on this PR. See modified files: \n$changed_files\n Did you run 'make generate-all' before sending the PR" && exit 1)
109+
chmod +x ${GITHUB_WORKSPACE}/hack/check-created-at-annotation.sh
110+
${GITHUB_WORKSPACE}/hack/check-created-at-annotation.sh

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ endif
5555
# Image URL to use all building/pushing image targets
5656
IMG ?= $(IMAGE_TAG_BASE):$(REDUCED_VERSION)
5757
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
58-
ENVTEST_K8S_VERSION = 1.24
58+
ENVTEST_K8S_VERSION = 1.26
5959

60-
OPERATOR_SDK_VERSION ?= 1.25.0
60+
OPERATOR_SDK_VERSION ?= 1.31.0
6161

6262
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6363
ifeq (,$(shell go env GOBIN))
@@ -132,7 +132,7 @@ test-workflowproj:
132132
##@ Build
133133

134134
.PHONY: build
135-
build: generate ## Build manager binary.
135+
build: manifests generate fmt vet ## Build manager binary.
136136
go build -o bin/manager main.go
137137

138138
.PHONY: build-4-debug
@@ -234,7 +234,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
234234

235235
## Tool Versions
236236
KUSTOMIZE_VERSION ?= v4.5.2
237-
CONTROLLER_TOOLS_VERSION ?= v0.9.2
237+
CONTROLLER_TOOLS_VERSION ?= v0.11.3
238238

239239
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
240240
.PHONY: kustomize
@@ -265,7 +265,7 @@ bundle-build: ## Build the bundle image.
265265

266266
.PHONY: bundle-push
267267
bundle-push: ## Push the bundle image.
268-
$(MAKE) contianer-push IMG=$(BUNDLE_IMG)
268+
$(MAKE) container-push IMG=$(BUNDLE_IMG)
269269

270270
.PHONY: opm
271271
OPM = ./bin/opm

bundle.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
66
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
77
LABEL operators.operatorframework.io.bundle.package.v1=sonataflow-operator
88
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
9-
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.0
9+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.31.0
1010
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
1111
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
1212
LABEL com.redhat.openshift.versions=v4.11

bundle/manifests/sonataflow-operator.clusterserviceversion.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ metadata:
9797
containerImage: quay.io/kiegroup/kogito-serverless-operator-nightly:latest
9898
description: SonataFlow Kubernetes Operator for deploying workflow applications
9999
based on the CNCF Serverless Workflow specification
100-
operators.operatorframework.io/builder: operator-sdk-v1.25.0
100+
operators.operatorframework.io/builder: operator-sdk-v1.31.0
101101
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
102102
repository: https://github.com/kiegroup/kogito-serverless-operator
103103
support: Red Hat
@@ -415,7 +415,7 @@ spec:
415415
- --upstream=http://127.0.0.1:8080/
416416
- --logtostderr=true
417417
- --v=0
418-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
418+
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
419419
name: kube-rbac-proxy
420420
ports:
421421
- containerPort: 8443

bundle/metadata/annotations.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ annotations:
55
operators.operatorframework.io.bundle.metadata.v1: metadata/
66
operators.operatorframework.io.bundle.package.v1: sonataflow-operator
77
operators.operatorframework.io.bundle.channels.v1: alpha
8-
operators.operatorframework.io.metrics.builder: operator-sdk-v1.25.0
8+
operators.operatorframework.io.metrics.builder: operator-sdk-v1.31.0
99
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
1010
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
1111
com.redhat.openshift.versions: v4.11

config/default/manager_auth_proxy_patch.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
spec:
1111
containers:
1212
- name: kube-rbac-proxy
13-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
13+
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
1414
args:
1515
- "--secure-listen-address=0.0.0.0:8443"
1616
- "--upstream=http://127.0.0.1:8080/"

docs/CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
6161

6262
In order to build the project, you need to comply with the following requirements:
6363

64-
- [operator-sdk-v1.25.0+](https://sdk.operatorframework.io/docs/building-operators/golang/installation/)
64+
- [operator-sdk-v1.31.0+](https://sdk.operatorframework.io/docs/building-operators/golang/installation/)
6565
- [Go 1.19+](https://go.dev/dl/)
66-
- [Kubebuilder 3.7.0+](https://github.com/kubernetes-sigs/kubebuilder/releases)
66+
- [Kubebuilder 3.9.1+](https://github.com/kubernetes-sigs/kubebuilder/releases)
6767

6868
GNU Make:
6969
Used to define composite build actions. This should be already installed or available as a

hack/check-created-at-annotation.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
# Copyright 2023 Red Hat, Inc. and/or its affiliates
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# See https://github.com/operator-framework/operator-sdk/issues/6285
17+
# and https://github.com/operator-framework/operator-sdk/pull/6419
18+
19+
changed_files=$(git status -s)
20+
check_file=$(expr "$changed_files" == "M bundle/manifests/sonataflow-operator.clusterserviceversion.yaml")
21+
22+
if [[ "$check_file" == "0" ]] ; then
23+
##@TODO
24+
check_lines=$(git diff HEAD --no-ext-diff --unified=0 --exit-code -a --no-prefix | grep "^\+")
25+
var="+++ bundle/manifests/sonataflow-operator.clusterserviceversion.yaml + createdAt:"
26+
if [[ $check_lines = $var* ]] ; then
27+
changed_files=''
28+
fi
29+
else
30+
[[ -z "$changed_files" ]] || (printf "Generation has not been done on this PR. See modified files: \n$changed_files\n Did you run 'make generate-all' before sending the PR" && exit 1)
31+
fi

hack/ci/install-operator-sdk.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
set -e
1616

17-
default_operator_sdk_version=v1.25.0
17+
default_operator_sdk_version=v1.31.0
1818

1919
if [[ -z ${OPERATOR_SDK_VERSION} ]]; then
2020
OPERATOR_SDK_VERSION=$default_operator_sdk_version

operator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3144,7 +3144,7 @@ spec:
31443144
- --upstream=http://127.0.0.1:8080/
31453145
- --logtostderr=true
31463146
- --v=0
3147-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
3147+
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
31483148
name: kube-rbac-proxy
31493149
ports:
31503150
- containerPort: 8443

0 commit comments

Comments
 (0)