-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
More in examples/transformerconfigs/images#adding-a-custom-resource for path that are both ScalarNode and SequenceNode #5018
Comments
Hi @kamok, the current documented behavior in the The # kustomization.yaml
resources:
- task.yaml
configurations:
- images.yaml
images:
- name: image-name-duplicated-everywhere
newName: changed # task.yaml
apiVersion: custom/v1
kind: Task
metadata:
name: my-task
spec:
params:
- name: image-name
image: image-name-duplicated-everywhere
- name: nginxapp
image: nginx:1.7.9 # images.yaml
images:
- kind: Task
path: spec/params/image If your issue was that you weren't aware of this behavior because the Otherwise, the problem with your current setup is that kustomize does not expect a single field to have multiple types. Specifically, the /triage needs-information |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Eschewed features
What would you like to have added?
I would like more examples on how to configure the image transformer to accomdate detailed fields besides ScalarNodes.
From my testing, more advanced path traversals like
spec/params[name=foobar]/default
is not supported. This makes theimage
transformer only strictly useful forSclarNode
, as it isn't possible to path to a specific field if it is an Array / SequenceNodehttps://github.com/kubernetes-sigs/kustomize/tree/master/examples/transformerconfigs/images#adding-a-custom-resource
It would be nice if the transformer just ignores values that are Sequence, and only worry about Scalar.
Why is this needed?
Here's an example use case:
In my
configuration
, I point towhich errors out
: visit traversal on path: [default]: wrong Node Kind for default expected: ScalarNode was SequenceNode: value: {[]}
, as expected.This doesn't work, fails silently
This doesn't work either, fails silently
Can you accomplish the motivating task without this feature, and if so, how?
No
What other solutions have you considered?
I've tried other syntax like the new
*
, and spent a long time in the Issues for answersAnything else we should know?
I read here #3945
that you're deprecating
configurations
, is it even worth spending time trying to get this to work?Feature ownership
The text was updated successfully, but these errors were encountered: