-
Notifications
You must be signed in to change notification settings - Fork 142
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
user-guide: Templates organization #2807
Conversation
0775af5
to
3b2a2d1
Compare
6a15731
to
b8e588b
Compare
|
||
```yaml | ||
apiVersion: capi.weave.works/v1alpha1 | ||
kind: CAPITemplate |
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.
Update any references to GitOpsTemplate
instead of CAPITemplate
so it is consistent across our docs. The apiVersion
will need to be updated as well.
9ec3fed
to
a149834
Compare
|
||
## Rendering Templates | ||
|
||
Declare the render type indicating the templating language to be used to render the template by using the `renderType` spec. |
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.
spec.renderType
can be set to either:
envsubst
(default): where${CLUSTER_NAME}
style syntax can be used.templating
: go-templating style syntax{{ .params.CLUSTER_NAME }}
. Where params are provided by the.params
variable. You can also use template functions.
I had started some notes on templating a while back https://gist.github.com/bigkevmcd/314559c2c6912f405a8052bec63c99d3 feel free to take anything (or nothing) from this. |
thanks @bigkevmcd , used some points from it! |
cccbf01
to
d015448
Compare
| `${var-default` | If `$var` is not set, evaluate expression as `$default` | ||
| `${var:-default` | If `$var` is not set or is empty, evaluate expression as `$default` | ||
| `${var=default` | If `$var` is not set, evaluate expression as `$default` | ||
| `${var:=default` | If `$var` is not set or is empty, evaluate expression as `$default` |
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.
From https://github.com/a8m/envsubst, I think these should still have the closing }
import TierLabel from "../_components/TierLabel"; | ||
|
||
# Using templates <TierLabel tiers="enterprise" /> | ||
|
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.
A little preamble here about what problems templates solve and a little example would be neat. @davidstauffer @JamWils do we have any material lying around we could include re: "why use 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.
Yes, we do! I will work on compiling the things we have from the initiative etc into a comprehensive why section. Should land before end of the week.
d015448
to
6d1cf96
Compare
0904a23
to
43634c7
Compare
51244c4
to
ee2487c
Compare
Add rendering templates section in templates docs
Add default profile values in templates docs
Co-authored-by: Simon <footless@gmail.com>
Co-authored-by: Simon <footless@gmail.com>
ee2487c
to
1c7842b
Compare
Closes weaveworks/weave-gitops-enterprise#1687
Documentation Changes
Update
Using templates
docs with new sections: