diff --git a/charts/karmada-operator/crds/operator.karmada.io_karmadas.yaml b/charts/karmada-operator/crds/operator.karmada.io_karmadas.yaml index f191d3d18ee5..16814fa36fbf 100644 --- a/charts/karmada-operator/crds/operator.karmada.io_karmadas.yaml +++ b/charts/karmada-operator/crds/operator.karmada.io_karmadas.yaml @@ -2539,9 +2539,15 @@ spec: Defaults to "10.96.0.0/12". type: string serviceType: - description: |- - ServiceType represents the service type of karmada apiserver. - it is ClusterIP by default. + default: ClusterIP + description: |- + 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: diff --git a/operator/config/crds/operator.karmada.io_karmadas.yaml b/operator/config/crds/operator.karmada.io_karmadas.yaml index f191d3d18ee5..16814fa36fbf 100644 --- a/operator/config/crds/operator.karmada.io_karmadas.yaml +++ b/operator/config/crds/operator.karmada.io_karmadas.yaml @@ -2539,9 +2539,15 @@ spec: Defaults to "10.96.0.0/12". type: string serviceType: - description: |- - ServiceType represents the service type of karmada apiserver. - it is ClusterIP by default. + default: ClusterIP + description: |- + 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: diff --git a/operator/pkg/apis/operator/v1alpha1/type.go b/operator/pkg/apis/operator/v1alpha1/type.go index 954f95c571b5..adeed796a528 100644 --- a/operator/pkg/apis/operator/v1alpha1/type.go +++ b/operator/pkg/apis/operator/v1alpha1/type.go @@ -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"`