-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 a field to templates to allow them to deliver a user message w… #9708
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,23 @@ type Template struct { | |
// Standard object's metadata. | ||
kapi.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
// Objects is an array of objects to include in this template. Required. | ||
// message is an optional instructional message that will | ||
// be displayed when this template is instantiated. | ||
// This field should inform the user how to utilize the newly created resources. | ||
// Parameter substitution will be performed on the message before being | ||
// displayed so that generated credentials and other parameters can be | ||
// included in the output. | ||
Message string `json:"message,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to start this godoc w/ "message" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bparees It appears to in my view of the commit. There are several inline comments that split the full godoc in half in the github diff view. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whoops, you're right, it was just such a natural start to the comment I didn't think to scroll up, my bad. |
||
|
||
// objects is an array of resources to include in this template. | ||
Objects []runtime.RawExtension `json:"objects"` | ||
|
||
// Optional: Parameters is an array of Parameters used during the | ||
// parameters is an optional array of Parameters used during the | ||
// Template to Config transformation. | ||
Parameters []Parameter `json:"parameters,omitempty"` | ||
|
||
// Labels is a set of labels that are applied to every | ||
// object during the Template to Config transformation. Optional | ||
// labels is a optional set of labels that are applied to every | ||
// object during the Template to Config transformation. | ||
Labels map[string]string `json:"labels,omitempty"` | ||
} | ||
|
||
|
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.
What do you mean by instantiated? You can't output this message in the
oc process template | oc create -f
flow, right? We're adding a template API field for the thenew-app
only flow? @jwforres would need to special case this in the webconsole too.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.
@deads2k yes this is being added to the webconsole, @jwforres is aware of it. in fact it's the primary use case for adding this.
would you be happier with "optional message that may be displayed depending which client you use and whether it bothers to support this field"?
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.
Yeah, along with, "in our default client, we ignore this in the default processing/creation workflow".
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.
our default client is new-app and it's not going to ignore it.
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.
As opposed the
oc process
command we built specifically to instantiate templates?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.
correct. oc process got deprecated when @smarterclayton decided to add template processing to new-app.
oc process is for advanced users who want to pipe to oc apply or something else.
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.