@@ -86,16 +86,20 @@ type CentralConfig struct {
8686 Exposure * types.Exposure `yaml:"exposure,omitempty"`
8787 DeployTimeout time.Duration `yaml:"deployTimeout,omitempty"`
8888 PortForwarding * bool `yaml:"portForwarding,omitempty"`
89- EarlyReadiness bool `yaml:"earlyReadiness,omitempty"`
89+ EarlyReadiness * bool `yaml:"earlyReadiness,omitempty"`
9090 Spec map [string ]interface {} `yaml:"spec,omitempty"`
9191}
9292
93+ func (c * CentralConfig ) EarlyReadinessEnabled () bool {
94+ return c .EarlyReadiness != nil && * c .EarlyReadiness
95+ }
96+
9397// DefaultCentralConfig returns a CentralConfig with sensible defaults.
9498func DefaultCentralConfig () CentralConfig {
9599 return CentralConfig {
96100 DeployTimeout : DefaultCentralWaitTimeout ,
97101 Namespace : "acs-central" ,
98- EarlyReadiness : true ,
102+ EarlyReadiness : new ( true ) ,
99103 Spec : map [string ]interface {}{
100104 "central" : map [string ]interface {}{
101105 "telemetry" : map [string ]interface {}{
@@ -112,12 +116,12 @@ func (c *CentralConfig) GetWaitConfig() WaitConfig {
112116 // With earlyReadiness we just wait for the Available condition of that component's core
113117 // Deployment to be True.
114118 waitFor := "central/" + centralCrName
115- if c .EarlyReadiness {
119+ if c .EarlyReadinessEnabled () {
116120 waitFor = "deployment/central"
117121 }
118122 return WaitConfig {
119123 Namespace : c .Namespace ,
120- EarlyReadiness : c .EarlyReadiness ,
124+ EarlyReadiness : c .EarlyReadinessEnabled () ,
121125 WaitFor : waitFor ,
122126 Timeout : c .DeployTimeout ,
123127 }
@@ -204,28 +208,32 @@ type SecuredClusterConfig struct {
204208 ResourceProfile types.ResourceProfile `yaml:"resourceProfile,omitempty"`
205209 PauseReconciliation bool `yaml:"pauseReconciliation,omitempty"`
206210 DeployTimeout time.Duration `yaml:"deployTimeout,omitempty"`
207- EarlyReadiness bool `yaml:"earlyReadiness,omitempty"`
211+ EarlyReadiness * bool `yaml:"earlyReadiness,omitempty"`
208212 Spec map [string ]interface {} `yaml:"spec,omitempty"`
209213}
210214
215+ func (s * SecuredClusterConfig ) EarlyReadinessEnabled () bool {
216+ return s .EarlyReadiness != nil && * s .EarlyReadiness
217+ }
218+
211219// DefaultSecuredClusterConfig returns a SecuredClusterConfig with sensible defaults.
212220func DefaultSecuredClusterConfig () SecuredClusterConfig {
213221 return SecuredClusterConfig {
214222 DeployTimeout : DefaultSecuredClusterWaitTimeout ,
215223 Namespace : "acs-sensor" ,
216- EarlyReadiness : true ,
224+ EarlyReadiness : new ( true ) ,
217225 Spec : make (map [string ]interface {}),
218226 }
219227}
220228
221229func (s * SecuredClusterConfig ) GetWaitConfig () WaitConfig {
222230 waitFor := "securedcluster/" + securedClusterCrName
223- if s .EarlyReadiness {
231+ if s .EarlyReadinessEnabled () {
224232 waitFor = "deployment/sensor"
225233 }
226234 return WaitConfig {
227235 Namespace : s .Namespace ,
228- EarlyReadiness : s .EarlyReadiness ,
236+ EarlyReadiness : s .EarlyReadinessEnabled () ,
229237 WaitFor : waitFor ,
230238 Timeout : s .DeployTimeout ,
231239 }
0 commit comments