Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up construction to make creating types more obvious #20777

Merged
merged 4 commits into from
Aug 29, 2018

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Aug 28, 2018

Builds on #20741

This collapses more start paths into a single chain.

/assign @sttts @mfojtik

@openshift-ci-robot openshift-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 28, 2018
@openshift-ci-robot
Copy link

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2018
@deads2k
Copy link
Contributor Author

deads2k commented Aug 28, 2018

/retest

1 similar comment
@deads2k
Copy link
Contributor Author

deads2k commented Aug 28, 2018

/retest

@bparees bparees removed their request for review August 28, 2018 17:24

var cloudConfig []byte
if kubeOptions.CloudProvider.CloudConfigFile != "" {
if cloudConfigFile != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: len(cloudConfigFile) == 0

@@ -147,31 +144,3 @@ func NewPluginInitializer(

return admission.PluginInitializers{genericInitializer, webhookInitializer, kubePluginInitializer, openshiftPluginInitializer}, nil
}

type DefaultInformerAccess struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where has this moved?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where has this moved?

unused.

@@ -22,6 +21,7 @@ import (
// install all APIs
_ "github.com/openshift/origin/pkg/api/install"
"github.com/openshift/origin/pkg/image/apiserver/registryhostname"
"k8s.io/apiserver/pkg/registry/generic"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

order

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also everywhere below.

@@ -42,13 +42,15 @@ func setup(t *testing.T) (etcd.KV, *etcdtesting.EtcdTestServer, *REST) {
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"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to avoid confusion, rename to imageRestOptions.

@@ -69,15 +69,17 @@ func setup(t *testing.T) (etcd.KV, *etcdtesting.EtcdTestServer, *REST) {
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"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imageStreamRestOptions

@@ -51,11 +50,6 @@ func RunOpenShiftAPIServer(masterConfig *configapi.MasterConfig) error {
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentional removal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentional removal?

yeah, logically the openshift apiserver has no public address

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lower-case error

kapiserveroptions "k8s.io/kubernetes/cmd/kube-apiserver/app/options"
)

func (c *MasterConfig) newOpenshiftAPIConfig(kubeAPIServerConfig apiserver.Config) (*openshiftapiserver.OpenshiftAPIConfig, error) {
var err error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move down where it is used

@sttts
Copy link
Contributor

sttts commented Aug 29, 2018

Some nits.

@deads2k deads2k force-pushed the server-22-scrub-start branch from f865066 to 3563995 Compare August 29, 2018 16:06
@deads2k
Copy link
Contributor Author

deads2k commented Aug 29, 2018

comments addressed

@deads2k deads2k added the lgtm Indicates that a PR is ready to be merged. label Aug 29, 2018
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 29, 2018
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@deads2k deads2k added the lgtm Indicates that a PR is ready to be merged. label Aug 29, 2018
@openshift-merge-robot openshift-merge-robot merged commit 9c9f668 into openshift:master Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants