@@ -12,25 +12,29 @@ 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.
1819func (a * Kargs ) Dependencies () []asset.Asset {
1920 return []asset.Asset {
20- & manifests.AgentManifests {},
21+ & manifests.AgentClusterInstall {},
2122 }
2223}
2324
2425// Generate generates the kernel args configurations for the agent ISO image and PXE assets.
2526func (a * Kargs ) Generate (dependencies asset.Parents ) error {
26- agentManifests := & manifests.AgentManifests {}
27- dependencies .Get (agentManifests )
27+ agentClusterInstall := & manifests.AgentClusterInstall {}
28+ dependencies .Get (agentClusterInstall )
2829
2930 // Add kernel args for external oci platform
30- if agentManifests .GetExternalPlatformName () == string (models .PlatformTypeOci ) {
31+ if agentClusterInstall .GetExternalPlatformName () == string (models .PlatformTypeOci ) {
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}
0 commit comments