Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

take out osb prefixes through rote transformation of variable names and annotations #843

Merged
merged 1 commit into from
May 15, 2017

Conversation

MHBauer
Copy link
Contributor

@MHBauer MHBauer commented May 12, 2017

check v1alpha1/types.go for the names and annotation changes

want to make sure the this gets tested in ci stuff

pkg/apis/servicecatalog/v1alpha1/types.go is what you should look at. everythign else is based on that or generated code. specifically confirm the annotations changes.

Closes #834

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 12, 2017
@MHBauer
Copy link
Contributor Author

MHBauer commented May 12, 2017

anybody know where MaxDBPerNode comes from? It's not in the OSBAPI spec...

@pmorie
Copy link
Contributor

pmorie commented May 12, 2017

@MHBauer I believe MaxDBPerNode was one of the conventional fields in metadata that used to be documented in the spec, but has since moved to the CF metadata conventions document. So, we should remove it in a follow-up.

@duglin
Copy link
Contributor

duglin commented May 12, 2017

wanna remove MaxDBsPerNode as part of this?

@pmorie
Copy link
Contributor

pmorie commented May 12, 2017

wanna remove MaxDBsPerNode as part of this?

I'd really prefer to just make this one transformations. If we start accreting other changes into this, it'll be much harder to review.

@MHBauer
Copy link
Contributor Author

MHBauer commented May 12, 2017

I think this is done for now.

// Description is a short description of the service.
Description string `json:"description"`

// Metadata fields
OSBMetadata *runtime.RawExtension `json:"osbMetadata, omitempty"`
Metadata *runtime.RawExtension `json:"externalMetadata, omitempty"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ServiceClass already has a metadata field from the kubernetes ObjectMeta. I pseudocopied the ExternalID idea and added an External prefix. This was after I had renamed the field itself to Metadata.

Copy link
Contributor

Choose a reason for hiding this comment

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

@MHBauer unfortunately, I think we should probably call the field ExternalMetadata because ServiceClass embeds the ObjectMeta type, which as you know has the Metadata field. So, when programming to the API, the Metadata field is going to be ambiguous versus the ObjectMeta field with the same name.

So, I think we should call the ServiceClass and ServicePlan fields ExternalMetadata

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 plus I'm not keen on the json name and golang name being so different.

@pmorie pmorie mentioned this pull request May 12, 2017
Copy link
Contributor

@pmorie pmorie left a comment

Choose a reason for hiding this comment

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

One little nit WRT Metadata vs. ExternalMetadata.

// Description is a short description of the service.
Description string `json:"description"`

// Metadata fields
OSBMetadata *runtime.RawExtension `json:"osbMetadata, omitempty"`
Metadata *runtime.RawExtension `json:"externalMetadata, omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

@MHBauer unfortunately, I think we should probably call the field ExternalMetadata because ServiceClass embeds the ObjectMeta type, which as you know has the Metadata field. So, when programming to the API, the Metadata field is going to be ambiguous versus the ObjectMeta field with the same name.

So, I think we should call the ServiceClass and ServicePlan fields ExternalMetadata

@@ -153,10 +153,10 @@ type ServicePlan struct {
ExternalID string

// OSB-specific
OSBFree bool
Free bool
Copy link
Contributor

Choose a reason for hiding this comment

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

What do people think about calling this IsFree ?

@pmorie pmorie added the api label May 13, 2017
@vaikas
Copy link
Contributor

vaikas commented May 15, 2017

Has this been superceded by @pmorie PR: #846

@pmorie
Copy link
Contributor

pmorie commented May 15, 2017

@vaikas-google nope, that one just removes a couple of fields, looks like morgan will have to rebase onto it

@pmorie pmorie mentioned this pull request May 15, 2017
@pmorie pmorie added this to the 0.0.7 milestone May 15, 2017
@pmorie
Copy link
Contributor

pmorie commented May 15, 2017

@MHBauer LGTM modulo ExternalMetadata

check v1alpha1/types.go for the names and annotation changes
@MHBauer
Copy link
Contributor Author

MHBauer commented May 15, 2017

Rebased. Should build and stuff. Codegen struggles.

@pmorie pmorie added the LGTM1 label May 15, 2017
@duglin
Copy link
Contributor

duglin commented May 15, 2017

LGTM if CI is happy but I still prefer IsFree to just Free

@duglin duglin added the LGTM2 label May 15, 2017
@pmorie
Copy link
Contributor

pmorie commented May 15, 2017

prefer IsFree to just Free

We have an unwritten convention not to use 'Is' as a prefix for boolean fields, which I opened a PR to document: kubernetes/community#624

@arschles arschles added the LGTM3 label May 15, 2017
Copy link
Contributor

@arschles arschles left a comment

Choose a reason for hiding this comment

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

LGTM3

@arschles arschles merged commit e456417 into kubernetes-retired:master May 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. LGTM1 LGTM2 LGTM3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants