-
Notifications
You must be signed in to change notification settings - Fork 230
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
Improve setters API: SetterDefinition and SetterValues #985
Comments
@pwittrock Here is the proposal for declarative setters UX. Please go through this and feel free to comment. |
Hi, has there been any progress in this area recently? |
We are actively working on Search and Replace functionality which is a prerequisite for this feature #961 . We plan to deliver this feature early next year. I will keep you posted with updates . |
@phanimarupaka could you provide another status update here? It appears that the search/replace functionality in #961 has all been implemented but I am having trouble tracking down related MRs and doc. We are interested in this functionality as well as improved setters UX proposal you linked above. I wanted to chime in on the setters UX proposal, but wasn't sure if that was still being actively discussed. There was mention of object setters in this comment. I wanted to add that we have a similar use case around "file" setters that keeps popping up in our implementations. We often find ourselves having to manually document and inform users of files that are expected to be present at certain paths for Kustomize components to function properly. It would be great if we could instead document these requirements as if they were any other "required" setter. Something along the lines of: kpt cfg set dir/ default-cert.tls.key --file /path/to/tls.key
kpt cfg set dir/ default-cert.tls.crt --file /path/to/tls.crt We were thinking this something like this
WDYT? |
Hi @marshall007, thanks for the comment. Here is the new version of set operation, a kpt function named apply-setters. We have also significantly simplified the experience of creating setters using our new search-replace function. Please try them out and let us know your feedback. You can provide the values to setters in a ConfigMap and apply them all at once, rather than setting them one at a time. We do not have plans to support reading from file in the near future but you may file a separate issue for record. I feel with this new declarative approach will suffice your needs. |
@phanimarupaka great, thanks! We don't have much experience using kpt functions yet, but this looks fantastic! I will give this a shot before filing a separate issue. Looking at this, I do have a few more questions if you don't mind: Am I understanding the implementation of I also don't see any references to a Finally, is there going to be any attempt at improving compatibility between tooling that is based on |
Yes. They are incompatible. But existing kpt packages can be easily migrated to new version in an automated fashion. The work is in progress and you can track the progress in this epic #1834. For customers like you using setters, migration can be done in a button click.
Yes. We want to make simple use-cases very simple. They cover most of the customer use-cases. For advanced use-cases of openapi constraints, we are figuring out the better UX to retain simplicity and provide an easy way for package publishers to provide the openapi schema. It could be persisted in either Kptfile or in some other meta file is something in discussions. We want to have an optimized UX for package consumers.
Currently the experience of KRM functions is optimized for kpt as you mentioned. @mikebz will be the better person to take this question. |
@marshall007 just a quick note on the long term thought process around functions. The long term vision is to make sure that functions can be used in a variety of products for customization or validation of configuration. We need to make them work really well in kpt first and then definitely look at how to make sure the same functions work well in kustomize scenarios as well. Right now kustomize function support is in Alpha so we are expecting a few rough edges. |
@mikebz thanks, that makes sense regarding the implementation of functions themselves. What I was more interested in is whether or not there was a plan to standardize around the conventions/naming of things. Would you mind commenting on this aspect as well? Examples include:
It seems like it would make sense to take advantage of the opportunity that pivoting to functions presents and go back to a standard naming convention (like Thanks in advance! |
Closing this given the original scope of the issue. Please file separate issues if there are outstanding questions/suggestions. |
I filed #2369 to propose making the "kpt-set" anchor string configurable. |
I don't think Krmfile should exist. |
Currently,
kpt cfg set
is imperative per-setter command. We need a way for user to declare all setter values in a configuration file. As part of this, distinguish setter definition (provided by package publisher) from setter values provided by the consumer.The text was updated successfully, but these errors were encountered: