Skip to content

Commit

Permalink
vendor: Update openshift/api to pick up zz_generated.crd-manifests
Browse files Browse the repository at this point in the history
Catching up with the YAML getting shifted into a subdirectory [1].  I
followed the new docs from [2] to create pkg/dependencymagnet, and
then:

  $ go get -u github.com/openshift/api@master
  $ go mod tidy
  $ go mod vendor
  $ sed -i 's|config/v1/0000_00_cluster-version-operator|config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator|g' $(git grep -l 0000_00_cluster-version-operator)
  $ git add -A Dockerfile* hack/test-prerequisites.go pkg/dependencymagnet go.* vendor

all using:

  $ go version
  go version go1.22.2 linux/amd64

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211
  • Loading branch information
wking committed Apr 30, 2024
1 parent 0b3f507 commit 07f2e87
Show file tree
Hide file tree
Showing 139 changed files with 6,482 additions and 11,797 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ RUN hack/build-go.sh; \
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
COPY --from=builder /tmp/build/cluster-version-operator /usr/bin/
COPY install /manifests
COPY vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_* /manifests/
COPY vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_* /manifests/
COPY bootstrap /bootstrap
ENTRYPOINT ["/usr/bin/cluster-version-operator"]
2 changes: 1 addition & 1 deletion Dockerfile.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ RUN hack/build-go.sh; \
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
COPY --from=builder /tmp/build/cluster-version-operator /usr/bin/
COPY install /manifests
COPY vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_* /manifests/
COPY vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_* /manifests/
COPY bootstrap /bootstrap
ENTRYPOINT ["/usr/bin/cluster-version-operator"]
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/ghodss/yaml v1.0.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.3.0
github.com/openshift/api v0.0.0-20240301093301-ce10821dc999
github.com/openshift/api v0.0.0-20240429104249-ac9356ba1784
github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1
github.com/openshift/library-go v0.0.0-20231017173800-126f85ed0cc7
github.com/operator-framework/api v0.17.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4
github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg=
github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/openshift/api v0.0.0-20240301093301-ce10821dc999 h1:+S998xHiJApsJZjRAO8wyedU9GfqFd8mtwWly6LqHDo=
github.com/openshift/api v0.0.0-20240301093301-ce10821dc999/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4=
github.com/openshift/api v0.0.0-20240429104249-ac9356ba1784 h1:SmOZFMxuAH4d1Cj7dOftVyo4Wg/mEC4pwz6QIJJsAkc=
github.com/openshift/api v0.0.0-20240429104249-ac9356ba1784/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4=
github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 h1:W1N/3nVciqmjPjn2xldHjb0AwwCQzlGxLvX5BCgE8H4=
github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1/go.mod h1:ihUJrhBcYAGYQrJu/gP2OMgfVds5f5z5kbeLNBqjHLo=
github.com/openshift/library-go v0.0.0-20231017173800-126f85ed0cc7 h1:pJLcCSJzdiWCaJ4bAepgnvwMdP33LumbVJyWSW7+3ng=
Expand Down
4 changes: 2 additions & 2 deletions hack/test-prerequisites.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func main() {

client := apiext.NewForConfigOrDie(cfg)
for _, path := range []string{
"vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion-Default.crd.yaml",
"vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml",
"vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusterversion-Default.crd.yaml",
"vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml",
} {
var name string
err := wait.PollUntilContextTimeout(ctx, time.Second, 30*time.Second, true, func(localCtx context.Context) (bool, error) {
Expand Down
8 changes: 8 additions & 0 deletions pkg/dependencymagnet/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Package dependencymagnet adds nominal Go dependencies so 'go mod'
// will pull in content we do not actually need to compile our Go, but
// which we do need to build our container image.
package dependencymagnet

import (
_ "github.com/openshift/api/config/v1/zz_generated.crd-manifests"
)

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 07f2e87

Please sign in to comment.