本文整理汇总了Golang中github.com/openshift/origin/pkg/cmd/util/clientcmd.EnvVars函数的典型用法代码示例。如果您正苦于以下问题:Golang EnvVars函数的具体用法?Golang EnvVars怎么用?Golang EnvVars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EnvVars函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: RunDeploymentController
// RunDeploymentController starts the deployment controller process.
func (c *MasterConfig) RunDeploymentController() {
rcInformer := c.Informers.ReplicationControllers().Informer()
podInformer := c.Informers.Pods().Informer()
_, kclient := c.DeploymentControllerClients()
_, kclientConfig, err := configapi.GetKubeClient(c.Options.MasterClients.OpenShiftLoopbackKubeConfig, c.Options.MasterClients.OpenShiftLoopbackClientConnectionOverrides)
if err != nil {
glog.Fatalf("Unable to initialize deployment controller: %v", err)
}
// TODO eliminate these environment variables once service accounts provide a kubeconfig that includes all of this info
env := clientcmd.EnvVars(
kclientConfig.Host,
kclientConfig.CAData,
kclientConfig.Insecure,
path.Join(serviceaccountadmission.DefaultAPITokenMountPath, kapi.ServiceAccountTokenKey),
)
controller := deploycontroller.NewDeploymentController(
rcInformer,
podInformer,
kclient,
bootstrappolicy.DeployerServiceAccountName,
c.ImageFor("deployer"),
env,
c.ExternalVersionCodec,
)
go controller.Run(5, utilwait.NeverStop)
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:29,代码来源:run_components.go
示例2: RunDeploymentController
// RunDeploymentController starts the deployment controller process.
func (c *MasterConfig) RunDeploymentController() {
_, kclient := c.DeploymentControllerClients()
_, kclientConfig, err := configapi.GetKubeClient(c.Options.MasterClients.OpenShiftLoopbackKubeConfig)
if err != nil {
glog.Fatalf("Unable to initialize deployment controller: %v", err)
}
// TODO eliminate these environment variables once service accounts provide a kubeconfig that includes all of this info
env := clientcmd.EnvVars(
kclientConfig.Host,
kclientConfig.CAData,
kclientConfig.Insecure,
path.Join(serviceaccountadmission.DefaultAPITokenMountPath, kapi.ServiceAccountTokenKey),
)
factory := deploycontroller.DeploymentControllerFactory{
KubeClient: kclient,
Codec: c.EtcdHelper.Codec(),
Environment: env,
DeployerImage: c.ImageFor("deployer"),
ServiceAccount: bootstrappolicy.DeployerServiceAccountName,
}
controller := factory.Create()
controller.Run()
}
开发者ID:RomainVabre,项目名称:origin,代码行数:27,代码来源:run_components.go
示例3: RunDeploymentController
// RunDeploymentController starts the deployment controller process.
func (c *MasterConfig) RunDeploymentController() {
rcInformer := c.Informers.ReplicationControllers().Informer()
podInformer := c.Informers.Pods().Informer()
_, kclient := c.DeploymentControllerClients()
_, kclientConfig, err := configapi.GetKubeClient(c.Options.MasterClients.OpenShiftLoopbackKubeConfig)
if err != nil {
glog.Fatalf("Unable to initialize deployment controller: %v", err)
}
// TODO eliminate these environment variables once service accounts provide a kubeconfig that includes all of this info
env := clientcmd.EnvVars(
kclientConfig.Host,
kclientConfig.CAData,
kclientConfig.Insecure,
path.Join(serviceaccountadmission.DefaultAPITokenMountPath, kapi.ServiceAccountTokenKey),
)
controller := deploycontroller.NewDeploymentController(
rcInformer,
podInformer,
kclient,
bootstrappolicy.DeployerServiceAccountName,
c.ImageFor("deployer"),
env,
c.EtcdHelper.Codec(),
)
// TODO: Make the stop channel actually work.
stopCh := make(chan struct{})
// TODO: Make the number of workers configurable.
go controller.Run(5, stopCh)
}
开发者ID:rchicoli,项目名称:openshift-origin,代码行数:33,代码来源:run_components.go
注:本文中的github.com/openshift/origin/pkg/cmd/util/clientcmd.EnvVars函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论