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

Adding Create From URL documentation #3353

Merged
merged 1 commit into from
Mar 9, 2017
Merged

Conversation

rhamilto
Copy link
Member

@rhamilto rhamilto commented Dec 9, 2016

  • Adding "Configuring the Create From URL Namespace Whitelist" to web_console_customization and fixing heading semantics on that page (several headings were improperly declared
    as h3s or h4s when they should have been h2s or h3s).
  • Adding "Create from URL" page to the developer guide describing the "API" for create from URL.

@rhamilto rhamilto changed the title [WIP]: Adding "Configuring the Create From URL Namespace Whitelist" [WIP]: Adding Create From URL documentation Dec 9, 2016
@jwforres
Copy link
Member

jwforres commented Dec 9, 2016

@sspeiche @luciddreamz any thoughts on where in the docs we should put the information for the API for "Run on OpenShift" it doesn't really go in the console customization docs because that is for cluster administrators.

@luciddreamz
Copy link

Put it in the developers section as it's own page.

@rhamilto
Copy link
Member Author

rhamilto commented Dec 12, 2016

ALL: Thoughts on this [initial draft of the new Create from URL page]

screen shot 2017-01-04 at 1.57.46 PM

screen shot 2017-01-04 at 2 11 37 pm

@rhamilto
Copy link
Member Author

@sspeiche, @luciddreamz: what do we want to call this feature? The card describes it as "Run on OpenShift", but I've been referring to it as "Create from URL" as that arguably better describes the functionality. I completely defer to y'all.

@luciddreamz
Copy link

Create from URL sounds like a better description - that or Deploy on OpenShift Button.

@rhamilto rhamilto force-pushed the run-on branch 2 times, most recently from 29b2ebe to df449b6 Compare December 14, 2016 14:58
@sspeiche
Copy link

I like what you have, I'd suggest a few updates:

  • not sure users would know what you mean by a preordained namespace
  • do we need to talk about parameter encoding?
  • an example or two would be helpful, using something like the ever helpful numbered items pointing to it which each part does
  • any value in showing screenshot or two?

@rhamilto
Copy link
Member Author

not sure users would know what you mean by a preordained namespace

good point. i've eliminated "from a preordained namespace" since the next paragraph explains about namespace whitelisting.

do we need to talk about parameter encoding?

i don't think so. @jwforres or @spadgett?

an example or two would be helpful, using something like the ever helpful numbered items pointing to it which each part does

i'm guessing you didn't notice the examples since they weren't in the original screenshot? i've corrected that by adding a second screenshot with the rest of the page.

any value in showing screenshot or two?

it might be confusing since the page displays the title and description of the image stream or template being used?

@rhamilto
Copy link
Member Author

rhamilto commented Jan 4, 2017

^ bump @jwforres, @spadgett

|Name|Description|Required|Schema|Default
|template|The value of metadata.name as defined in the template to be used.|
true|string|
|templateParamsMap|A JSON parameters map containing the name key value and
Copy link
Member

Choose a reason for hiding this comment

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

this description is really confusing, particularly 'value key value'. Also an example is probably helpful here.

Copy link
Member

Choose a reason for hiding this comment

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

nevermind on the example part, i see it below. This description could still be improved though

Copy link
Member Author

Choose a reason for hiding this comment

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

I struggled with this description and agree it's confusing. Ideas on how to more clearly state?

@spadgett
Copy link
Member

spadgett commented Jan 4, 2017

@rhamilto I would mention that the parameter values need to be correctly encoded. If you're passing things like URLs, it's likely they'll have special characters (like their own query parameters) that need to be URL escaped.

true|string|
|imageTag|The value spec.tags.name as defined in the image stream to be used.|
true|string|
|namespace|The name of the namespace containing the image stream and image tag
Copy link
Member

Choose a reason for hiding this comment

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

seems redundant to say that it defaults to openshift when you have a whole column dedicated to the Default values

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair point. Will remove the two instances.

@rhamilto
Copy link
Member Author

rhamilto commented Jan 4, 2017

@rhamilto I would mention that the parameter values need to be correctly encoded. If you're passing things like URLs, it's likely they'll have special characters (like their own query parameters) that need to be URL escaped.

Based on my own testing and this comment, I don't think we need to do any encoding given these URLs will be included in HTML.

@spadgett
Copy link
Member

spadgett commented Jan 4, 2017

@rhamilto I'm not sure I follow what the comment is saying, but for some values, it's not possible for the browser to automatically encode them for you. For instance, a source URL that contains query parameters like

http://example.com/code?branch=master&name=myname

Using that as the sourceURI in your example without escaping will pass two different name parameters. The trailing &name=myname will be treated as a different query parameter, not part of sourceURI. (The ? might also be a problem.)

This could a problem with JSON template parameter values that could have characters like & in them. The parameters MUST be encoded if they contain certain characters.

@spadgett
Copy link
Member

spadgett commented Jan 4, 2017

Another example: Source URLs with a # like

http://example.com/code#master

will cause anything from the # in the URL to be ignored. The value needs to be encoded.

@rhamilto
Copy link
Member Author

rhamilto commented Jan 4, 2017

Ah. Thanks for clarifying, @spadgett! I completely overlooked the parenthesis in your initial comment. Apologies.

@rhamilto rhamilto force-pushed the run-on branch 3 times, most recently from 528ba3c to dcd5424 Compare January 4, 2017 19:11
@rhamilto
Copy link
Member Author

rhamilto commented Jan 4, 2017

@jwforres, @spadgett Comments addressed. PTAL.

@rhamilto
Copy link
Member Author

rhamilto commented Jan 5, 2017

@ahardin-rh, please put this on your radar for 3.5. This PR is probably ok as is, but could probably benefit from a writer's touch.

@ahardin-rh
Copy link
Contributor

[rev_history]
|xref:../dev_guide/create_from_url.adoc#dev-guide-create-from-url[Create from URL]
|New topic on Create from URL, a function that allows you to construct a URL from an image stream, image tag, or template.
%

@vikram-redhat vikram-redhat modified the milestones: Future Release, Staging, OCP 3.5 GA Apr 12, 2017
@vikram-redhat vikram-redhat modified the milestones: OCP 3.5 GA, Staging May 2, 2017
@vikram-redhat vikram-redhat modified the milestones: OCP 3.5 GA, Staging, TEMP Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants