Skip to content

Commit

Permalink
Add trustCA to RegenClusterCerts function
Browse files Browse the repository at this point in the history
  • Loading branch information
xagent003 committed Sep 28, 2022
1 parent 50c9636 commit 96225dd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nodeletctl/pkg/nodeletctl/nodeletctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ func DeployCluster(clusterCfg *BootstrapConfig) error {

err := trustCA(clusterCfg.CertsDir)
if err != nil {
zap.S().Infof("error adding nodelet Root CA as trusted certs: %s\n", err)
return err
zap.S().Errorf("error adding nodelet Root CA as trusted certs: %s\n", err)
return fmt.Errorf("error adding nodelet Root CA as trusted certs: %s\n", err)
}

if err := GenKubeconfig(clusterCfg); err != nil {
Expand Down Expand Up @@ -774,6 +774,12 @@ func RegenClusterCerts(cfgPath string) error {
return fmt.Errorf("Failed to regenerate new CA: %s", err)
}

err = trustCA(clusterCfg.CertsDir)
if err != nil {
zap.S().Errorf("error adding nodelet Root CA as trusted certs: %s\n", err)
return fmt.Errorf("error adding nodelet Root CA as trusted certs: %s\n", err)
}

clusterStatus := new(ClusterStatus)
clusterStatus.statusMap = make(map[string]*NodeStatus)

Expand Down

0 comments on commit 96225dd

Please sign in to comment.