Skip to content

Fix generate CRD script by using copy #748

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-9-release-golang-1.21-openshift-4.16
tag: rhel-9-release-golang-1.22-openshift-4.17
2 changes: 1 addition & 1 deletion base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dockerfile to bootstrap build and test in openshift-ci

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.20-openshift-4.14
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17

ARG KUBEBUILDER_RELEASE=2.3.1
# Install test dependencies
Expand Down
2 changes: 1 addition & 1 deletion codegen.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13-alpine
FROM golang:1.22-alpine

RUN apk update && \
apk add make git protobuf
Expand Down
24 changes: 12 additions & 12 deletions manifests/0000_50_olm_00-clusterserviceversions.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -154,7 +154,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand All @@ -176,7 +176,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -211,7 +211,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -267,7 +267,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand All @@ -289,7 +289,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -335,7 +335,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -384,7 +384,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand All @@ -406,7 +406,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -440,7 +440,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -489,7 +489,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand All @@ -511,7 +511,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down
24 changes: 12 additions & 12 deletions microshift-manifests/0000_50_olm_00-clusterserviceversions.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -154,7 +154,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand All @@ -176,7 +176,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -211,7 +211,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -267,7 +267,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand All @@ -289,7 +289,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -335,7 +335,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -384,7 +384,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand All @@ -406,7 +406,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -440,7 +440,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down Expand Up @@ -489,7 +489,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand All @@ -511,7 +511,7 @@ spec:
path:
type: string
value:
description: RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
description: RawMessage is a raw encoded JSON value. It implements [Marshaler] and [Unmarshaler] and can be used to delay JSON decoding or precompute a JSON encoding.
type: string
format: byte
x-descriptors:
Expand Down
11 changes: 9 additions & 2 deletions operator-framework-tools.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder-rhel8
# Update when available: registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.22-openshift-4.17
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.17 AS builder-rhel8
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
WORKDIR /src
COPY . .
# Remove after updating to rhel-8-golang-1.22-openshift-4.17
# Install golang 1.22.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ART is generating a new registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.22-openshift-4.17 we can use here to coordinate with new go1.22 toolchain.

RUN go install -mod=mod golang.org/dl/go1.22.2@latest
RUN go1.22.2 download
RUN ln -s /go/bin/go1.22.2 /go/bin/go
# Now we can make registry
RUN make build/registry cross

FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
WORKDIR /src
Expand Down
4 changes: 2 additions & 2 deletions operator-lifecycle-manager.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder

ENV GO111MODULE auto
ENV GOPATH /go
Expand All @@ -18,7 +18,7 @@ RUN mkdir -p .git/objects
COPY . .
RUN make build/olm bin/cpb

FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
FROM registry.ci.openshift.org/ocp/4.17:base-rhel9

ADD manifests/ /manifests
LABEL io.openshift.release.operator=true
Expand Down
4 changes: 2 additions & 2 deletions operator-registry.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
Expand All @@ -11,7 +11,7 @@ RUN make build/registry cross
# copy and build vendored grpc_health_probe
RUN CGO_ENABLED=0 go build -mod=vendor -tags netgo -ldflags "-w" ./vendor/github.com/grpc-ecosystem/grpc-health-probe/...

FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
FROM registry.ci.openshift.org/ocp/4.17:base-rhel9

COPY --from=builder /src/bin/* /bin/registry/
COPY --from=builder /src/grpc-health-probe /bin/grpc_health_probe
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_crds_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi

cp -R "${ROOT_DIR}/staging/operator-lifecycle-manager/deploy/chart/" "${chartdir}"
cp "${ROOT_DIR}"/values*.yaml "${tmpdir}"
ln -snf $(realpath --relative-to ${tmpdir} ${ROOT_DIR}/staging/api/pkg/operators/) ${crdsrcdir}
cp -R "${ROOT_DIR}/staging/api/pkg/operators/" ${crdsrcdir}
rm -rf ./manifests/* ${crddir}/*

trap "rm -rf ${tmpdir}" EXIT
Expand Down