Skip to content

Commit be367fa

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

10 files changed

+48
-15
lines changed

.github/workflows/checks.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,9 @@ jobs:
107107
run: |
108108
make generate-all
109109
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)
110+
["$changed_files" == "M bundle/manifests/sonataflow-operator.clusterserviceversion.yaml"] ; then
111+
printf "clusterserviceversion.yaml with createdAt"
112+
else
113+
printf "clusterserviceversion.yaml with createdAt 2"
114+
[[ -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)
115+
fi

Makefile

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

57-
OPERATOR_SDK_VERSION ?= 1.25.0
57+
OPERATOR_SDK_VERSION ?= 1.29.0
5858

5959
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6060
ifeq (,$(shell go env GOBIN))
@@ -129,7 +129,7 @@ test-workflowproj:
129129
##@ Build
130130

131131
.PHONY: build
132-
build: generate ## Build manager binary.
132+
build: manifests generate fmt vet ## Build manager binary.
133133
go build -o bin/manager main.go
134134

135135
.PHONY: build-4-debug
@@ -231,7 +231,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
231231

232232
## Tool Versions
233233
KUSTOMIZE_VERSION ?= v4.5.2
234-
CONTROLLER_TOOLS_VERSION ?= v0.9.2
234+
CONTROLLER_TOOLS_VERSION ?= v0.11.3
235235

236236
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
237237
.PHONY: kustomize
@@ -262,7 +262,7 @@ bundle-build: ## Build the bundle image.
262262

263263
.PHONY: bundle-push
264264
bundle-push: ## Push the bundle image.
265-
$(MAKE) contianer-push IMG=$(BUNDLE_IMG)
265+
$(MAKE) container-push IMG=$(BUNDLE_IMG)
266266

267267
.PHONY: opm
268268
OPM = ./bin/opm

bundle.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
2020
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
2121
LABEL operators.operatorframework.io.bundle.package.v1=sonataflow-operator
2222
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
23-
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.0
23+
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.29.0
2424
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
2525
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
2626

bundle/manifests/sonataflow-operator.clusterserviceversion.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ metadata:
9393
}
9494
]
9595
capabilities: Basic Install
96-
operators.operatorframework.io/builder: operator-sdk-v1.25.0
96+
operators.operatorframework.io/builder: operator-sdk-v1.29.0
9797
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
9898
name: sonataflow-operator.v2.0.0-snapshot
9999
namespace: placeholder
@@ -404,7 +404,7 @@ spec:
404404
- --upstream=http://127.0.0.1:8080/
405405
- --logtostderr=true
406406
- --v=0
407-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
407+
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
408408
name: kube-rbac-proxy
409409
ports:
410410
- 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.29.0
99
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
1010
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
1111

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.29.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/checkCreatedAtAnnotation.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
changed_files=$(git status -s)
17+
check_file=$(expr "$changed_files" == "M bundle/manifests/sonataflow-operator.clusterserviceversion.yaml")
18+
19+
if [[ "$check_file" == "0" ]] ; then
20+
##@TODO
21+
check_lines=$(git diff HEAD --no-ext-diff --unified=0 --exit-code -a --no-prefix | grep "^\+")
22+
var="+++ bundle/manifests/sonataflow-operator.clusterserviceversion.yaml + createdAt:"
23+
if [[ $check_lines = $var* ]] ; then
24+
changed_files=''
25+
fi
26+
else
27+
[[ -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)
28+
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.29.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)