Skip to content

Commit f00f890

Browse files
committed
MGMT-18829: Upgrade controller-gen and operator-sdk version
Controller-gen to 0.14.0 (still uses go 1.21) Operator-sdk 1.25.2 - latest is 1.37.0, but due to this issue operator-framework/operator-sdk#6285 The changes in this PR operator-framework/operator-sdk#6136 modifies the "createdAt" timestamp whenever the olm bundle is generated. This fails our CI test to verify generated files due to the diff each time it's ran. So we want to use an operator-sdk version prior to this change, which is 1.25.2
1 parent bc5550c commit f00f890

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ci-images/Dockerfile.code-generation

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ COPY --from=registry.k8s.io/kustomize/kustomize:v4.3.0 /app/kustomize /usr/bin/
2222
RUN cd / && /assisted-service/hack/setup_env.sh spectral && \
2323
/assisted-service/hack/setup_env.sh jq && \
2424
go install github.com/golang/mock/mockgen@v1.5.0 && \
25-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2 && \
25+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 && \
2626
go install golang.org/x/tools/cmd/goimports@v0.1.5 && \
2727
chmod 775 -R $GOPATH
2828

29-
RUN curl --retry 5 -L https://github.com/operator-framework/operator-sdk/releases/download/v1.10.1/operator-sdk_linux_amd64 --output /tmp/operator-sdk_linux_amd64 && \
29+
RUN curl --retry 5 -L https://github.com/operator-framework/operator-sdk/releases/download/v1.25.2/operator-sdk_linux_amd64 --output /tmp/operator-sdk_linux_amd64 && \
3030
chmod +x /tmp/operator-sdk_linux_amd64 && \
3131
install /tmp/operator-sdk_linux_amd64 /usr/local/bin/operator-sdk
3232

hack/generate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ with open("'${__root}/config/samples/agent-install.openshift.io_v1beta1_agentser
8686
function generate_manifests() (
8787
if [ "${ENABLE_KUBE_API:-}" != "true" ]; then exit 0; fi
8888

89-
local crd_options=${CRD_OPTIONS:-"crd:trivialVersions=true"}
89+
local crd_options=${CRD_OPTIONS:-"crd"}
9090
local controller_path=${__root}/internal/controller
9191
local controller_config_path=${__root}/config
9292
local controller_crd_path=${controller_config_path}/crd

hack/setup_env.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function test_tools() {
5555
function assisted_service() {
5656
ARCH=$(case $(arch) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(arch) ;; esac)
5757

58-
OPERATOR_SDK_VERSION=v1.10.1
58+
OPERATOR_SDK_VERSION=v1.25.2
5959
curl --retry 5 --connect-timeout 30 -sL "https://github.com/operator-framework/operator-sdk/releases/download/${OPERATOR_SDK_VERSION}/operator-sdk_$(uname)_${ARCH}" --output /usr/local/bin/operator-sdk
6060
curl --retry 5 --connect-timeout 30 -sL "https://mirror.openshift.com/pub/openshift-v4/multi/clients/ocp/latest/${ARCH}/openshift-client-linux.tar.gz" | tar -C /usr/local/bin -xz
6161

@@ -74,7 +74,7 @@ function assisted_service() {
7474

7575

7676
go install golang.org/x/tools/cmd/goimports@v0.1.5
77-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2
77+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0
7878

7979
python3 -m venv ${VIRTUAL_ENV:-/opt/venv}
8080
python3 -m pip install --upgrade pip

0 commit comments

Comments
 (0)