-
Notifications
You must be signed in to change notification settings - Fork 1.5k
target manifest-templates #592
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
target manifest-templates #592
Conversation
9566368 to
61266f5
Compare
|
can we make the template assets store a template type field than the consumer taking the bytes and converting to template? |
You mean a wrapper function to Files? Do you also mean to persist the template object itself in the struct (unexported obviously)? |
No. |
Which just means the Files() function returns the File List extemporaneously using Raw instead. No problem. |
61266f5 to
8a3ea19
Compare
|
Can you rebase on top of #510? That is the direction we are going to go for assets. |
5880b20 to
74ed427
Compare
74ed427 to
5b69733
Compare
5b69733 to
b3d0df4
Compare
b3d0df4 to
7c2d2ec
Compare
|
@rajatchopra is this PR not bringing in changes from #510 ? |
That one looks at ignition config templates. This one at operator manifest templates. I took the idea and structure from 510. There isn't any code overlap really. |
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.
nits: "uri" -> "URI", "its" -> "it's".
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.
Done.
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.
All of your getFileContents calls currently include an explicit path.Join(dataDir, ...). Maybe just drop dataDir and push that Join down into getFileContents?
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.
Done.
will |
7c2d2ec to
9cac9a8
Compare
Yes. That was a mistake. Thanks. Fixed. It is data/data/manifests now. |
|
@abhinavdahiya @wking Ready for review again. |
|
@rajatchopra: some YAML lint issues now that the linter has teeth again ;). |
Yeah.. but also because most of the files are templates :(. I should rename them to .yaml.template, fun again. |
|
And you might need to follow my for things like: apiVersion: v1
kind: Secret
metadata:
name: etcd-client
namespace: kube-system
type: SecretTypeTLS
data:
tls.crt: {{ .EtcdClientCert }}
tls.key: {{ .EtcdClientKey }}The YAML linter doesn't like the |
9cac9a8 to
b6b7c7b
Compare
|
Still some YAML-lint issues after the |
|
It would be nice if these could live under |
1. Move files from manifests/content to templates directory 2. Create new asset called templates that the target manifest-templates can directly call 3. All template files are separate assets by themselves, and 'templates' asset depends on all leaf template assets 4. Manifest/tectonic assets now use templates as parent assets that they depend upon Other templates (e.g. ignition/machines) are not moved into assets in this commit. data/data/manifests: move all yaml content to its own files So that a yaml lint check can catch the inappropriate ones. No functional change at runtime.
b6b7c7b to
166a9f1
Compare
My local yamllinter is less strict. Either way, final push, hopefully.
Yeah, I can catch that quickly after this one. I am in a hurry to get this one in so that I do not have to do any of the ugly rebases if anything conflicting gets in first. Just because this is an xxl PR. |
|
/approve |
wking
left a comment
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, rajatchopra, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Also roll the tips-and-tricks docs into the overview's multi-invocation docs, since they'd been covering the same ground with slightly different wording before. I've expanded the unified description to go into a bit more detail and tie in the new versioning docs. I've also documented the manifest-templates target from 166a9f1 (pkg/asset: new target manifest-templates, 2018-10-30, openshift#592). And I've shifted a few "target directory" references to "asset directory", since that's the language we use for --dir (as shown by --help).
pkg/asset: new target manifest-templates
Other templates (e.g. ignition/machines) are not moved into assets in this commit.
Ref: CORS-849