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

Commit

Permalink
Merge pull request #452 from charleszheng44/base64-kubeconfig
Browse files Browse the repository at this point in the history
[Incubatore][VC]encode admin-kubeconfig in base64 before adding it to the annotation
  • Loading branch information
k8s-ci-robot authored Feb 25, 2020
2 parents f017f03 + 68638ab commit 8075a36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion incubator/virtualcluster/cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
metricsAddr string
masterProvisioner string
)
flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&metricsAddr, "metrics-addr", ":0", "The address the metric endpoint binds to.")
flag.StringVar(&masterProvisioner, "master-prov", "native", "The underlying platform that will provision master for virtualcluster.")
flag.Parse()
logf.SetLogger(logf.ZapLogger(false))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package virtualcluster

import (
"context"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
Expand Down Expand Up @@ -440,7 +441,7 @@ func (mpa *MasterProvisionerAliyun) CreateVirtualCluster(vc *tenancyv1alpha1.Vir
clsState string
clsSlbId string
)
creationTimeout := time.After(100 * time.Second)
creationTimeout := time.After(600 * time.Second)
clsID, err = sendCreationRequest(cli, vc.Name, askCfg)
if err != nil {
if !isSDKErr(err) {
Expand Down Expand Up @@ -536,7 +537,8 @@ PollASK:
return err
}
log.Info("cluster ID has been added to vc as an annotation", "vc", vc.GetName(), "cluster-id", clsID)
err = kubeutil.AnnotateVC(mpa, vc, AnnotationKubeconfig, kbCfg, log)
kbCfgB64 := base64.StdEncoding.EncodeToString([]byte(kbCfg))
err = kubeutil.AnnotateVC(mpa, vc, AnnotationKubeconfig, kbCfgB64, log)
if err != nil {
return err
}
Expand Down

0 comments on commit 8075a36

Please sign in to comment.