本文整理匯總了Golang中github.com/openshift/origin/pkg/cmd/server/origin.MasterConfig.GetOldServiceAccountClients方法的典型用法代碼示例。如果您正苦於以下問題:Golang MasterConfig.GetOldServiceAccountClients方法的具體用法?Golang MasterConfig.GetOldServiceAccountClients怎麽用?Golang MasterConfig.GetOldServiceAccountClients使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/openshift/origin/pkg/cmd/server/origin.MasterConfig
的用法示例。
在下文中一共展示了MasterConfig.GetOldServiceAccountClients方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: startControllers
// startControllers launches the controllers
func startControllers(oc *origin.MasterConfig, kc *kubernetes.MasterConfig) error {
if oc.Options.Controllers == configapi.ControllersDisabled {
return nil
}
go func() {
oc.ControllerPlugStart()
// when a manual shutdown (DELETE /controllers) or lease lost occurs, the process should exit
// this ensures no code is still running as a controller, and allows a process manager to reset
// the controller to come back into a candidate state and compete for the lease
if err := oc.ControllerPlug.WaitForStop(); err != nil {
glog.Fatalf("Controller shutdown due to lease being lost: %v", err)
}
glog.Fatalf("Controller graceful shutdown requested")
}()
oc.ControllerPlug.WaitForStart()
glog.Infof("Controllers starting (%s)", oc.Options.Controllers)
// Get configured options (or defaults) for k8s controllers
controllerManagerOptions := cmapp.NewCMServer()
if kc != nil && kc.ControllerManager != nil {
controllerManagerOptions = kc.ControllerManager
}
// Start these first, because they provide credentials for other controllers' clients
oc.RunServiceAccountsController()
oc.RunServiceAccountTokensController(controllerManagerOptions)
// used by admission controllers
oc.RunServiceAccountPullSecretsControllers()
oc.RunSecurityAllocationController()
if kc != nil {
_, _, rcClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraReplicationControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for replication controller: %v", err)
}
_, _, rsClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraReplicaSetControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for replication controller: %v", err)
}
_, _, deploymentClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraDeploymentControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for deployment controller: %v", err)
}
jobConfig, _, jobClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraJobControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for job controller: %v", err)
}
_, hpaOClient, hpaKClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraHPAControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for HPA controller: %v", err)
}
_, _, binderClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraPersistentVolumeBinderControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for persistent volume binder controller: %v", err)
}
_, _, attachDetachControllerClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraPersistentVolumeAttachDetachControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for attach detach controller: %v", err)
}
_, _, daemonSetClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraDaemonSetControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for daemonset controller: %v", err)
}
_, _, disruptionClient, err := oc.GetOldServiceAccountClients(bootstrappolicy.InfraDisruptionControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for disruption budget controller: %v", err)
}
_, _, gcClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraGCControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for pod gc controller: %v", err)
}
_, _, serviceLoadBalancerClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraServiceLoadBalancerControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for pod gc controller: %v", err)
}
_, _, petSetClient, err := oc.GetOldServiceAccountClients(bootstrappolicy.InfraPetSetControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for pet set controller: %v", err)
}
namespaceControllerClientConfig, _, namespaceControllerKubeClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraNamespaceControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for namespace controller: %v", err)
}
namespaceControllerClientPool := dynamic.NewClientPool(namespaceControllerClientConfig, dynamic.LegacyAPIPathResolverFunc)
_, _, endpointControllerClient, err := oc.GetServiceAccountClients(bootstrappolicy.InfraEndpointControllerServiceAccountName)
if err != nil {
glog.Fatalf("Could not get client for endpoint controller: %v", err)
}
//.........這裏部分代碼省略.........