@@ -232,6 +232,17 @@ 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 WebhookDefaultConfiguration `json:"registrationWebhookConfiguration,omitempty"`
240
+
241
+ // WorkWebhookConfiguration represents the customized webhook-server configuration of work.
242
+ // +optional
243
+ WorkWebhookConfiguration WebhookDefaultConfiguration `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.
@@ -243,6 +254,33 @@ type HostedClusterManagerConfiguration struct {
243
254
WorkWebhookConfiguration WebhookConfiguration `json:"workWebhookConfiguration,omitempty"`
244
255
}
245
256
257
+ // WebhookDefaultConfiguration represents configuration for webhooks running in "Default" mode in the hub cluster
258
+ type WebhookDefaultConfiguration struct {
259
+ // Port represents the port of a webhook-server. The default value of Port is 9443.
260
+ // +optional
261
+ // +kubebuilder:default=9443
262
+ // +kubebuilder:validation:Maximum=65535
263
+ Port int32 `json:"port,omitempty"`
264
+
265
+ // HealthProbeBindAddress represents the healthcheck address of a webhook-server. The default value is ":8000".
266
+ // Healthchecks may be disabled by setting a value of "0" or "".
267
+ // +optional
268
+ // +kubebuilder:default=":8000"
269
+ HealthProbeBindAddress string `json:"healthProbeBindAddress"`
270
+
271
+ // MetricsBindAddress represents the metrics address of a webhook-server. The default value is ":8080"
272
+ // Metrics may be disabled by setting a value of "0" or "".
273
+ // +optional
274
+ // +kubebuilder:default=":8080"
275
+ MetricsBindAddress string `json:"metricsBindAddress"`
276
+
277
+ // HostNetwork enables running webhook pods with hostNetwork: true
278
+ // This may be required in some installations, such as EKS with Calico CNI,
279
+ // to allow the API Server to communicate with the webhook pods.
280
+ // +optional
281
+ HostNetwork bool `json:"hostNetwork,omitempty"`
282
+ }
283
+
246
284
// WebhookConfiguration has two properties: Address and Port.
247
285
type WebhookConfiguration struct {
248
286
// Address represents the address of a webhook-server.
@@ -274,6 +312,10 @@ type ClusterManagerDeployOption struct {
274
312
// +kubebuilder:validation:Enum=Default;Hosted
275
313
Mode InstallMode `json:"mode,omitempty"`
276
314
315
+ // Default includes configurations for clustermanager in the Default mode
316
+ // +optional
317
+ Default * DefaultClusterManagerConfiguration `json:"default,omitempty"`
318
+
277
319
// Hosted includes configurations we need for clustermanager in the Hosted mode.
278
320
// +optional
279
321
Hosted * HostedClusterManagerConfiguration `json:"hosted,omitempty"`
0 commit comments