Skip to content

Commit 2a7d28a

Browse files
committed
bump operator-sdk version
1 parent 236fab4 commit 2a7d28a

8 files changed

Lines changed: 24 additions & 409 deletions

File tree

.dockerignore

Lines changed: 4 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,4 @@
1-
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.24
2-
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
3-
# Build the manager binary
4-
FROM $GOLANG_BUILDER AS builder
5-
6-
#Arguments required by OSBS build system
7-
ARG CACHITO_ENV_FILE=/remote-source/cachito.env
8-
9-
ARG REMOTE_SOURCE=.
10-
ARG REMOTE_SOURCE_DIR=/remote-source
11-
ARG REMOTE_SOURCE_SUBDIR=
12-
ARG DEST_ROOT=/dest-root
13-
14-
ARG GO_BUILD_EXTRA_ARGS="-tags strictfipsruntime"
15-
ARG GO_BUILD_EXTRA_ENV_ARGS="CGO_ENABLED=1 GO111MODULE=on"
16-
17-
COPY $REMOTE_SOURCE $REMOTE_SOURCE_DIR
18-
WORKDIR $REMOTE_SOURCE_DIR/$REMOTE_SOURCE_SUBDIR
19-
20-
USER root
21-
RUN mkdir -p ${DEST_ROOT}/usr/local/bin/
22-
23-
# cache deps before building and copying source so that we don't need to re-download as much
24-
# and so that source changes don't invalidate our downloaded layer
25-
RUN if [ ! -f $CACHITO_ENV_FILE ]; then go mod download ; fi
26-
27-
# Build manager
28-
RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_BUILD_EXTRA_ENV_ARGS} go build ${GO_BUILD_EXTRA_ARGS} -a -o ${DEST_ROOT}/manager main.go
29-
RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_BUILD_EXTRA_ENV_ARGS} go build ${GO_BUILD_EXTRA_ARGS} -a -o ${DEST_ROOT}/operator cmd/operator/main.go
30-
31-
RUN cp -r config/services ${DEST_ROOT}/services
32-
RUN cp -r bindata ${DEST_ROOT}/bindata
33-
34-
# Use distroless as minimal base image to package the manager binary
35-
# Refer to https://github.com/GoogleContainerTools/distroless for more details
36-
FROM $OPERATOR_BASE_IMAGE
37-
38-
ARG DEST_ROOT=/dest-root
39-
# NONROOT default id https://github.com/GoogleContainerTools/distroless/blob/main/base/base.bzl#L8=
40-
ARG USER_ID=65532
41-
42-
ARG IMAGE_COMPONENT="openstack-operator-container"
43-
ARG IMAGE_NAME="openstack-operator"
44-
ARG IMAGE_VERSION="1.0.0"
45-
ARG IMAGE_SUMMARY="Openstack Operator"
46-
ARG IMAGE_DESC="This image includes the openstack-operator"
47-
ARG IMAGE_TAGS="cn-openstack openstack"
48-
49-
### DO NOT EDIT LINES BELOW
50-
# Auto generated using CI tools from
51-
# https://github.com/openstack-k8s-operators/openstack-k8s-operators-ci
52-
53-
# Labels required by upstream and osbs build system
54-
LABEL com.redhat.component="${IMAGE_COMPONENT}" \
55-
name="${IMAGE_NAME}" \
56-
version="${IMAGE_VERSION}" \
57-
summary="${IMAGE_SUMMARY}" \
58-
io.k8s.name="${IMAGE_NAME}" \
59-
io.k8s.description="${IMAGE_DESC}" \
60-
io.openshift.tags="${IMAGE_TAGS}"
61-
### DO NOT EDIT LINES ABOVE
62-
63-
ENV USER_UID=$USER_ID \
64-
OPERATOR_SERVICES=/usr/share/openstack-operator/services/
65-
66-
WORKDIR /
67-
68-
# Install operator binary to WORKDIR
69-
COPY --from=builder ${DEST_ROOT}/manager .
70-
COPY --from=builder ${DEST_ROOT}/operator .
71-
72-
# Install services
73-
COPY --from=builder ${DEST_ROOT}/services ${OPERATOR_SERVICES}
74-
COPY --from=builder ${DEST_ROOT}/bindata /bindata
75-
76-
USER $USER_ID
77-
78-
ENV PATH="/:${PATH}"
79-
80-
ENTRYPOINT ["/manager"]
1+
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2+
# Ignore build and test binaries.
3+
bin/
4+
testbin/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
operator_name: openstack
1818
go_version: 1.24.x
19-
operator_sdk_version: 1.31.0
19+
operator_sdk_version: 1.41.1
2020
bundle_dockerfile: ./bundle.Dockerfile
2121
operator_version: 0.5.0
2222
secrets:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN mkdir -p ${DEST_ROOT}/usr/local/bin/
2525
RUN if [ ! -f $CACHITO_ENV_FILE ]; then go mod download ; fi
2626

2727
# Build manager
28-
RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_BUILD_EXTRA_ENV_ARGS} go build ${GO_BUILD_EXTRA_ARGS} -a -o ${DEST_ROOT}/manager main.go
28+
RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_BUILD_EXTRA_ENV_ARGS} go build ${GO_BUILD_EXTRA_ARGS} -a -o ${DEST_ROOT}/manager cmd/main.go
2929
RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_BUILD_EXTRA_ENV_ARGS} go build ${GO_BUILD_EXTRA_ARGS} -a -o ${DEST_ROOT}/operator cmd/operator/main.go
3030

3131
RUN cp -r config/services ${DEST_ROOT}/services

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ endif
5050

5151
# Set the Operator SDK version to use. By default, what is installed on the system is used.
5252
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
53-
OPERATOR_SDK_VERSION ?= v1.31.0
53+
OPERATOR_SDK_VERSION ?= v1.41.1
5454

5555
# Image URL to use all building/pushing image targets
5656
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/openstack-operator:latest
@@ -311,7 +311,7 @@ GINKGO_TESTS ?= ./tests/... ./api/client/... ./api/core/... ./api/dataplane/...
311311
KUTTL ?= $(LOCALBIN)/kubectl-kuttl
312312

313313
## Tool Versions
314-
KUSTOMIZE_VERSION ?= v5.5.0 #(dprince: bumped to aquire new features like --load-restrictor)
314+
KUSTOMIZE_VERSION ?= v5.6.0 #(dprince: bumped to aquire new features like --load-restrictor)
315315
CONTROLLER_TOOLS_VERSION ?= v0.18.0
316316
CRD_MARKDOWN_VERSION ?= v0.0.3
317317
KUTTL_VERSION ?= 0.17.0
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
resources:
2+
- deployment.yaml
3+
4+
generatorOptions:
5+
disableNameSuffixHash: true
6+
7+
configMapGenerator:
8+
- files:
9+
- controller_operator_config.yaml
10+
name: operator-config
11+
apiVersion: kustomize.config.k8s.io/v1beta1
12+
kind: Kustomization
13+
images:
14+
- name: controller
15+
newName: quay.io/openstack-k8s-operators/openstack-operator
16+
newTag: latest

internal/webhook/core/v1beta1/openstackcontrolplane_webhook_test.go

Lines changed: 0 additions & 71 deletions
This file was deleted.

internal/webhook/core/v1beta1/openstackversion_webhook_test.go

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)