1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-15 22:49:13 +00:00

Force deploy certificates if kubeapi cert got changed

This commit is contained in:
galal-hussein
2019-04-23 23:42:10 +02:00
committed by Alena Prokharchyk
parent 765746fc77
commit 7744f18d6e
5 changed files with 27 additions and 11 deletions

View File

@@ -76,7 +76,7 @@ func setDefaultIfEmpty(varName *string, defaultValue string) {
}
}
func (c *Cluster) setClusterDefaults(ctx context.Context) error {
func (c *Cluster) setClusterDefaults(ctx context.Context, flags ExternalFlags) error {
if len(c.SSHKeyPath) == 0 {
c.SSHKeyPath = DefaultClusterSSHKeyPath
}
@@ -155,6 +155,11 @@ func (c *Cluster) setClusterDefaults(ctx context.Context) error {
c.DNS.Provider = DefaultDNSProvider
}
if c.RancherKubernetesEngineConfig.RotateCertificates != nil ||
flags.CustomCerts {
c.ForceDeployCerts = true
}
c.setClusterServicesDefaults()
c.setClusterNetworkDefaults()
c.setClusterAuthnDefaults()