Skip to content

Commit

Permalink
Catching up with the YAML getting shifted into a subdirectory [1].
Browse files Browse the repository at this point in the history
I followed the new docs from [2] to create pkg/dependencymagnet
Skip render for DevPreviewNoUpgrade
The Default ClusterVersion CRD is the one we want to render during bootstrap-render

Update ./hack/test-prerequisites.go to pick up clusterversion crds from the new path config/v1/zz_generated.crd-manifests

[1]: openshift/api#1814
[2]: openshift/api@06baaa4#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R211

Signed-off-by: Eran Cohen <eranco@redhat.com>
  • Loading branch information
eranco74 committed Jun 26, 2024
1 parent 021e76f commit f5c3939
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
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"
)
4 changes: 2 additions & 2 deletions pkg/payload/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ func renderDir(renderConfig manifestRenderConfig, idir, odir string, skipFiles s
if skipFiles.Has(file.Name()) {
continue
}
if strings.Contains(file.Name(), "CustomNoUpgrade") || strings.Contains(file.Name(), "TechPreviewNoUpgrade") {
// CustomNoUpgrade and TechPreviewNoUpgrade may add features to manifests like the ClusterVersion CRD,
if strings.Contains(file.Name(), "CustomNoUpgrade") || strings.Contains(file.Name(), "TechPreviewNoUpgrade") || strings.Contains(file.Name(), "DevPreviewNoUpgrade") {
// CustomNoUpgrade, TechPreviewNoUpgrade and DevPreviewNoUpgrade may add features to manifests like the ClusterVersion CRD,
// but we do not need those features during bootstrap-render time. In those clusters, the production
// CVO will be along shortly to update the manifests and deliver the gated features.
continue
Expand Down

0 comments on commit f5c3939

Please sign in to comment.