baremetal: add certs_validity_period_hours to bare-metal
This exposes the certs_validity_period_hours option to the bare-metal
module in lokocfg
MODIFY
pkg/platform/baremetal/baremetal.go
pkg/platform/baremetal/baremetal.go
@@ -62,6 +62,7 @@ type config struct {
DownloadProtocol string `hcl:"download_protocol,optional"`
NetworkIPAutodetectionMethod string `hcl:"network_ip_autodetection_method,optional"`
CLCSnippets map[string][]string `hcl:"clc_snippets,optional"`
+ CertsValidityPeriodHours int `hcl:"certs_validity_period_hours,optional"`
KubeAPIServerExtraFlags []string
}
@@ -235,6 +236,7 @@ func createTerraformConfigFile(cfg *config, terraformPath string) error {
Labels map[string]string
EncryptPodTraffic bool
IgnoreX509CNCheck bool
+ CertsValidityPeriodHours int
ConntrackMaxPerCore int
InstallDisk string
InstallToSmallestDisk bool
@@ -266,6 +268,7 @@ func createTerraformConfigFile(cfg *config, terraformPath string) error {
Labels: cfg.Labels,
EncryptPodTraffic: cfg.EncryptPodTraffic,
IgnoreX509CNCheck: cfg.IgnoreX509CNCheck,
+ CertsValidityPeriodHours: cfg.CertsValidityPeriodHours,
ConntrackMaxPerCore: cfg.ConntrackMaxPerCore,
InstallDisk: cfg.InstallDisk,
InstallToSmallestDisk: cfg.InstallToSmallestDisk,

MODIFY
pkg/platform/baremetal/template.go
pkg/platform/baremetal/template.go
@@ -68,6 +68,10 @@ module "bare-metal-{{.ClusterName}}" {
ignore_x509_cn_check = {{.IgnoreX509CNCheck}}
conntrack_max_per_core = {{.ConntrackMaxPerCore}}
+ {{- if .CertsValidityPeriodHours }}
+ certs_validity_period_hours = {{.CertsValidityPeriodHours}}
+ {{- end }}
+
{{- if .InstallDisk }}
install_disk = "{{ .InstallDisk }}"
{{- end }}

baremetal: add certs_validity_period_hours to bare-metal

This exposes the certs_validity_period_hours option to the bare-metal
module in lokocfg

Signed-off-by: Maartje Eyskens <maartje@kinvolk.io>