Skip to content

Commit

Permalink
chore: add kube scheduler server args & plumb through to config (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebond authored Oct 3, 2023
1 parent d95461f commit e4ea03a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
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

0 comments on commit e4ea03a

Please sign in to comment.