forked from openshift/installer
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a
fips
flag to install-config.yaml
Part of: openshift/enhancements#15 We added FIPS to the MCO a while ago: openshift/machine-config-operator#889 However, during some discussion it became clear that the main use case for FIPS is "day 1" - it doesn't make sense to turn it on "day 2" because the standard requires that e.g. long-term key material was created with FIPS enabled. Further, it's unlikely that admins will want to turn it *off* if they ever had it on. This is a good candidate for an install config.
- Loading branch information
Showing
5 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package machineconfig | ||
|
||
import ( | ||
"fmt" | ||
|
||
igntypes "github.com/coreos/ignition/v2/config/v3_0/types" | ||
mcfgv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// ForFIPSEnabled creates the MachineConfig to enable FIPS. | ||
// See also https://github.com/openshift/machine-config-operator/pull/889 | ||
func ForFIPSEnabled(role string) *mcfgv1.MachineConfig { | ||
return &mcfgv1.MachineConfig{ | ||
TypeMeta: metav1.TypeMeta{ | ||
APIVersion: "machineconfiguration.openshift.io/v1", | ||
Kind: "MachineConfig", | ||
}, | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: fmt.Sprintf("99-%s-fips", role), | ||
Labels: map[string]string{ | ||
"machineconfiguration.openshift.io/role": role, | ||
}, | ||
}, | ||
Spec: mcfgv1.MachineConfigSpec{ | ||
Config: igntypes.Config{ | ||
Ignition: igntypes.Ignition{ | ||
Version: igntypes.MaxVersion.String(), | ||
}, | ||
}, | ||
FIPS: true, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters