-
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
Replacements: better support for targeting --key=value
container args
#4080
Comments
@marshall007: This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The 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. |
I think it's worth noting that the semantics of |
What if we provided away to specifically target elements in string arrays? For example, something like I'm not particularly fond of using curly braces for the syntax but I am struggling to think of something better ATM and just want to get some feedback on the idea to see if that would sufficiently resolve the issues you're running into. |
@natasha41575 I went back and forth on that same idea when I was writing up the proposal. I think the main issue with that approach is that you still need a way to construct a prefixed target value. My understanding of your example would be that it would result in the entire string You could potentially address that by also adding some sort of regular expression or other pattern-based syntax to the target My thinking was that the |
@marshall007 For this, you could use the options:
|
@natasha41575 yea the only downside there is that you can't replace multi-part values. Typical examples of that include There are some particularly problematic examples of this sort of thing in the Even with my proposal we can't handle the The |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Hey there :) |
@DaAlbrecht this one might be a bit controversial to start with, I would suggest #4292 to start with |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
Can i work on this? |
Is your feature request related to a problem? Please describe.
A huge value-add to using
replacements
over traditional JSON patches is the ability to use[key=value]
selectors in field paths. This makes your patches much more robust since the alternative relies on array field ordering. Unfortunately, this is still true when the field path value is a simple string array... most notably in the case of containerargs
.Describe the solution you'd like
In situations like the following, it would be ideal if we could reliably replace the value of
--leader-election-namespace
:I'm not sure how we would represent this in the
replacements
API, but it could look something like:The new rules would be:
index
anddelimiter
options can only be specified on scalar values and lists consisting only of string valuesprefix
and/orsuffix
options are specified,prefix
andsuffix
prefix
and/orsuffix
is preserved in the resulting valuedelimiter
, only the unprefixed/suffixed portion of the string is splitThe text was updated successfully, but these errors were encountered: