Restrict supported service types of Karamda APIServer provisioned by karmada-operator.

Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
This commit is contained in:
RainbowMango 2024-11-01 17:34:21 +08:00
parent 057cf860f4
commit a644477266
3 changed files with 22 additions and 6 deletions

View File

@ -2539,9 +2539,15 @@ spec:
Defaults to "10.96.0.0/12".
type: string
serviceType:
default: ClusterIP
description: |-
ServiceType represents the service type of karmada apiserver.
it is ClusterIP by default.
ServiceType represents the service type of Karmada API server.
Valid options are: "ClusterIP", "NodePort", "LoadBalancer".
Defaults to "ClusterIP".
enum:
- ClusterIP
- NodePort
- LoadBalancer
type: string
type: object
karmadaAggregatedAPIServer:

View File

@ -2539,9 +2539,15 @@ spec:
Defaults to "10.96.0.0/12".
type: string
serviceType:
default: ClusterIP
description: |-
ServiceType represents the service type of karmada apiserver.
it is ClusterIP by default.
ServiceType represents the service type of Karmada API server.
Valid options are: "ClusterIP", "NodePort", "LoadBalancer".
Defaults to "ClusterIP".
enum:
- ClusterIP
- NodePort
- LoadBalancer
type: string
type: object
karmadaAggregatedAPIServer:

View File

@ -277,8 +277,12 @@ type KarmadaAPIServer struct {
// +optional
ServiceSubnet *string `json:"serviceSubnet,omitempty"`
// ServiceType represents the service type of karmada apiserver.
// it is ClusterIP by default.
// ServiceType represents the service type of Karmada API server.
// Valid options are: "ClusterIP", "NodePort", "LoadBalancer".
// Defaults to "ClusterIP".
//
// +kubebuilder:default="ClusterIP"
// +kubebuilder:validation:Enum=ClusterIP;NodePort;LoadBalancer
// +optional
ServiceType corev1.ServiceType `json:"serviceType,omitempty"`