clean up construction to make creating types more obvious#20777
clean up construction to make creating types more obvious#20777openshift-merge-robot merged 4 commits intoopenshift:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
1 similar comment
|
/retest |
|
|
||
| var cloudConfig []byte | ||
| if kubeOptions.CloudProvider.CloudConfigFile != "" { | ||
| if cloudConfigFile != "" { |
There was a problem hiding this comment.
nit: len(cloudConfigFile) == 0
| return admission.PluginInitializers{genericInitializer, webhookInitializer, kubePluginInitializer, openshiftPluginInitializer}, nil | ||
| } | ||
|
|
||
| type DefaultInformerAccess struct { |
There was a problem hiding this comment.
where has this moved?
unused.
| // install all APIs | ||
| _ "github.com/openshift/origin/pkg/api/install" | ||
| "github.com/openshift/origin/pkg/image/apiserver/registryhostname" | ||
| "k8s.io/apiserver/pkg/registry/generic" |
| server, etcdStorage := etcdtesting.NewUnsecuredEtcd3TestClientServer(t) | ||
| etcdStorage.Codec = legacyscheme.Codecs.LegacyCodec(schema.GroupVersion{Group: "image.openshift.io", Version: "v1"}) | ||
| etcdClient := etcd.NewKV(server.V3Client) | ||
| restOptions := generic.RESTOptions{StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1, ResourcePrefix: "images"} |
There was a problem hiding this comment.
to avoid confusion, rename to imageRestOptions.
| server, etcdStorage := etcdtesting.NewUnsecuredEtcd3TestClientServer(t) | ||
| etcdStorage.Codec = legacyscheme.Codecs.LegacyCodec(schema.GroupVersion{Group: "image.openshift.io", Version: "v1"}) | ||
| etcdClient := etcd.NewKV(server.V3Client) | ||
| restOptions := generic.RESTOptions{StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1, ResourcePrefix: "imagestreams"} |
| preparedOpenshiftAPIServer := openshiftAPIServer.GenericAPIServer.PrepareRun() | ||
|
|
||
| glog.Infof("Starting master on %s (%s)", masterConfig.ServingInfo.BindAddress, version.Get().String()) | ||
| glog.Infof("Public master address is %s", masterConfig.MasterPublicURL) |
There was a problem hiding this comment.
intentional removal?
yeah, logically the openshift apiserver has no public address
| cloudConfig, err = ioutil.ReadFile(cloudConfigFile) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("Error reading from cloud configuration file %s: %v", kubeOptions.CloudProvider.CloudConfigFile, err) | ||
| return nil, fmt.Errorf("Error reading from cloud configuration file %s: %v", cloudConfigFile, err) |
pkg/cmd/server/origin/master.go
Outdated
| ) | ||
|
|
||
| func (c *MasterConfig) newOpenshiftAPIConfig(kubeAPIServerConfig apiserver.Config) (*openshiftapiserver.OpenshiftAPIConfig, error) { | ||
| var err error |
|
Some nits. |
f865066 to
3563995
Compare
|
comments addressed |
|
New changes are detected. LGTM label has been removed. |
Builds on #20741
This collapses more start paths into a single chain.
/assign @sttts @mfojtik