diff --git a/Makefile b/Makefile index f8b70a8e..80f6f08e 100644 --- a/Makefile +++ b/Makefile @@ -53,8 +53,8 @@ export PATH := $(KREW_ROOT)/bin:$(PATH) # Set --output-base for conversion-gen if we are not within GOPATH ifneq ($(abspath $(ROOT_DIR)),$(shell go env GOPATH)/src/github.com/rancher/cluster-api-provider-rke2) - CONVERSION_GEN_OUTPUT_BASE_CAPRKE2 := --output-base=$(ROOT_DIR)/$(CAPRKE2_DIR) - CONVERSION_GEN_OUTPUT_BASE_CAPBPR := --output-base=$(ROOT_DIR)/$(CAPBPR_DIR) + CONVERSION_GEN_OUTPUT_BASE_CAPRKE2 := --output-dir=$(ROOT_DIR)/$(CAPRKE2_DIR) + CONVERSION_GEN_OUTPUT_BASE_CAPBPR := --output-dir=$(ROOT_DIR)/$(CAPBPR_DIR) else export GOPATH := $(shell go env GOPATH) endif @@ -77,7 +77,7 @@ CONTROLLER_GEN_BIN := controller-gen CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER)) CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen -CONVERSION_GEN_VER := v0.28.0 +CONVERSION_GEN_VER := v0.30.0 CONVERSION_GEN_BIN := conversion-gen # We are intentionally using the binary without version suffix, to avoid the version # in generated files. @@ -210,20 +210,18 @@ generate-go-conversions: ## Run all generate-go-conversions-* targets generate-go-conversions-rke2-bootstrap: $(CONVERSION_GEN) ## Generate conversions go code for the rke2 bootstrap $(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/api/v1alpha1" $(CONVERSION_GEN) \ - --input-dirs=./bootstrap/api/v1alpha1 \ - --build-tag=ignore_autogenerated_rke2_bootstrap \ - --output-file-base=zz_generated.conversion $(ROOT_DIR) \ - --go-header-file=./hack/boilerplate.go.txt + --output-file=zz_generated.conversion.go $(ROOT_DIR)/$(CAPBPR_DIR) \ + --go-header-file=./hack/boilerplate.go.txt \ + ./bootstrap/api/v1alpha1 .PHONY: generate-go-conversions-rke2-control-plane generate-go-conversions-rke2-control-plane: $(CONVERSION_GEN) ## Generate conversions go code for the rke2 control plane $(MAKE) clean-generated-conversions SRC_DIRS="./controlplane/api/v1alpha1" $(CONVERSION_GEN) \ - --input-dirs=./controlplane/api/v1alpha1 \ - --extra-peer-dirs=github.com/rancher/cluster-api-provider-rke2/bootstrap/api/v1alpha1 \ - --build-tag=ignore_autogenerated_rk2_control_plane \ - --output-file-base=zz_generated.conversion $(ROOT_DIR) \ - --go-header-file=./hack/boilerplate.go.txt + --extra-dirs=github.com/rancher/cluster-api-provider-rke2/bootstrap/api/v1alpha1 \ + --output-file=zz_generated.conversion.go $(ROOT_DIR)/$(CAPRKE2_DIR) \ + --go-header-file=./hack/boilerplate.go.txt \ + ./controlplane/api/v1alpha1 .PHONY: generate-modules generate-modules: ## Run go mod tidy to ensure modules are up to date diff --git a/bootstrap/api/v1alpha1/rke2config_types.go b/bootstrap/api/v1alpha1/rke2config_types.go index 07f4b7eb..fe3e0f5d 100644 --- a/bootstrap/api/v1alpha1/rke2config_types.go +++ b/bootstrap/api/v1alpha1/rke2config_types.go @@ -102,7 +102,7 @@ type RKE2AgentConfig struct { Snapshotter string `json:"snapshotter,omitempty"` // CISProfile activates CIS compliance of RKE2 for a certain profile - // +kubebuilder:validation:Enum=cis-1.23;cis-1.5;cis-1.6 + // +kubebuilder:validation:Enum=cis;cis-1.23;cis-1.5;cis-1.6 //+optional CISProfile CISProfile `json:"cisProfile,omitempty"` @@ -256,6 +256,9 @@ type RKE2ConfigList struct { type CISProfile string const ( + // CIS references RKE2's CIS Profile "cis". + CIS CISProfile = "cis" + // CIS1_23 references RKE2's CIS Profile "cis-1.23". CIS1_23 CISProfile = "cis-1.23" diff --git a/bootstrap/api/v1alpha1/zz_generated.conversion.go b/bootstrap/api/v1alpha1/zz_generated.conversion.go index 7e8fab76..0f082514 100644 --- a/bootstrap/api/v1alpha1/zz_generated.conversion.go +++ b/bootstrap/api/v1alpha1/zz_generated.conversion.go @@ -1,5 +1,5 @@ -//go:build !ignore_autogenerated_rke2_bootstrap -// +build !ignore_autogenerated_rke2_bootstrap +//go:build !ignore_autogenerated +// +build !ignore_autogenerated /* Copyright 2024 SUSE LLC. diff --git a/bootstrap/api/v1alpha1/zz_generated.deepcopy.go b/bootstrap/api/v1alpha1/zz_generated.deepcopy.go index b1d6b148..0a2e35a7 100644 --- a/bootstrap/api/v1alpha1/zz_generated.deepcopy.go +++ b/bootstrap/api/v1alpha1/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ package v1alpha1 import ( "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" + runtime "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/cluster-api/api/v1beta1" ) diff --git a/bootstrap/api/v1beta1/rke2config_types.go b/bootstrap/api/v1beta1/rke2config_types.go index 9842f2bc..18cc0215 100644 --- a/bootstrap/api/v1beta1/rke2config_types.go +++ b/bootstrap/api/v1beta1/rke2config_types.go @@ -102,7 +102,7 @@ type RKE2AgentConfig struct { Snapshotter string `json:"snapshotter,omitempty"` // CISProfile activates CIS compliance of RKE2 for a certain profile - // +kubebuilder:validation:Enum=cis-1.23;cis-1.5;cis-1.6 + // +kubebuilder:validation:Enum=cis;cis-1.23;cis-1.5;cis-1.6 //+optional CISProfile CISProfile `json:"cisProfile,omitempty"` @@ -257,6 +257,9 @@ type RKE2ConfigList struct { type CISProfile string const ( + // CIS references RKE2's CIS Profile "cis". + CIS CISProfile = "cis" + // CIS1_23 references RKE2's CIS Profile "cis-1.23". CIS1_23 CISProfile = "cis-1.23" diff --git a/bootstrap/config/crd/bases/bootstrap.cluster.x-k8s.io_rke2configs.yaml b/bootstrap/config/crd/bases/bootstrap.cluster.x-k8s.io_rke2configs.yaml index 25aa141f..eacf84e4 100644 --- a/bootstrap/config/crd/bases/bootstrap.cluster.x-k8s.io_rke2configs.yaml +++ b/bootstrap/config/crd/bases/bootstrap.cluster.x-k8s.io_rke2configs.yaml @@ -78,6 +78,7 @@ spec: description: CISProfile activates CIS compliance of RKE2 for a certain profile enum: + - cis - cis-1.23 - cis-1.5 - cis-1.6 @@ -665,6 +666,7 @@ spec: description: CISProfile activates CIS compliance of RKE2 for a certain profile enum: + - cis - cis-1.23 - cis-1.5 - cis-1.6 diff --git a/bootstrap/config/crd/bases/bootstrap.cluster.x-k8s.io_rke2configtemplates.yaml b/bootstrap/config/crd/bases/bootstrap.cluster.x-k8s.io_rke2configtemplates.yaml index b2557bea..2c74e38a 100644 --- a/bootstrap/config/crd/bases/bootstrap.cluster.x-k8s.io_rke2configtemplates.yaml +++ b/bootstrap/config/crd/bases/bootstrap.cluster.x-k8s.io_rke2configtemplates.yaml @@ -90,6 +90,7 @@ spec: description: CISProfile activates CIS compliance of RKE2 for a certain profile enum: + - cis - cis-1.23 - cis-1.5 - cis-1.6 @@ -640,6 +641,7 @@ spec: description: CISProfile activates CIS compliance of RKE2 for a certain profile enum: + - cis - cis-1.23 - cis-1.5 - cis-1.6 diff --git a/controlplane/api/v1alpha1/conversion.go b/controlplane/api/v1alpha1/conversion.go index f7346ea2..8db5bebe 100644 --- a/controlplane/api/v1alpha1/conversion.go +++ b/controlplane/api/v1alpha1/conversion.go @@ -22,6 +22,8 @@ import ( apiconversion "k8s.io/apimachinery/pkg/conversion" utilconversion "sigs.k8s.io/cluster-api/util/conversion" + bootstrapv1beta1 "github.com/rancher/cluster-api-provider-rke2/bootstrap/api/v1beta1" + bootstrapv1alpha1 "github.com/rancher/cluster-api-provider-rke2/bootstrap/api/v1alpha1" controlplanev1 "github.com/rancher/cluster-api-provider-rke2/controlplane/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/conversion" ) @@ -202,3 +204,11 @@ func Convert_v1alpha1_RKE2ControlPlaneTemplateStatus_To_v1beta1_RKE2ControlPlane func Convert_v1beta1_RKE2ControlPlaneStatus_To_v1alpha1_RKE2ControlPlaneTemplateStatus(in *controlplanev1.RKE2ControlPlaneStatus, out *RKE2ControlPlaneTemplateStatus, s apiconversion.Scope) error { return nil } + +func Convert_v1beta1_RKE2ConfigSpec_To_v1alpha1_RKE2ConfigSpec(in *bootstrapv1beta1.RKE2ConfigSpec, out *bootstrapv1alpha1.RKE2ConfigSpec, s apiconversion.Scope) error { + return bootstrapv1alpha1.Convert_v1beta1_RKE2ConfigSpec_To_v1alpha1_RKE2ConfigSpec(in, out, s) +} + +func Convert_v1alpha1_RKE2ConfigSpec_To_v1beta1_RKE2ConfigSpec(in *bootstrapv1alpha1.RKE2ConfigSpec, out *bootstrapv1beta1.RKE2ConfigSpec, s apiconversion.Scope) error { + return bootstrapv1alpha1.Convert_v1alpha1_RKE2ConfigSpec_To_v1beta1_RKE2ConfigSpec(in, out, s) +} diff --git a/controlplane/api/v1alpha1/zz_generated.conversion.go b/controlplane/api/v1alpha1/zz_generated.conversion.go index beaa5b3f..6414cecb 100644 --- a/controlplane/api/v1alpha1/zz_generated.conversion.go +++ b/controlplane/api/v1alpha1/zz_generated.conversion.go @@ -1,5 +1,5 @@ -//go:build !ignore_autogenerated_rk2_control_plane -// +build !ignore_autogenerated_rk2_control_plane +//go:build !ignore_autogenerated +// +build !ignore_autogenerated /* Copyright 2024 SUSE LLC. @@ -156,6 +156,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*apiv1alpha1.RKE2ConfigSpec)(nil), (*apiv1beta1.RKE2ConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_RKE2ConfigSpec_To_v1beta1_RKE2ConfigSpec(a.(*apiv1alpha1.RKE2ConfigSpec), b.(*apiv1beta1.RKE2ConfigSpec), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*RKE2ControlPlaneStatus)(nil), (*v1beta1.RKE2ControlPlaneStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_RKE2ControlPlaneStatus_To_v1beta1_RKE2ControlPlaneStatus(a.(*RKE2ControlPlaneStatus), b.(*v1beta1.RKE2ControlPlaneStatus), scope) }); err != nil { @@ -171,6 +176,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*apiv1beta1.RKE2ConfigSpec)(nil), (*apiv1alpha1.RKE2ConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_RKE2ConfigSpec_To_v1alpha1_RKE2ConfigSpec(a.(*apiv1beta1.RKE2ConfigSpec), b.(*apiv1alpha1.RKE2ConfigSpec), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*v1beta1.RKE2ControlPlaneSpec)(nil), (*RKE2ControlPlaneSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_RKE2ControlPlaneSpec_To_v1alpha1_RKE2ControlPlaneSpec(a.(*v1beta1.RKE2ControlPlaneSpec), b.(*RKE2ControlPlaneSpec), scope) }); err != nil { @@ -251,15 +261,7 @@ func autoConvert_v1alpha1_EtcdConfig_To_v1beta1_EtcdConfig(in *EtcdConfig, out * if err := Convert_v1alpha1_EtcdBackupConfig_To_v1beta1_EtcdBackupConfig(&in.BackupConfig, &out.BackupConfig, s); err != nil { return err } - if in.CustomConfig != nil { - in, out := &in.CustomConfig, &out.CustomConfig - *out = new(apiv1beta1.ComponentConfig) - if err := apiv1alpha1.Convert_v1alpha1_ComponentConfig_To_v1beta1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.CustomConfig = nil - } + out.CustomConfig = (*apiv1beta1.ComponentConfig)(unsafe.Pointer(in.CustomConfig)) return nil } @@ -273,15 +275,7 @@ func autoConvert_v1beta1_EtcdConfig_To_v1alpha1_EtcdConfig(in *v1beta1.EtcdConfi if err := Convert_v1beta1_EtcdBackupConfig_To_v1alpha1_EtcdBackupConfig(&in.BackupConfig, &out.BackupConfig, s); err != nil { return err } - if in.CustomConfig != nil { - in, out := &in.CustomConfig, &out.CustomConfig - *out = new(apiv1alpha1.ComponentConfig) - if err := apiv1alpha1.Convert_v1beta1_ComponentConfig_To_v1alpha1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.CustomConfig = nil - } + out.CustomConfig = (*apiv1alpha1.ComponentConfig)(unsafe.Pointer(in.CustomConfig)) return nil } @@ -397,7 +391,7 @@ func Convert_v1beta1_RKE2ControlPlaneList_To_v1alpha1_RKE2ControlPlaneList(in *v } func autoConvert_v1alpha1_RKE2ControlPlaneSpec_To_v1beta1_RKE2ControlPlaneSpec(in *RKE2ControlPlaneSpec, out *v1beta1.RKE2ControlPlaneSpec, s conversion.Scope) error { - if err := apiv1alpha1.Convert_v1alpha1_RKE2ConfigSpec_To_v1beta1_RKE2ConfigSpec(&in.RKE2ConfigSpec, &out.RKE2ConfigSpec, s); err != nil { + if err := Convert_v1alpha1_RKE2ConfigSpec_To_v1beta1_RKE2ConfigSpec(&in.RKE2ConfigSpec, &out.RKE2ConfigSpec, s); err != nil { return err } out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) @@ -419,7 +413,7 @@ func Convert_v1alpha1_RKE2ControlPlaneSpec_To_v1beta1_RKE2ControlPlaneSpec(in *R } func autoConvert_v1beta1_RKE2ControlPlaneSpec_To_v1alpha1_RKE2ControlPlaneSpec(in *v1beta1.RKE2ControlPlaneSpec, out *RKE2ControlPlaneSpec, s conversion.Scope) error { - if err := apiv1alpha1.Convert_v1beta1_RKE2ConfigSpec_To_v1alpha1_RKE2ConfigSpec(&in.RKE2ConfigSpec, &out.RKE2ConfigSpec, s); err != nil { + if err := Convert_v1beta1_RKE2ConfigSpec_To_v1alpha1_RKE2ConfigSpec(&in.RKE2ConfigSpec, &out.RKE2ConfigSpec, s); err != nil { return err } out.Replicas = (*int32)(unsafe.Pointer(in.Replicas)) @@ -570,42 +564,10 @@ func autoConvert_v1alpha1_RKE2ServerConfig_To_v1beta1_RKE2ServerConfig(in *RKE2S if err := Convert_v1alpha1_EtcdConfig_To_v1beta1_EtcdConfig(&in.Etcd, &out.Etcd, s); err != nil { return err } - if in.KubeAPIServer != nil { - in, out := &in.KubeAPIServer, &out.KubeAPIServer - *out = new(apiv1beta1.ComponentConfig) - if err := apiv1alpha1.Convert_v1alpha1_ComponentConfig_To_v1beta1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.KubeAPIServer = nil - } - if in.KubeControllerManager != nil { - in, out := &in.KubeControllerManager, &out.KubeControllerManager - *out = new(apiv1beta1.ComponentConfig) - if err := apiv1alpha1.Convert_v1alpha1_ComponentConfig_To_v1beta1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.KubeControllerManager = nil - } - if in.KubeScheduler != nil { - in, out := &in.KubeScheduler, &out.KubeScheduler - *out = new(apiv1beta1.ComponentConfig) - if err := apiv1alpha1.Convert_v1alpha1_ComponentConfig_To_v1beta1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.KubeScheduler = nil - } - if in.CloudControllerManager != nil { - in, out := &in.CloudControllerManager, &out.CloudControllerManager - *out = new(apiv1beta1.ComponentConfig) - if err := apiv1alpha1.Convert_v1alpha1_ComponentConfig_To_v1beta1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.CloudControllerManager = nil - } + out.KubeAPIServer = (*apiv1beta1.ComponentConfig)(unsafe.Pointer(in.KubeAPIServer)) + out.KubeControllerManager = (*apiv1beta1.ComponentConfig)(unsafe.Pointer(in.KubeControllerManager)) + out.KubeScheduler = (*apiv1beta1.ComponentConfig)(unsafe.Pointer(in.KubeScheduler)) + out.CloudControllerManager = (*apiv1beta1.ComponentConfig)(unsafe.Pointer(in.CloudControllerManager)) out.CloudProviderName = in.CloudProviderName out.CloudProviderConfigMap = (*v1.ObjectReference)(unsafe.Pointer(in.CloudProviderConfigMap)) return nil @@ -633,42 +595,10 @@ func autoConvert_v1beta1_RKE2ServerConfig_To_v1alpha1_RKE2ServerConfig(in *v1bet if err := Convert_v1beta1_EtcdConfig_To_v1alpha1_EtcdConfig(&in.Etcd, &out.Etcd, s); err != nil { return err } - if in.KubeAPIServer != nil { - in, out := &in.KubeAPIServer, &out.KubeAPIServer - *out = new(apiv1alpha1.ComponentConfig) - if err := apiv1alpha1.Convert_v1beta1_ComponentConfig_To_v1alpha1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.KubeAPIServer = nil - } - if in.KubeControllerManager != nil { - in, out := &in.KubeControllerManager, &out.KubeControllerManager - *out = new(apiv1alpha1.ComponentConfig) - if err := apiv1alpha1.Convert_v1beta1_ComponentConfig_To_v1alpha1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.KubeControllerManager = nil - } - if in.KubeScheduler != nil { - in, out := &in.KubeScheduler, &out.KubeScheduler - *out = new(apiv1alpha1.ComponentConfig) - if err := apiv1alpha1.Convert_v1beta1_ComponentConfig_To_v1alpha1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.KubeScheduler = nil - } - if in.CloudControllerManager != nil { - in, out := &in.CloudControllerManager, &out.CloudControllerManager - *out = new(apiv1alpha1.ComponentConfig) - if err := apiv1alpha1.Convert_v1beta1_ComponentConfig_To_v1alpha1_ComponentConfig(*in, *out, s); err != nil { - return err - } - } else { - out.CloudControllerManager = nil - } + out.KubeAPIServer = (*apiv1alpha1.ComponentConfig)(unsafe.Pointer(in.KubeAPIServer)) + out.KubeControllerManager = (*apiv1alpha1.ComponentConfig)(unsafe.Pointer(in.KubeControllerManager)) + out.KubeScheduler = (*apiv1alpha1.ComponentConfig)(unsafe.Pointer(in.KubeScheduler)) + out.CloudControllerManager = (*apiv1alpha1.ComponentConfig)(unsafe.Pointer(in.CloudControllerManager)) out.CloudProviderName = in.CloudProviderName out.CloudProviderConfigMap = (*v1.ObjectReference)(unsafe.Pointer(in.CloudProviderConfigMap)) return nil diff --git a/controlplane/api/v1alpha1/zz_generated.deepcopy.go b/controlplane/api/v1alpha1/zz_generated.deepcopy.go index 189383d7..bda4b33b 100644 --- a/controlplane/api/v1alpha1/zz_generated.deepcopy.go +++ b/controlplane/api/v1alpha1/zz_generated.deepcopy.go @@ -24,7 +24,7 @@ import ( apiv1alpha1 "github.com/rancher/cluster-api-provider-rke2/bootstrap/api/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" + runtime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/cluster-api/api/v1beta1" ) diff --git a/controlplane/config/crd/bases/controlplane.cluster.x-k8s.io_rke2controlplanes.yaml b/controlplane/config/crd/bases/controlplane.cluster.x-k8s.io_rke2controlplanes.yaml index b4ad14f5..7d8f7e05 100644 --- a/controlplane/config/crd/bases/controlplane.cluster.x-k8s.io_rke2controlplanes.yaml +++ b/controlplane/config/crd/bases/controlplane.cluster.x-k8s.io_rke2controlplanes.yaml @@ -78,6 +78,7 @@ spec: description: CISProfile activates CIS compliance of RKE2 for a certain profile enum: + - cis - cis-1.23 - cis-1.5 - cis-1.6 @@ -1310,6 +1311,7 @@ spec: description: CISProfile activates CIS compliance of RKE2 for a certain profile enum: + - cis - cis-1.23 - cis-1.5 - cis-1.6 diff --git a/controlplane/config/crd/bases/controlplane.cluster.x-k8s.io_rke2controlplanetemplates.yaml b/controlplane/config/crd/bases/controlplane.cluster.x-k8s.io_rke2controlplanetemplates.yaml index 257aae86..5de035ae 100644 --- a/controlplane/config/crd/bases/controlplane.cluster.x-k8s.io_rke2controlplanetemplates.yaml +++ b/controlplane/config/crd/bases/controlplane.cluster.x-k8s.io_rke2controlplanetemplates.yaml @@ -133,6 +133,7 @@ spec: description: CISProfile activates CIS compliance of RKE2 for a certain profile enum: + - cis - cis-1.23 - cis-1.5 - cis-1.6 diff --git a/pkg/rke2/config_test.go b/pkg/rke2/config_test.go index eb426582..c96bb07a 100644 --- a/pkg/rke2/config_test.go +++ b/pkg/rke2/config_test.go @@ -280,7 +280,7 @@ var _ = Describe("RKE2 Agent Config", func() { LoadBalancerPort: 1234, NodeLabels: []string{"testlabel"}, NodeTaints: []string{"testtaint"}, - CISProfile: bootstrapv1.CIS1_23, //nolint:nosnakecase + CISProfile: bootstrapv1.CIS, //nolint:nosnakecase ProtectKernelDefaults: true, ResolvConf: &corev1.ObjectReference{ Name: "test", diff --git a/pkg/util/util.go b/pkg/util/util.go index fbd9c973..19d48cef 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -201,6 +201,8 @@ func ProfileCompliant(profile bootstrapv1.CISProfile, version string) bool { } switch profile { + case bootstrapv1.CIS: + return isAtLeastv125 case bootstrapv1.CIS1_23: return isAtLeastv125 case bootstrapv1.CIS1_5: