Skip to content

Commit a90cec9

Browse files
committed
Catching up with the YAML getting shifted into a subdirectory [1].
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 <[email protected]>
1 parent 021e76f commit a90cec9

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

hack/test-prerequisites.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ func main() {
2727

2828
client := apiext.NewForConfigOrDie(cfg)
2929
for _, path := range []string{
30-
"vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion-Default.crd.yaml",
31-
"vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml",
30+
"vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml",
31+
"vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_00_cluster-version-operator_01_clusteroperators.crd.yaml",
3232
} {
3333
var name string
3434
err := wait.PollUntilContextTimeout(ctx, time.Second, 30*time.Second, true, func(localCtx context.Context) (bool, error) {

pkg/dependencymagnet/doc.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Package dependencymagnet adds nominal Go dependencies so 'go mod'
2+
// will pull in content we do not actually need to compile our Go, but
3+
// which we do need to build our container image.
4+
package dependencymagnet
5+
6+
import (
7+
_ "github.com/openshift/api/config/v1/zz_generated.crd-manifests"
8+
)

pkg/payload/render.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ func renderDir(renderConfig manifestRenderConfig, idir, odir string, skipFiles s
7676
if skipFiles.Has(file.Name()) {
7777
continue
7878
}
79-
if strings.Contains(file.Name(), "CustomNoUpgrade") || strings.Contains(file.Name(), "TechPreviewNoUpgrade") {
80-
// CustomNoUpgrade and TechPreviewNoUpgrade may add features to manifests like the ClusterVersion CRD,
79+
if strings.Contains(file.Name(), "CustomNoUpgrade") || strings.Contains(file.Name(), "TechPreviewNoUpgrade") || strings.Contains(file.Name(), "DevPreviewNoUpgrade") {
80+
// CustomNoUpgrade, TechPreviewNoUpgrade and DevPreviewNoUpgrade may add features to manifests like the ClusterVersion CRD,
8181
// but we do not need those features during bootstrap-render time. In those clusters, the production
8282
// CVO will be along shortly to update the manifests and deliver the gated features.
8383
continue

0 commit comments

Comments
 (0)