Skip to content

Commit

Permalink
[KOGITO-9428]Update Operator SDK
Browse files Browse the repository at this point in the history
Signed-off-by: desmax74 <[email protected]>
  • Loading branch information
desmax74 committed Jun 22, 2023
1 parent 22aec53 commit 1ce0ada
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 15 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,9 @@ jobs:
run: |
make generate-all
changed_files=$(git status -s)
[[ -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)
["$changed_files" == "M bundle/manifests/sonataflow-operator.clusterserviceversion.yaml"] ; then
printf "clusterserviceversion.yaml with createdAt"
else
printf "clusterserviceversion.yaml with createdAt 2"
[[ -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)
fi
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ endif
# Image URL to use all building/pushing image targets
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24
ENVTEST_K8S_VERSION = 1.26

OPERATOR_SDK_VERSION ?= 1.25.0
OPERATOR_SDK_VERSION ?= 1.29.0

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

.PHONY: build
build: generate ## Build manager binary.
build: manifests generate fmt vet ## Build manager binary.
go build -o bin/manager main.go

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

## Tool Versions
KUSTOMIZE_VERSION ?= v4.5.2
CONTROLLER_TOOLS_VERSION ?= v0.9.2
CONTROLLER_TOOLS_VERSION ?= v0.11.3

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

.PHONY: bundle-push
bundle-push: ## Push the bundle image.
$(MAKE) contianer-push IMG=$(BUNDLE_IMG)
$(MAKE) container-push IMG=$(BUNDLE_IMG)

.PHONY: opm
OPM = ./bin/opm
Expand Down
2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=sonataflow-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.0
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.29.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ metadata:
}
]
capabilities: Basic Install
operators.operatorframework.io/builder: operator-sdk-v1.25.0
operators.operatorframework.io/builder: operator-sdk-v1.29.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
name: sonataflow-operator.v2.0.0-snapshot
namespace: placeholder
Expand Down Expand Up @@ -404,7 +404,7 @@ spec:
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
name: kube-rbac-proxy
ports:
- containerPort: 8443
Expand Down
2 changes: 1 addition & 1 deletion bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ annotations:
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: sonataflow-operator
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.25.0
operators.operatorframework.io.metrics.builder: operator-sdk-v1.29.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3

Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
spec:
containers:
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)

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

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

GNU Make:
Used to define composite build actions. This should be already installed or available as a
Expand Down
29 changes: 29 additions & 0 deletions hack/checkCreatedAtAnnotation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# Copyright 2023 Red Hat, Inc. and/or its affiliates
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

changed_files=$(git status -s)
printf "$changed_files"
check_file=$(expr "$changed_files" == "M bundle/manifests/sonataflow-operator.clusterserviceversion.yaml")
echo "$check_file"

if [[ "$check_file" == "0" ]] ; then
printf "Checking if the createdAt annotation has changed"
##@TODO
changed_files=''
diff=$(git diff bundle/manifests/sonataflow-operator.clusterserviceversion.yaml)
echo $diff =="+ createdAt:"
else
[[ -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)
fi
2 changes: 1 addition & 1 deletion hack/ci/install-operator-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
set -e

default_operator_sdk_version=v1.25.0
default_operator_sdk_version=v1.29.0

if [[ -z ${OPERATOR_SDK_VERSION} ]]; then
OPERATOR_SDK_VERSION=$default_operator_sdk_version
Expand Down
2 changes: 1 addition & 1 deletion operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3144,7 +3144,7 @@ spec:
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1
name: kube-rbac-proxy
ports:
- containerPort: 8443
Expand Down

0 comments on commit 1ce0ada

Please sign in to comment.