@@ -574,7 +574,8 @@ const (
574574 LogSystemLoadConfigName = "log-system-load"
575575
576576 // DisableCiliumEndpointCRDName is the name of the option to disable
577- // use of the CEP CRD
577+ // use of the CEP CRD. Can be used along with operator's 'ces-controller-mode=slim'
578+ // mode to distribute endpoints without creating them.
578579 DisableCiliumEndpointCRDName = "disable-endpoint-crd"
579580
580581 // MaxCtrlIntervalName and MaxCtrlIntervalNameEnv allow configuration
@@ -2771,12 +2772,10 @@ func (c *DaemonConfig) Populate(logger *slog.Logger, vp *viper.Viper) {
27712772 logging .Fatal (logger , "Unable to parse excluded local addresses" , logfields .Error , err )
27722773 }
27732774
2774- // Ensure CiliumEndpointSlice is enabled only if CiliumEndpointCRD is enabled too.
2775+ // Relaxed: In operator-driven slim mode configurations, both CiliumEndpointSlices
2776+ // and DisableCiliumEndpointCRD can be true concurrently. The synchronization
2777+ // components skip standalone CEP creation in agent while leveraging CEPs.
27752778 c .EnableCiliumEndpointSlice = vp .GetBool (EnableCiliumEndpointSlice )
2776- if c .EnableCiliumEndpointSlice && c .DisableCiliumEndpointCRD {
2777- logging .Fatal (logger , fmt .Sprintf ("Running Cilium with %s=%t requires %s set to false to enable CiliumEndpoint CRDs." ,
2778- EnableCiliumEndpointSlice , c .EnableCiliumEndpointSlice , DisableCiliumEndpointCRDName ))
2779- }
27802779
27812780 // To support K8s NetworkPolicy
27822781 c .EnableK8sNetworkPolicy = vp .GetBool (EnableK8sNetworkPolicy )
@@ -2805,7 +2804,7 @@ func (c *DaemonConfig) Populate(logger *slog.Logger, vp *viper.Viper) {
28052804 logger .Warn (fmt .Sprintf ("Running Cilium with %q=%q requires identity allocation via CRDs. Changing %s to %q" , KVStore , theKVStore , IdentityAllocationMode , IdentityAllocationModeCRD ))
28062805 c .IdentityAllocationMode = IdentityAllocationModeCRD
28072806 }
2808- if c .DisableCiliumEndpointCRD && NetworkPolicyEnabled (c ) {
2807+ if c .DisableCiliumEndpointCRD && NetworkPolicyEnabled (c ) && ! c . EnableCiliumEndpointSlice {
28092808 logger .Warn (fmt .Sprintf ("Running Cilium with %q=%q requires endpoint CRDs when network policy enforcement system is enabled. Changing %s to %t" , KVStore , theKVStore , DisableCiliumEndpointCRDName , false ))
28102809 c .DisableCiliumEndpointCRD = false
28112810 }
0 commit comments