Skip to content

Commit

Permalink
[1.30] Move to fatal error for cis-1.23 profile value (#5781)
Browse files Browse the repository at this point in the history
* Move to fatal error for cis-1.23 profile value

Signed-off-by: Derek Nola <[email protected]>

* Use single quotes

Signed-off-by: Derek Nola <[email protected]>

---------

Signed-off-by: Derek Nola <[email protected]>
  • Loading branch information
dereknola committed May 6, 2024
1 parent 234ebe5 commit ebe1d35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/cli/cmds/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ var (
Destination: &config.CloudProviderConfig,
},
&cli.StringFlag{
Name: "profile",
Usage: "(security) Validate system configuration against the selected benchmark (valid items: cis, cis-1.23 (deprecated))",
Name: "profile",
Usage: "(security) Validate system configuration against the selected benchmark (valid items: cis)",
EnvVar: "RKE2_CIS_PROFILE",
},
&cli.StringFlag{
Expand Down
2 changes: 1 addition & 1 deletion pkg/rke2/rke2.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func removeDisabledPods(dataDir, containerRuntimeEndpoint string, disabledItems
func isCISMode(clx *cli.Context) bool {
profile := clx.String("profile")
if profile == CISProfile123 {
logrus.Warn("cis-1.23 profile is deprecated and will be removed in v1.29. Please use cis instead.")
logrus.Fatal("cis-1.23 profile is deprecated. Please use 'cis' instead.")
}
return profile == CISProfile123 || profile == CISProfile
}
Expand Down

0 comments on commit ebe1d35

Please sign in to comment.