-
Notifications
You must be signed in to change notification settings - Fork 231
Add serviceClass
url param to jump into service-catalog flow
#2047
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
Add serviceClass
url param to jump into service-catalog flow
#2047
Conversation
@spadgett This is my first attempt at openshift/origin-web-catalog#423. |
8cd308f
to
62420aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @david-martin, thank you for the contribution.
I'm really hesitant to search display names because they're not unique and can change. Whereas the kubernetes name has to be unique and immutable. It would be easy for a broker to accidentally (or on purpose) change what service a link provisions by changing the display name of one its services.
var paramItem = _.find($scope.catalogItems, { | ||
name: paramClass | ||
}); | ||
// Lookup the class by display name e.g. "CakePHP + MySQL (Persistent)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you might have the order backwards here, checking display name first above and then metadata.name
here.
@spadgett Understood. I'm in agreement after thinking through it some more. I'll modify to search the kubernetes name only. |
62420aa
to
6b21f70
Compare
If a `serviceClass` param is present, look up the serviceClass and launch the service-catalog modal for that class.
6b21f70
to
2f75b67
Compare
@spadgett Anything else I can do here? Is it enough to satisfy the card? https://trello.com/c/w8LiRRSg/1050-url-params-to-jump-into-service-catalog-flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but will need to wait until Monday when master reopens for features
It should satisfy the card. |
[merge] |
Evaluated for origin web console merge up to 2f75b67 |
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin_web_console/206/) (Base Commit: 1b695d8) (PR Branch Commit: 2f75b67) |
https://trello.com/c/w8LiRRSg
If a
serviceClass
param is present, look up the serviceClass andlaunch the service-catalog modal for that class.
The param can be the service id e.g. 'cakephp-mysql-persistent'
or the service display name e.g. CakePHP + MySQL (Persistent)
Fixes openshift/origin-web-catalog#423
The reason for allowing the service id or the service display is to allow for 'not very deterministic' id's.
This is somewhat the case for service classes returned by the ansible-service-broker.
For example, an apb for keycloak would have an generated serviceclass name of
dh-myorg-keycloak-latest
,where
dh
is the image stream,myorg
is the org,keycloak
is the apb name andlatest
is the apb image tag. Having to know all 4 of these details seems a little contrived, rather than having a simple id.