1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-17 07:30:01 +00:00

Add support for custom WrapTransport for Kubernetes Client

This commit is contained in:
moelsayed
2018-02-20 13:51:57 +02:00
parent b1c2a5d153
commit 03673b8f22
12 changed files with 54 additions and 40 deletions

View File

@@ -8,9 +8,9 @@ import (
"github.com/rancher/rke/templates"
)
func ApplyJobDeployerServiceAccount(ctx context.Context, kubeConfigPath string) error {
func ApplyJobDeployerServiceAccount(ctx context.Context, kubeConfigPath string, k8sWrapTransport k8s.WrapTransport) error {
log.Infof(ctx, "[authz] Creating rke-job-deployer ServiceAccount")
k8sClient, err := k8s.NewClient(kubeConfigPath)
k8sClient, err := k8s.NewClient(kubeConfigPath, k8sWrapTransport)
if err != nil {
return err
}
@@ -24,9 +24,9 @@ func ApplyJobDeployerServiceAccount(ctx context.Context, kubeConfigPath string)
return nil
}
func ApplySystemNodeClusterRoleBinding(ctx context.Context, kubeConfigPath string) error {
func ApplySystemNodeClusterRoleBinding(ctx context.Context, kubeConfigPath string, k8sWrapTransport k8s.WrapTransport) error {
log.Infof(ctx, "[authz] Creating system:node ClusterRoleBinding")
k8sClient, err := k8s.NewClient(kubeConfigPath)
k8sClient, err := k8s.NewClient(kubeConfigPath, k8sWrapTransport)
if err != nil {
return err
}