kpt icon indicating copy to clipboard operation
kpt copied to clipboard

Feature request: Function that sets setter values

Open grmoon opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe.

Without being able to programmatically set setter values, tools that would like to integrate with kpt and set values for the user will either have to implement the functionality themselves or force the user to manually open the kptfile and set values.

Further, using a function catalog function provides some future-proofing in the event that the setter interface changes again. Instead of needing to re-implement any features manually, the set-setter image version could just be updated.

This was functionality in pre-kpt 1.0 that will no longer be available in 1.0+

Describe the solution you'd like

The commands listed below update the kptfile for the user, setting the value of each setter and preserving the rest of the kptfile as is (including comments)

$ kpt fn eval --image gcr.io/kpt-fn/set-setter:v0.1 -- 'name=image value=my-image' $ kpt fn eval --image gcr.io/kpt-fn/set-setter:v0.1 -- 'name=labels value=label1,label2,label3'

grmoon avatar May 25 '21 16:05 grmoon

@grmoon there is a way to apply setter with CLI right now, am I right to assume that you'd like a function that sets the apply-setter parameters in the kpt file?

mikebz avatar May 28 '21 19:05 mikebz

@grmoon let me know what your timelines are for this. If this is something we should queue up soon or can wait.

mikebz avatar Jun 10 '21 02:06 mikebz

@grmoon there is a way to apply setter with CLI right now, am I right to assume that you'd like a function that sets the apply-setter parameters in the kpt file?

apologies for missing this. this is correct. essentially just the ability to set the value of a setter either in a config map specified by the user or in the kptfile itself.

@grmoon let me know what your timelines are for this. If this is something we should queue up soon or can wait.

Not urgent. Our near-term plans don't involve updating setter values for the user

grmoon avatar Jun 10 '21 03:06 grmoon

See also #2284

bgrant0607 avatar Jul 07 '21 22:07 bgrant0607