@@ -232,19 +232,62 @@ const (
232
232
FeatureGateModeTypeDisable FeatureGateModeType = "Disable"
233
233
)
234
234
235
+ // DefaultClusterManagerConfiguration represents customized configurations for clustermanager in the Default mode
236
+ type DefaultClusterManagerConfiguration struct {
237
+ // RegistrationWebhookConfiguration represents the customized webhook-server configuration of registration.
238
+ // +optional
239
+ RegistrationWebhookConfiguration DefaultWebhookConfiguration `json:"registrationWebhookConfiguration,omitempty"`
240
+
241
+ // WorkWebhookConfiguration represents the customized webhook-server configuration of work.
242
+ // +optional
243
+ WorkWebhookConfiguration DefaultWebhookConfiguration `json:"workWebhookConfiguration,omitempty"`
244
+ }
245
+
235
246
// HostedClusterManagerConfiguration represents customized configurations we need to set for clustermanager in the Hosted mode.
236
247
type HostedClusterManagerConfiguration struct {
237
248
// RegistrationWebhookConfiguration represents the customized webhook-server configuration of registration.
238
249
// +optional
239
- RegistrationWebhookConfiguration WebhookConfiguration `json:"registrationWebhookConfiguration,omitempty"`
250
+ RegistrationWebhookConfiguration HostedWebhookConfiguration `json:"registrationWebhookConfiguration,omitempty"`
240
251
241
252
// WorkWebhookConfiguration represents the customized webhook-server configuration of work.
242
253
// +optional
243
- WorkWebhookConfiguration WebhookConfiguration `json:"workWebhookConfiguration,omitempty"`
254
+ WorkWebhookConfiguration HostedWebhookConfiguration `json:"workWebhookConfiguration,omitempty"`
244
255
}
245
256
246
- // WebhookConfiguration has two properties: Address and Port.
257
+ // WebhookConfiguration represents customization of webhook servers
247
258
type WebhookConfiguration struct {
259
+ // HealthProbeBindAddress represents the healthcheck address of a webhook-server. The default value is ":8000".
260
+ // Healthchecks may be disabled by setting a value of "0" or "".
261
+ // +optional
262
+ // +kubebuilder:default=":8000"
263
+ HealthProbeBindAddress string `json:"healthProbeBindAddress"`
264
+
265
+ // MetricsBindAddress represents the metrics address of a webhook-server. The default value is ":8080"
266
+ // Metrics may be disabled by setting a value of "0" or "".
267
+ // +optional
268
+ // +kubebuilder:default=":8080"
269
+ MetricsBindAddress string `json:"metricsBindAddress"`
270
+
271
+ // HostNetwork enables running webhook pods with hostNetwork: true
272
+ // This may be required in some installations, such as EKS with Calico CNI,
273
+ // to allow the API Server to communicate with the webhook pods.
274
+ // +optional
275
+ HostNetwork bool `json:"hostNetwork,omitempty"`
276
+ }
277
+
278
+ // DefaultWebhookConfiguration represents customization of webhook servers running in default installation mode
279
+ type DefaultWebhookConfiguration struct {
280
+ // Port represents the port of a webhook-server. The default value of Port is 9443.
281
+ // +optional
282
+ // +kubebuilder:default=9443
283
+ // +kubebuilder:validation:Maximum=65535
284
+ Port int32 `json:"port,omitempty"`
285
+
286
+ WebhookConfiguration `json:",inline"`
287
+ }
288
+
289
+ // HostedWebhookConfiguration represents customization of webhook servers running in hosted installation mode
290
+ type HostedWebhookConfiguration struct {
248
291
// Address represents the address of a webhook-server.
249
292
// It could be in IP format or fqdn format.
250
293
// The Address must be reachable by apiserver of the hub cluster.
@@ -258,6 +301,8 @@ type WebhookConfiguration struct {
258
301
// +kubebuilder:default=443
259
302
// +kubebuilder:validation:Maximum=65535
260
303
Port int32 `json:"port,omitempty"`
304
+
305
+ WebhookConfiguration `json:",inline"`
261
306
}
262
307
263
308
// ClusterManagerDeployOption describes the deployment options for cluster-manager
@@ -274,6 +319,10 @@ type ClusterManagerDeployOption struct {
274
319
// +kubebuilder:validation:Enum=Default;Hosted
275
320
Mode InstallMode `json:"mode,omitempty"`
276
321
322
+ // Default includes configurations for clustermanager in the Default mode
323
+ // +optional
324
+ Default * DefaultClusterManagerConfiguration `json:"default,omitempty"`
325
+
277
326
// Hosted includes configurations we need for clustermanager in the Hosted mode.
278
327
// +optional
279
328
Hosted * HostedClusterManagerConfiguration `json:"hosted,omitempty"`
0 commit comments