Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add kube scheduler server args & plumb through to config #54

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bootstrap/api/v1beta1/kthreesconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ type KThreesServerConfig struct {
// +optional
KubeControllerManagerArgs []string `json:"kubeControllerManagerArgs,omitempty"`

// KubeSchedulerArgs is a customized flag for kube-scheduler process
// +optional
KubeSchedulerArgs []string `json:"kubeSchedulerArgs,omitempty"`

// TLSSan Add additional hostname or IP as a Subject Alternative Name in the TLS cert
// +optional
TLSSan []string `json:"tlsSan,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ spec:
items:
type: string
type: array
kubeSchedulerArgs:
description: KubeSchedulerArgs is a customized flag for kube-scheduler
process
items:
type: string
type: array
serviceCidr:
description: 'ServiceCidr Network CIDR to use for services IPs
(default: "10.43.0.0/16")'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ spec:
items:
type: string
type: array
kubeSchedulerArgs:
description: KubeSchedulerArgs is a customized flag for
kube-scheduler process
items:
type: string
type: array
serviceCidr:
description: 'ServiceCidr Network CIDR to use for services
IPs (default: "10.43.0.0/16")'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ spec:
items:
type: string
type: array
kubeSchedulerArgs:
description: KubeSchedulerArgs is a customized flag for kube-scheduler
process
items:
type: string
type: array
serviceCidr:
description: 'ServiceCidr Network CIDR to use for services
IPs (default: "10.43.0.0/16")'
Expand Down
3 changes: 3 additions & 0 deletions pkg/k3s/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type K3sServerConfig struct {
DisableCloudController bool `json:"disable-cloud-controller,omitempty"`
KubeAPIServerArgs []string `json:"kube-apiserver-arg,omitempty"`
KubeControllerManagerArgs []string `json:"kube-controller-manager-arg,omitempty"`
KubeSchedulerArgs []string `json:"kube-scheduler-arg,omitempty"`
TLSSan []string `json:"tls-san,omitempty"`
BindAddress string `json:"bind-address,omitempty"`
HTTPSListenPort string `json:"https-listen-port,omitempty"`
Expand Down Expand Up @@ -45,6 +46,7 @@ func GenerateInitControlPlaneConfig(controlPlaneEndpoint string, token string, s
KubeAPIServerArgs: append(serverConfig.KubeAPIServerArgs, "anonymous-auth=true", getTLSCipherSuiteArg()),
TLSSan: append(serverConfig.TLSSan, controlPlaneEndpoint),
KubeControllerManagerArgs: append(serverConfig.KubeControllerManagerArgs, "cloud-provider=external"),
KubeSchedulerArgs: serverConfig.KubeSchedulerArgs,
BindAddress: serverConfig.BindAddress,
HTTPSListenPort: serverConfig.HTTPSListenPort,
AdvertiseAddress: serverConfig.AdvertiseAddress,
Expand Down Expand Up @@ -75,6 +77,7 @@ func GenerateJoinControlPlaneConfig(serverURL string, token string, controlplane
KubeAPIServerArgs: append(serverConfig.KubeAPIServerArgs, "anonymous-auth=true", getTLSCipherSuiteArg()),
TLSSan: append(serverConfig.TLSSan, controlplaneendpoint),
KubeControllerManagerArgs: append(serverConfig.KubeControllerManagerArgs, "cloud-provider=external"),
KubeSchedulerArgs: serverConfig.KubeSchedulerArgs,
BindAddress: serverConfig.BindAddress,
HTTPSListenPort: serverConfig.HTTPSListenPort,
AdvertiseAddress: serverConfig.AdvertiseAddress,
Expand Down
Loading