Skip to content

Commit 39478ff

Browse files
openstack: Allow to skip pre-flight validations
Skip pre-flight validations when the development-only variable `OPENSHFIT_INSTALL_SKIP_PREFLIGHT_VALIDATIONS=1` is found in the environment. Skipping pre-flight validations is essential to testing manifest generation when the exotic settings under test are not available in the CI infrastructure. Implements OSASINFRA-2194
1 parent 08b1013 commit 39478ff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/asset/installconfig/openstack/validate.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
package openstack
22

33
import (
4+
"os"
5+
46
"k8s.io/apimachinery/pkg/util/validation/field"
57

68
"github.com/openshift/installer/pkg/asset/installconfig/openstack/validation"
79
"github.com/openshift/installer/pkg/types"
10+
"github.com/sirupsen/logrus"
811
)
912

1013
// Validate validates the given installconfig for OpenStack platform
1114
func Validate(ic *types.InstallConfig) error {
15+
if skip := os.Getenv("OPENSHFIT_INSTALL_SKIP_PREFLIGHT_VALIDATIONS"); skip == "1" {
16+
logrus.Warnf("OVERRIDE: pre-flight validation disabled.")
17+
return nil
18+
}
19+
1220
ci, err := validation.GetCloudInfo(ic)
1321
if err != nil {
1422
return err

0 commit comments

Comments
 (0)