-
Notifications
You must be signed in to change notification settings - Fork 120
CSPL-3675 Update Operator-SDK to v1.39 #1488
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
Merged
Merged
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
a963e2e
v1.33 migration
3690262
Upgrade bias language excl
9a33b9b
Upgrade bias language excl
6810b82
Merge remote-tracking branch 'origin/CSPL-3675-operator-sdk' into CSP…
452fc63
v.1.34.0 migration
d15891c
v.1.34.0 migration
9943654
fix docker-buildx
3029bbe
fix docker-buildx
a175dce
fix docker-buildx
0f32b96
v 1.3.6 migration
10bbfad
v 1.3.8 migration
04e2782
v 1.3.9 migration
c0adb8b
Merge branch 'develop' into CSPL-3675-operator-sdk
2b73278
Update controller.go
787eb60
Update ns watching
b71204f
Update ns watching
fababeb
fix tests
281162a
fix tests
c222936
fix test
98c8396
fixed test cases fo rfake client
24244ab
fixed test cases
559f255
fixed v3 test cases
2249a5f
fixed test cases
7fe764c
upgrade operator crd
68470f3
use WithAuthenticationAndAuthorization filter provider
2b0251b
fix gomod
2dfa07f
merge
5feaef9
Up the golang version
a1da4d7
Up the golang version
8b2819a
Up the golang version
737f0eb
Up the golang version
9d9a281
Up the golang version
68d8df5
Fix test command
e0a6c07
Fix test command
316b079
Fix controller path in coverage out
14c8a65
fix
9aa7d82
fix docker-buildx
203e2fa
fix docker-buildx
1d98d8d
Up goland version in dockerfile
78c309d
Rename package name
fdff2b5
change order of testing
f2f3067
only test splkcontroller package
6df2d60
remove goveralls
9b777b9
add --keep-separate-coverprofiles to unit tests
rlieberman-splunk d702fdd
comment out TestAddToManager
6dd18d0
add err message
6741fa3
add import
188e015
add test logging
fa82d7d
-
82da34d
-
6f6208c
-
e1094bf
Fix testaddtomanager
6614f17
fix test
881df34
Revert "remove goveralls"
cc6c5e1
Revert "add --keep-separate-coverprofiles to unit tests"
9dbd0f4
fix main.go
325d56f
Merge branch 'develop' into CSPL-3675-operator-sdk
d1134dd
rename
7cb5a92
fix typo
f2cb1f0
Merge branch 'develop' into CSPL-3675-operator-sdk
533e251
Add stabilization phase
6421ae9
Increase stabilization period
a99e52e
comment out verify
b06c029
run int tests
2e37489
Apply review suggestions
9e7b92e
Remove onlycontrollerowner
2f1c1b4
Remove comment
4653468
rename to intController
aabe029
test
kasiakoziol 6512b4f
Add debug logs for appframeworksS1 test
b2d444a
test
kasiakoziol 6547244
test
kasiakoziol 0669f68
test
kasiakoziol ca7997e
test
kasiakoziol dbc490e
test
kasiakoziol e245363
fix
kasiakoziol e3b4312
test owner type in controller
kasiakoziol 4a61c5d
cleanup
kasiakoziol c762723
Remove branch form int testing
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ ${ENVIRONMENT}: | |
VERSION ?= 2.8.0 | ||
|
||
# SPLUNK_ENTERPRISE_IMAGE defines the splunk docker tag that is used as default image. | ||
SPLUNK_ENTERPRISE_IMAGE ?= "docker.io/splunk/splunk:edge" | ||
SPLUNK_ENTERPRISE_IMAGE ?= "docker.io/splunk/splunk" | ||
|
||
# WATCH_NAMESPACE defines if its clusterwide operator or namespace specific | ||
# by default we leave it as clusterwide if it has to be namespace specific, | ||
|
@@ -54,7 +54,7 @@ BUNDLE_IMG ?= ${IMAGE_TAG_BASE}-bundle:v${VERSION} | |
# Image URL to use all building/pushing image targets | ||
IMG ?= controller:latest | ||
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. | ||
ENVTEST_K8S_VERSION = 1.26.0 | ||
ENVTEST_K8S_VERSION = 1.31.0 | ||
|
||
ignore-not-found ?= True | ||
|
||
|
@@ -127,20 +127,20 @@ scheck: ## Run static check against code | |
go install honnef.co/go/tools/cmd/[email protected] | ||
staticcheck ./... | ||
|
||
vet: setup/ginkgo ## Run go vet against code. | ||
vet: setup/ginkgo ## Run go vet against code. | ||
go vet ./... | ||
|
||
test: manifests generate fmt vet envtest ## Run tests. | ||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use ${ENVTEST_K8S_VERSION} --bin-dir $(LOCALBIN) -p path)" ginkgo --junit-report=unit_test.xml --output-dir=`pwd` -vv --trace --keep-going --timeout=3h --cover --covermode=count --coverprofile=coverage.out ./pkg/splunk/common ./pkg/splunk/enterprise ./pkg/splunk/controller ./pkg/splunk/client ./pkg/splunk/util ./controllers | ||
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use ${ENVTEST_K8S_VERSION} --bin-dir $(LOCALBIN) -p path)" ginkgo --junit-report=unit_test.xml --output-dir=`pwd` -vv --trace --keep-going --timeout=3h --cover --covermode=count --coverprofile=coverage.out ./pkg/splunk/common ./pkg/splunk/enterprise ./pkg/splunk/client ./pkg/splunk/util ./internal/controller ./pkg/splunk/splkcontroller | ||
|
||
|
||
##@ Build | ||
|
||
build: setup/ginkgo manifests generate fmt vet ## Build manager binary. | ||
go build -o bin/manager main.go | ||
go build -o bin/manager cmd/main.go | ||
|
||
run: manifests generate fmt vet ## Run a controller from your host. | ||
go run ./main.go | ||
go run ./cmd/main.go | ||
|
||
docker-build: #test ## Build docker image with the manager. | ||
docker build -t ${IMG} . | ||
|
@@ -162,20 +162,23 @@ BASE_IMAGE_VERSION ?= b2a1bec3dfbc7a14a1d84d98934dfe8fdde6eb822a211286601cf109cb | |
|
||
docker-buildx: | ||
@if [ -z "${IMG}" ]; then \ | ||
echo "Error: IMG is a mandatory argument. Usage: make docker-buildx IMG=<image_name> ...."; \ | ||
exit 1; \ | ||
fi; \ | ||
if echo "${BASE_IMAGE}" | grep -q "distroless"; then \ | ||
DOCKERFILE="Dockerfile.distroless"; \ | ||
BUILD_TAG="${IMG}-distroless"; \ | ||
else \ | ||
DOCKERFILE="Dockerfile"; \ | ||
BUILD_TAG="${IMG}"; \ | ||
fi; \ | ||
docker buildx build --push --platform="${PLATFORMS}" \ | ||
--build-arg BASE_IMAGE="${BASE_IMAGE}" \ | ||
--build-arg BASE_IMAGE_VERSION="${BASE_IMAGE_VERSION}" \ | ||
--tag "$$BUILD_TAG" -f "$$DOCKERFILE" . | ||
echo "Error: IMG is a mandatory argument. Usage: make docker-buildx IMG=<image_name> ...."; \ | ||
exit 1; \ | ||
fi; \ | ||
docker buildx create --name project-v3-builder --use || true; \ | ||
docker buildx use project-v3-builder; \ | ||
if echo "${BASE_IMAGE}" | grep -q "distroless"; then \ | ||
DOCKERFILE="Dockerfile.distroless"; \ | ||
BUILD_TAG="${IMG}-distroless"; \ | ||
else \ | ||
DOCKERFILE="Dockerfile"; \ | ||
BUILD_TAG="${IMG}"; \ | ||
fi; \ | ||
docker buildx build --push --platform="${PLATFORMS}" \ | ||
--build-arg BASE_IMAGE="${BASE_IMAGE}" \ | ||
--build-arg BASE_IMAGE_VERSION="${BASE_IMAGE_VERSION}" \ | ||
--tag "$$BUILD_TAG" -f "$$DOCKERFILE" .; \ | ||
- docker buildx rm project-v3-builder || true | ||
|
||
|
||
|
||
|
@@ -205,7 +208,7 @@ $(LOCALBIN): | |
mkdir -p $(LOCALBIN) | ||
|
||
## Tool Versions | ||
KUSTOMIZE_VERSION ?= v4.5.5 | ||
KUSTOMIZE_VERSION ?= v5.4.3 | ||
CONTROLLER_TOOLS_VERSION ?= v0.16.1 | ||
|
||
CONTROLLER_GEN = $(LOCALBIN)/controller-gen | ||
|
@@ -255,7 +258,7 @@ ifeq (,$(shell which opm 2>/dev/null)) | |
set -e ;\ | ||
mkdir -p $(dir $(OPM)) ;\ | ||
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \ | ||
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.23.0/$${OS}-$${ARCH}-opm ;\ | ||
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.24.2/$${OS}-$${ARCH}-opm ;\ | ||
chmod +x $(OPM) ;\ | ||
} | ||
else | ||
|
@@ -400,3 +403,9 @@ setup/ginkgo: | |
@go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@latest | ||
@echo Installing gomega | ||
@go get github.com/onsi/gomega/... | ||
|
||
.PHONY: build-installer | ||
build-installer: manifests generate kustomize | ||
mkdir -p dist | ||
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} | ||
$(KUSTOMIZE) build config/default > dist/install.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.