-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Replacements should support an inline value as a source #5516
Comments
I think it's an interesting feature and that helps write their configuration without temporary configMap. /triage accepted |
@koba1t: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed 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. |
Hi there! Currently working on it and got a working solution for the given example. Anyway, I have some doubts:
In my head makes more sense to add an extra key to the replacement object: replacements:
- value: bar
targets:
- select:
name: hello
kind: Job
fieldPaths:
- spec.template.spec.containers.[name=hello].env.[name=foo].value /assign |
I'm so sorry for the delayed response.
I believe that only one scalar value is accepted from the source due to current replacement transformers, and I believe we need to keep that.
I think it is better to define the new value than select the source scalar value, and we do not accept selecting both fields. /cc @varshaprasad96
Currently, replacements docs are here is another one. |
Hi, jsonpatch does not support paths like could we imagine a special I mean replacements:
- sourceValue: bar
targets:
- select:
name: hello
kind: Job
fieldPaths:
- spec.template.spec.containers.[name=hello].env.[name=foo].value would set the value of the replacements:
- sourceValue: null
targets:
- select:
name: hello
kind: Job
fieldPaths:
- spec.template.spec.containers.[name=hello].env.[name=foo] would remove the |
Introduces a new key on replacement `sourceValue` for replacing from a static value instead of sourcing from another object. Solves kubernetes-sigs#5516
Introduces `sourceValue` on replacement object for replacing from a static value instead of sourcing from another object. Solves kubernetes-sigs#5516
Hey @koba1t, |
I think that it is better to get a review from another maintainer... |
Hi @varshaprasad96 |
Introduces `sourceValue` on replacement object for replacing from a static value instead of sourcing from another object. Solves kubernetes-sigs#5516
Introduces `sourceValue` on replacement object for replacing from a static value instead of sourcing from another object. Solves kubernetes-sigs#5516
Eschewed features
What would you like to have added?
As suggested in other issues, like here, it would be very nice to be able to specify a value directly, inline.
The target value is not always a field of another object. It can simply be a value that the user knows/wants.
Why is this needed?
There is the workaround of declaring a new object like a configmap and annotating it with
config.kubernetes.io/local-config: "true"
but this adds extra complexity and bloat to the definition of the desired state IMOA simple replacement should look something like
without any kind of place holder object to define
Can you accomplish the motivating task without this feature, and if so, how?
yes, with a "fake" object as mentioned, but it's not an elegant solution at all
What other solutions have you considered?
json patches, but they don't support defining list items by their name (
"/spec/template/spec/containers/[name=hello]/env/[name=foo].value"
is NOT possible) as mentioned in other issues like #4950Anything else we should know?
No response
Feature ownership
The text was updated successfully, but these errors were encountered: