File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
1212// Kargs is an Asset that generates the additional kernel args.
1313type Kargs struct {
1414 consoleArgs string
15+ fips bool
1516}
1617
1718// Dependencies returns the assets on which the Kargs asset depends.
@@ -31,6 +32,9 @@ func (a *Kargs) Generate(dependencies asset.Parents) error {
3132 logrus .Debugf ("Added kernel args to enable serial console for %s %s platform" , hiveext .ExternalPlatformType , string (models .PlatformTypeOci ))
3233 a .consoleArgs = " console=ttyS0"
3334 }
35+
36+ a .fips = agentClusterInstall .FIPSEnabled ()
37+
3438 return nil
3539}
3640
@@ -41,5 +45,9 @@ func (a *Kargs) Name() string {
4145
4246// KernelCmdLine returns the data to be appended to the kernel arguments.
4347func (a * Kargs ) KernelCmdLine () []byte {
44- return []byte (a .consoleArgs )
48+ cmdLine := a .consoleArgs
49+ if a .fips {
50+ cmdLine += " fips=1"
51+ }
52+ return []byte (cmdLine )
4553}
Original file line number Diff line number Diff line change @@ -434,6 +434,15 @@ func (a *AgentClusterInstall) validateSupportedPlatforms() field.ErrorList {
434434 return allErrs
435435}
436436
437+ // FIPSEnabled returns whether FIPS is enabled in the cluster configuration.
438+ func (a * AgentClusterInstall ) FIPSEnabled () bool {
439+ icOverrides := agentClusterInstallInstallConfigOverrides {}
440+ if err := json .Unmarshal ([]byte (a .Config .Annotations [installConfigOverrides ]), & icOverrides ); err == nil {
441+ return icOverrides .FIPS
442+ }
443+ return false
444+ }
445+
437446// GetExternalPlatformName returns the platform name for the external platform.
438447func (a * AgentClusterInstall ) GetExternalPlatformName () string {
439448 if a .Config != nil && a .Config .Spec .ExternalPlatformSpec != nil {
You can’t perform that action at this time.
0 commit comments