-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add example for transformer configurations: crd #498
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
Conversation
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.
looks good to me.
examples/README.md
Outdated
@@ -42,3 +42,6 @@ go get sigs.k8s.io/kustomize | |||
* [remote target](remoteBuild.md) - Building a kustomization from a github URL | |||
|
|||
* [json patch](jsonpatch.md) - Apply a json patch in a kustomization | |||
|
|||
* [transformer configs](transfomerconfigs/README.md) - Customize transformer configurations |
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.
typo on in the name of dir transfomerconfigs
--> transformerconfigs
(r missing)
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.
Oops, just fixed it.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Liujingfang1 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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
|
||
commonLabels: | ||
- path: spec/selectors | ||
create: true |
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.
Hmm. It is called create
in yaml.
I guess you probably have document explaining what this field means.
Otherwise, it may be confusing for the user.
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.
I'll add this explanation in examples/transformerconfigs/README.md
Added the fieldspec explanation and examples for different transformer configs. PTAL |
``` | ||
|
||
## name reference transformer | ||
Name reference transformer's configuration is different from all other tansformers. It contains a list of namebackreferences with following format. |
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.
nit: s/tansformers/transformers
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.
I don't understand what does namebackreferences
means :/
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 replaced the previous namereference pathconfig.
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.
I added more explanation of namebackreference
. See if it makes sense.
path: spec/template/spec/volumes/configMap/name | ||
(etc.) | ||
``` | ||
Name reference transformer configuration contains a list of such namebackreferences for ConfigMap, Secret, Service, Role, ServiceAccount and so on. |
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.
Same here.
## name reference transformer | ||
Name reference transformer's configuration is different from all other tansformers. It contains a list of namebackreferences with following format. | ||
``` | ||
kind: ConfigMap |
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.
I guess we can remove those unnecessary whitespaces.
``` | ||
cat > ~/.kustomize/config/mykind.yaml << EOF | ||
|
||
commonLabels: |
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.
this commonLabels
transformer config is not demonstrated in the example below. I guess you need to add a commonLabels
config in the example kustomization.yaml? Not sure if this is intentional or not but I was expecting to see something happen to the output based on this transformer when I was running through the tutorial.
(same with the varReference transformer config below).
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.
good point. Let me add those fields in the demo.
951a1f8
to
70be125
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.
/lgtm
No description provided.