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

Add Cluster CIDR setting for bottlerocket #7386

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions pkg/providers/amifamily/bootstrap/bottlerocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func (b Bottlerocket) Script() (string, error) {
s.Settings.Kubernetes.ClusterName = &b.ClusterName
s.Settings.Kubernetes.APIServer = &b.ClusterEndpoint
s.Settings.Kubernetes.ClusterCertificate = b.CABundle
s.Settings.Kubernetes.ClusterCIDR = b.ClusterCIDR
if err := mergo.MergeWithOverwrite(&s.Settings.Kubernetes.NodeLabels, b.Labels); err != nil {
return "", err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type BottlerocketKubernetes struct {
CloudProvider *string `toml:"cloud-provider"`
ClusterCertificate *string `toml:"cluster-certificate"`
ClusterName *string `toml:"cluster-name"`
ClusterCIDR *string `toml:"cluster-cidr,omitempty"`
ClusterDNSIP *string `toml:"cluster-dns-ip,omitempty"`
CredentialProviders map[string]BottlerocketCredentialProvider `toml:"credential-providers,omitempty"`
NodeLabels map[string]string `toml:"node-labels,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions pkg/providers/amifamily/bottlerocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func (b Bottlerocket) UserData(kubeletConfig *v1.KubeletConfiguration, taints []
Options: bootstrap.Options{
ClusterName: b.Options.ClusterName,
ClusterEndpoint: b.Options.ClusterEndpoint,
ClusterCIDR: b.Options.ClusterCIDR,
KubeletConfig: kubeletConfig,
Taints: taints,
Labels: labels,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ api-server = 'https://test-cluster'
cloud-provider = 'external'
cluster-certificate = 'ca-bundle'
cluster-name = 'test-cluster'
cluster-cidr = '10.100.0.0/16'
cluster-dns-ip = '10.0.100.10'
max-pods = 110

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
api-server = 'https://test-cluster'
cluster-certificate = 'ca-bundle'
cluster-name = 'test-cluster'
cluster-cidr = '10.100.0.0/16'
cluster-dns-ip = '10.0.100.10'
max-pods = 110

Expand Down
Loading