本文整理汇总了Golang中github.com/openshift/origin/pkg/cmd/server/start.MasterOptions类的典型用法代码示例。如果您正苦于以下问题:Golang MasterOptions类的具体用法?Golang MasterOptions怎么用?Golang MasterOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MasterOptions类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: DefaultMasterOptions
func DefaultMasterOptions() (*configapi.MasterConfig, error) {
startOptions := start.MasterOptions{}
startOptions.MasterArgs, _, _, _, _ = setupStartOptions()
startOptions.Complete()
startOptions.MasterArgs.ConfigDir.Default(path.Join(GetBaseDir(), "openshift.local.config", "master"))
if err := CreateMasterCerts(startOptions.MasterArgs); err != nil {
return nil, err
}
if err := CreateBootstrapPolicy(startOptions.MasterArgs); err != nil {
return nil, err
}
return startOptions.MasterArgs.BuildSerializeableMasterConfig()
}
示例2: DefaultMasterOptions
func DefaultMasterOptions() (*configapi.MasterConfig, error) {
startOptions := start.MasterOptions{}
startOptions.MasterArgs, _, _, _, _ = setupStartOptions()
startOptions.Complete()
startOptions.MasterArgs.ConfigDir.Default(path.Join(util.GetBaseDir(), "openshift.local.config", "master"))
if err := CreateMasterCerts(startOptions.MasterArgs); err != nil {
return nil, err
}
if err := CreateBootstrapPolicy(startOptions.MasterArgs); err != nil {
return nil, err
}
masterConfig, err := startOptions.MasterArgs.BuildSerializeableMasterConfig()
if err != nil {
return nil, err
}
// force strict handling of service account secret references by default, so that all our examples and controllers will handle it.
masterConfig.ServiceAccountConfig.LimitSecretReferences = true
return masterConfig, nil
}