File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ import (
5151 "github.com/openshift/installer/pkg/validate"
5252)
5353
54+ // hostCryptBypassedAnnotation is set if the host crypt check was bypassed via environment variable.
55+ const hostCryptBypassedAnnotation = "install.openshift.io/hostcrypt-check-bypassed"
56+
5457// list of known plugins that require hostPrefix to be set
5558var pluginsUsingHostPrefix = sets .NewString (string (operv1 .NetworkTypeOVNKubernetes ))
5659
@@ -1171,7 +1174,15 @@ func validateFIPSconfig(c *types.InstallConfig) field.ErrorList {
11711174 }
11721175
11731176 if err := hostcrypt .VerifyHostTargetState (c .FIPS ); err != nil {
1174- logrus .Warnf ("%v" , err )
1177+ if skip , ok := os .LookupEnv ("OPENSHIFT_INSTALL_SKIP_HOSTCRYPT_VALIDATION" ); ok && skip != "" {
1178+ logrus .Warnf ("%v" , err )
1179+ if c .Annotations == nil {
1180+ c .Annotations = make (map [string ]string )
1181+ }
1182+ c .Annotations [hostCryptBypassedAnnotation ] = "true"
1183+ } else {
1184+ allErrs = append (allErrs , field .Forbidden (field .NewPath ("fips" ), err .Error ()))
1185+ }
11751186 }
11761187 return allErrs
11771188}
You can’t perform that action at this time.
0 commit comments