Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Add certs_validity_period_hours to bare-metal
Browse files Browse the repository at this point in the history
This exposes the certs_validity_period_hours option to the bare-metal
module in lokocfg

Signed-off-by: Maartje Eyskens <maartje@kinvolk.io>
  • Loading branch information
Maartje Eyskens committed Mar 17, 2021
1 parent 95a1dd0 commit c567c95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/platform/baremetal/baremetal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -227,6 +228,7 @@ func createTerraformConfigFile(cfg *config, terraformPath string) error {
Labels map[string]string
EncryptPodTraffic bool
IgnoreX509CNCheck bool
CertsValidityPeriodHours int
ConntrackMaxPerCore int
InstallDisk string
InstallToSmallestDisk bool
Expand Down Expand Up @@ -258,6 +260,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,
Expand Down
4 changes: 4 additions & 0 deletions pkg/platform/baremetal/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit c567c95

Please sign in to comment.