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

Move "External" around in some resource names/properties#1354

Merged
pmorie merged 2 commits into
kubernetes-retired:masterfrom
duglin:removeExternal
Oct 20, 2017
Merged

Move "External" around in some resource names/properties#1354
pmorie merged 2 commits into
kubernetes-retired:masterfrom
duglin:removeExternal

Conversation

@duglin
Copy link
Copy Markdown
Contributor

@duglin duglin commented Oct 10, 2017

Per https://github.com/kubernetes-incubator/service-catalog/pull/1350/files#r143453045 I see no value to the end-user to have the word "External" there. They shouldn't know, or care, if the service is external or not, and in fact it may not be.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 10, 2017
@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Oct 10, 2017

I'm fine with this change, I think External prefix is wordy. The original reasoning for this was to make sure there's no confusion between k8s names and SC names. @pmorie recall the details?

spec:
externalClusterServiceClassName: test-serviceclass
externalClusterServicePlanName: example-plan-1
clusterServiceClassName: test-serviceclass
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wonder if there's way to find a way to get rid of the cluster* prefix. At first I thought, great because it's in the cluster service instance, but it's not. if there was a way to get the context 'for free' as being cluster or namespaced, would be nice to not have to specify it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I suspect we may allow for the same name to be used at both scopes, which mean we'll need a way for the user to tell us which one they mean.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, I think we need to keep cluster prefix for the forward compatibility with namespace-scoped counterparts in future.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@nilebox is correct; let's not do this precise rename

Copy link
Copy Markdown
Contributor

@nilebox nilebox left a comment

Choose a reason for hiding this comment

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

Just one nit


const externalClusterServiceClassName = "test-serviceclass"
const externalClusterServicePlanName = "test-plan"
const ClusterServiceClassName = "test-serviceclass"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should be kept private probably (camel-case)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

@nilebox nilebox added the LGTM1 label Oct 10, 2017
@vaikas vaikas added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 10, 2017
@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Oct 10, 2017

How is this going to look with
#1285
in play?

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 10, 2017

what if we used some other prefix because "External"? Something that might actually mean something to the end-user? Like "ClusterServiceClassCliName"?

Either way, it seems to me that the prefix should go next to "Name" not before the entire string.

Thoughts?

@nilebox
Copy link
Copy Markdown
Contributor

nilebox commented Oct 10, 2017

it seems to me that the prefix should go next to "Name" not before the entire string.

I totally agree with that. My point though is that it should be the same as the field name in the resource we are referring to.

Is it called ExternalName in ClusterServiceClass? Then the reference field should be called clusterServiceClassExternalName, period.

Referring to OSB or CLI or whatever you want user to be aware of is confusing to me.

@nilebox
Copy link
Copy Markdown
Contributor

nilebox commented Oct 10, 2017

@duglin if you are unhappy with External prefix, you should rename it in the ClusterServiceClass first to be consistent.

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 10, 2017

@nilebox agreed on both points. So what do people think about calling the property CliName instead of ExternalName?

@nilebox
Copy link
Copy Markdown
Contributor

nilebox commented Oct 10, 2017

@duglin where do you get reference to "Cli" from? CLI is a client-side tool which has nothing to do with svc-cat API server. Our project, Smith, for example, talks directly to the Service Catalog server, and having to deal with CliName would be very confusing.

If anything, I can live with osbName or brokerName as a less ambiguous term than externalName.

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 10, 2017

I picked "cli" because I was thinking that it was what we would have users (cli-folks) to use. But, I'm ok with just about anything that's might make more sense to the end user than "External", which is meaningless to me and feels more like we're exposing the inner-workings to people, which they shouldn't care about. "osb" might be ok but I'd prefer for people not to even know that OSB is at play here. I mean technically "HumanReadable" :-) is good but of course it also sucks because its too long.

Today: ClusterServiceClassSpec.ExternalName
Maybe:
 ClusterServiceClassSpec.NiceName
 ClusterServiceClassSpec.ShortName
 ClusterServiceClassSpec.HumanName
 ClusterServiceClassSpec.DisplayName

Short or Display perhaps?

@nilebox
Copy link
Copy Markdown
Contributor

nilebox commented Oct 11, 2017

@duglin displayName is kinda fine but also as vague as externalName, so I don't see any improvement there... The rest suggest that OSB name is always shorter and nicer, which is not necessarily true, as it is an arbitrary string that can be UUID or something else.

Until we come up with consensus on a better name, can you make change with ClusterServiceClassSpecExternalName for now?

@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Oct 11, 2017

I'm not a fan of making a long name longer and reordering it 'until we come up with consensus' approach given the churn it will produce.

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 11, 2017

The OSB spec defines service.name as: A CLI-friendly name of the service. MUST only contain lowercase characters, numbers and hyphens (no spaces). Same text for plan.name.

So I still kind of like: ClusterServiceClassSpec.CliName

If/when we get around to having a nice UX kubectl plugin then this is the name they will specify - so consistency between the cli and yaml would be good.

@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Oct 13, 2017

I'm fine with CLI in the name. I think it's consistent with OSB spec.

@nilebox
Copy link
Copy Markdown
Contributor

nilebox commented Oct 13, 2017

A CLI-friendly name of the service

Dunno, to me it sounds like CFism. OSB spec doesn't (and shouldn't) have any requirements for marketplace to provide a CLI interface at all, so I am not even sure which CLI does it refer to. I get the "human-readable name" goal, just don't think it has anything to do with CLI. What if marketplace has a user-friendly UI (which needs human-readable names too), but doesn't provide a CLI interface? Does it make marketplace non-OSB-compliant? I don't think so.

@nilebox
Copy link
Copy Markdown
Contributor

nilebox commented Oct 13, 2017

Key maybe (ClusterServiceClassKey)? For me this word is intuitively interpreted as:

  • index key, foreign key (which it essentially is)
  • no confusion with Kubernetes' Name field
  • short and concise

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 13, 2017

I'm thinking of "cli" as "client" and less like "Command Line Interface", and with that view a nice UI fits too.

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 14, 2017
@nilebox
Copy link
Copy Markdown
Contributor

nilebox commented Oct 14, 2017

I'm thinking of "cli" as "client"

call it ClientName then?

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 14, 2017

ok, made it "ClientName" even though I have a slight preference for "CliName" because its shorter. What do people think?

@nilebox
Copy link
Copy Markdown
Contributor

nilebox commented Oct 14, 2017

LGTM.

ExternalClusterServiceClassName: externalClusterServiceClassName,
ClusterServicePlanName: externalClusterServicePlanName,
ClusterServiceClassClientName: clusterServiceClassClientName,
ClusterServicePlanName: clusterServicePlanClientName,
Copy link
Copy Markdown
Contributor

@nilebox nilebox Oct 15, 2017

Choose a reason for hiding this comment

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

shouldn't this plan name field in the PlanReference type have "ClientName" in its name as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think ClusterServicePlanName refers to the k8s name. In that resource we now have both, ClusterServicePlanClientName and ClusterServicePlanName. I'm pretty sure it wouldn't be very kube-ish but making it ClusterServicePlanK8sName would clarify it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeah I got confused.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

adding extra levels with grouping k8s- and client- names together would help, but I know you don't like extra nesting in YAML/JSON :)

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 18, 2017

On today's call we voted to use "ExternalName"

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 18, 2017
@duglin duglin changed the title Remove "External" from some resource names Move "External" around in some resource names/properties Oct 18, 2017
@nilebox nilebox removed the LGTM1 label Oct 19, 2017
@nilebox
Copy link
Copy Markdown
Contributor

nilebox commented Oct 19, 2017

revoking LGTM until renamed to "ExternalName".

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 19, 2017

ready for review - removing all LGTMs since it changed a lot since last time.

@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Oct 19, 2017

Don't we need to update the *yaml files to these new values also?

Signed-off-by: Doug Davis <dug@us.ibm.com>
@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 19, 2017

@vaikas-google I did just notice a few places I missed but none were in yaml files - which ones are you thinking of?

Signed-off-by: Doug Davis <dug@us.ibm.com>
@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Oct 19, 2017

vaikas@vaikas-linux3:~/projects/go/src/github.com/kubernetes-incubator/service-catalog$ find contrib/ -type f -name '*yaml' -exec grep --with-filename externalClusterService {} ;
contrib/examples/walkthrough/ups-instance.yaml: externalClusterServiceClassName: user-provided-service
contrib/examples/walkthrough/ups-instance.yaml: externalClusterServicePlanName: default
contrib/examples/walkthrough/ups-instance-default-sp.yaml: externalClusterServiceClassName: user-provided-service
contrib/examples/apiserver/instance.yaml: externalClusterServiceClassName: test-serviceclass
contrib/examples/apiserver/instance.yaml: externalClusterServicePlanName: example-plan-1

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 19, 2017

those are part of the PR

@vaikas
Copy link
Copy Markdown
Contributor

vaikas commented Oct 19, 2017

Oh, I'm sorry I missed them somehow :( Sorry for the noise.

@vaikas vaikas added LGTM1 and removed do-not-merge needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 19, 2017
Copy link
Copy Markdown
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 nit which I will fix in a follow-up as I believe @duglin is traveling today.

if old.Spec.ExternalClusterServicePlanName != new.Spec.ExternalClusterServicePlanName && new.Spec.ClusterServicePlanRef != nil {
errors = append(errors, field.Forbidden(field.NewPath("spec").Child("clusterServicePlanRef"), "clusterServicePlanRef must not be present when externalServicePlanName is being changed"))
if old.Spec.ClusterServicePlanExternalName != new.Spec.ClusterServicePlanExternalName && new.Spec.ClusterServicePlanRef != nil {
errors = append(errors, field.Forbidden(field.NewPath("spec").Child("clusterServicePlanRef"), "clusterServicePlanRef must not be present when servicePlanExternalName is being changed"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: servicePlanExternalName should be clusterServicePlanExternalName

I'm fine doing this in a follow-up

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See: #1456

@pmorie pmorie added the LGTM2 label Oct 20, 2017
@pmorie pmorie merged commit dff470f into kubernetes-retired:master Oct 20, 2017
duglin pushed a commit to duglin/service-catalog that referenced this pull request Oct 22, 2017
See: kubernetes-retired#1354 (review)

Signed-off-by: Doug Davis <dug@us.ibm.com>
@duglin duglin mentioned this pull request Oct 22, 2017
nilebox pushed a commit that referenced this pull request Oct 22, 2017
See: #1354 (review)

Signed-off-by: Doug Davis <dug@us.ibm.com>
@duglin duglin deleted the removeExternal branch August 2, 2018 20:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. LGTM1 LGTM2 size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants