Make Kubernetes serviceCIDR configurable in config (#2660)

* config: pass serviceCIDR to kubeadm init

* terraform: add serviceCIDR
This commit is contained in:
3u13r 2023-12-01 14:39:05 +01:00 committed by GitHub
parent c2d1a7b7fb
commit 63cdd03d09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 103 additions and 61 deletions

View file

@ -298,6 +298,13 @@ func (k *KubeadmInitYAML) SetProviderID(providerID string) {
}
}
// SetServiceSubnet sets the service subnet.
func (k *KubeadmInitYAML) SetServiceSubnet(subnet string) {
if subnet != "" {
k.ClusterConfiguration.Networking.ServiceSubnet = subnet
}
}
// Marshal into a k8s resource YAML.
func (k *KubeadmInitYAML) Marshal() ([]byte, error) {
return kubernetes.MarshalK8SResources(k)