Skip to content

Commit

Permalink
Restrict supported service types of Karamda APIServer provisioned by …
Browse files Browse the repository at this point in the history
…karmada-operator.

Signed-off-by: RainbowMango <[email protected]>
  • Loading branch information
RainbowMango committed Nov 1, 2024
1 parent 057cf86 commit a644477
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
12 changes: 9 additions & 3 deletions charts/karmada-operator/crds/operator.karmada.io_karmadas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 9 additions & 3 deletions operator/config/crds/operator.karmada.io_karmadas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions operator/pkg/apis/operator/v1alpha1/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down

0 comments on commit a644477

Please sign in to comment.