Skip to content

Commit

Permalink
Merge pull request #5769 from RainbowMango/pr_restrict_operator_servi…
Browse files Browse the repository at this point in the history
…ce_type

Restrict supported service types of Karamda APIServer supported by karmada-operator
  • Loading branch information
karmada-bot authored Nov 2, 2024
2 parents 057cf86 + a644477 commit b270d02
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 b270d02

Please sign in to comment.