Skip to content

Commit a5fd3f7

Browse files
Support Octavia setting route annotations
This patch allows Octavia to set its route annotations. Depends-On: openstack-k8s-operators/octavia-operator#403
2 parents 4fc2990 + c2bf0c5 commit a5fd3f7

File tree

118 files changed

+4762
-1313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+4762
-1313
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: tools
33
namespace: openstack-k8s-operators
4-
tag: ci-build-root-golang-1.20-sdk-1.31
4+
tag: ci-build-root-golang-1.21-sdk-1.31

.github/workflows/build-openstack-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
1616
with:
1717
operator_name: openstack
18-
go_version: 1.20.x
18+
go_version: 1.21.x
1919
operator_sdk_version: 1.31.0
2020
bundle_dockerfile: ./bundle.Dockerfile
2121
catalog_extra_bundles_script: ./hack/pin-bundle-images.sh

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install Go
2222
uses: actions/setup-go@v3
2323
with:
24-
go-version: 1.20.x
24+
go-version: 1.21.x
2525
- uses: actions/checkout@v4
2626
with:
2727
# this fetches all branches. Needed because we need gh-pages branch for deploy to work

.github/workflows/kustom.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Install Go
1717
uses: actions/setup-go@v3
1818
with:
19-
go-version: 1.20.x
19+
go-version: 1.21.x
2020
- uses: actions/checkout@v4
2121
with:
2222
# this fetches all branches. Needed because we need gh-pages branch for deploy to work

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ repos:
5656
entry: bashate --error . --ignore=E006,E040,E011,E020,E012
5757

5858
- repo: https://github.com/golangci/golangci-lint
59-
rev: v1.55.2
59+
rev: v1.59.1
6060
hooks:
6161
- id: golangci-lint-full
6262
args: ["-v"]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.20
1+
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21
22
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
33
# Build the manager binary
44
FROM $GOLANG_BUILDER AS builder

Makefile

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ OPERATOR_SDK_VERSION ?= v1.31.0
5454
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/openstack-operator:latest
5555
IMG ?= $(DEFAULT_IMG)
5656
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
57-
ENVTEST_K8S_VERSION = 1.28.0
57+
ENVTEST_K8S_VERSION = 1.29
5858

5959
CRDDESC_OVERRIDE ?= :maxDescLen=0
6060

@@ -107,9 +107,8 @@ docs-clean:
107107
rm -r docs_build
108108

109109
.PHONY: docs-examples
110-
docs-kustomize-examples: export KUSTOMIZE_VERSION=v5.0.1
111-
docs-kustomize-examples: yq kustomize ## Generate updated docs from examples using kustomize
112-
KUSTOMIZE=$(KUSTOMIZE) LOCALBIN=$(LOCALBIN) ./docs/kustomize_to_docs.sh
110+
docs-kustomize-examples: oc yq ## Generate updated docs from examples using kustomize
111+
LOCALBIN=$(LOCALBIN) ./docs/kustomize_to_docs.sh
113112

114113
##@ General
115114

@@ -148,13 +147,14 @@ vet: gowork ## Run go vet against code.
148147
go vet ./...
149148
go vet ./apis/...
150149

150+
BRANCH=main
151151
.PHONY: force-bump
152152
force-bump: ## Force bump after tagging
153-
for dep in $$(cat go.mod | grep openstack-k8s-operators | grep -vE -- 'indirect|openstack-operator' | awk '{print $$1}'); do \
154-
go get $$dep@main ; \
153+
for dep in $$(cat go.mod | grep openstack-k8s-operators | grep -vE -- 'indirect|openstack-operator|^replace' | awk '{print $$1}'); do \
154+
go get $$dep@$(BRANCH) ; \
155155
done
156-
for dep in $$(cat apis/go.mod | grep openstack-k8s-operators | grep -vE -- 'indirect|openstack-operator' | awk '{print $$1}'); do \
157-
cd ./apis && go get $$dep@main && cd .. ; \
156+
for dep in $$(cat apis/go.mod | grep openstack-k8s-operators | grep -vE -- 'indirect|openstack-operator|^replace' | awk '{print $$1}'); do \
157+
cd ./apis && go get $$dep@$(BRANCH) && cd .. ; \
158158
done
159159

160160
.PHONY: tidy
@@ -164,9 +164,14 @@ tidy: ## Run go mod tidy on every mod file in the repo
164164

165165
.PHONY: golangci-lint
166166
golangci-lint:
167-
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.51.2
167+
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1
168168
$(LOCALBIN)/golangci-lint run --fix
169169

170+
MAX_PROCS := 5
171+
NUM_PROCS := $(shell expr $(shell nproc --ignore 2) / 2)
172+
PROCS ?= $(shell if [ $(NUM_PROCS) -gt $(MAX_PROCS) ]; then echo $(MAX_PROCS); else echo $(NUM_PROCS); fi)
173+
PROC_CMD = --procs $(PROCS)
174+
170175
.PHONY: test
171176
test: manifests generate gowork fmt vet envtest ginkgo ginkgo-run ## Run ginkgo tests with dependencies.
172177

@@ -175,7 +180,7 @@ ginkgo-run: ## Run ginkgo.
175180
source hack/export_related_images.sh && \
176181
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) -v debug --bin-dir $(LOCALBIN) use $(ENVTEST_K8S_VERSION) -p path)" \
177182
OPERATOR_TEMPLATES="$(PWD)/templates" \
178-
$(GINKGO) --trace --cover --coverpkg=./pkg/openstack,./pkg/openstackclient,./pkg/util,./pkg/dataplane,./controllers/...,./apis/client/v1beta1,./apis/core/v1beta1,./apis/dataplane/v1beta1 --coverprofile cover.out --covermode=atomic ${PROC_CMD} $(GINKGO_ARGS) $(GINKGO_TESTS)
183+
$(GINKGO) --trace --cover --coverpkg=./pkg/openstack,./pkg/openstackclient,./pkg/util,./pkg/dataplane/...,./controllers/...,./apis/client/v1beta1,./apis/core/v1beta1,./apis/dataplane/v1beta1 --coverprofile cover.out --covermode=atomic ${PROC_CMD} $(GINKGO_ARGS) $(GINKGO_TESTS)
179184

180185
.PHONY: test-all
181186
test-all: test golint golangci golangci-lint ## Run all tests.
@@ -260,7 +265,7 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
260265
ENVTEST ?= $(LOCALBIN)/setup-envtest
261266
CRD_MARKDOWN ?= $(LOCALBIN)/crd-to-markdown
262267
GINKGO ?= $(LOCALBIN)/ginkgo
263-
GINKGO_TESTS ?= ./tests/... ./apis/client/...
268+
GINKGO_TESTS ?= ./tests/... ./apis/client/... ./apis/core/... ./apis/dataplane/...
264269

265270
KUTTL ?= $(LOCALBIN)/kubectl-kuttl
266271

@@ -269,6 +274,8 @@ KUSTOMIZE_VERSION ?= v3.8.7
269274
CONTROLLER_TOOLS_VERSION ?= v0.11.1
270275
CRD_MARKDOWN_VERSION ?= v0.0.3
271276
KUTTL_VERSION ?= 0.17.0
277+
GOTOOLCHAIN_VERSION ?= go1.21.0
278+
OC_VERSION ?= 4.14.0
272279

273280
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
274281
.PHONY: kustomize
@@ -362,11 +369,17 @@ endif
362369
endif
363370

364371
.PHONY: yq
365-
yq: ## Download and install yq in local env
372+
yq: $(LOCALBIN) ## Download and install yq in local env
366373
test -s $(LOCALBIN)/yq || ( cd $(LOCALBIN) &&\
367374
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64.tar.gz -O - |\
368375
tar xz && mv yq_linux_amd64 $(LOCALBIN)/yq )
369376

377+
.PHONY: oc
378+
oc: $(LOCALBIN) ## Download and install oc in local env
379+
test -s $(LOCALBIN)/oc || ( cd $(LOCALBIN) &&\
380+
wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/$(OC_VERSION)/openshift-client-linux-$(OC_VERSION).tar.gz -O - |\
381+
tar xz)
382+
370383
# Build make variables to export for shell
371384
MAKE_ENV := $(shell echo '$(.VARIABLES)' | awk -v RS=' ' '/^(IMAGE)|.*?(REGISTRY)$$/')
372385
SHELL_EXPORT = $(foreach v,$(MAKE_ENV),$(v)='$($(v))')
@@ -437,7 +450,7 @@ golint: get-ci-tools
437450

438451
.PHONY: gowork
439452
gowork: ## Generate go.work file to support our multi module repository
440-
test -f go.work || go work init
453+
test -f go.work || GOTOOLCHAIN=$(GOTOOLCHAIN_VERSION) go work init
441454
go work use .
442455
go work use ./apis
443456
go work sync

0 commit comments

Comments
 (0)