Closed salaboy closed 1 year ago
@rhuss we have discussed the multiple levels of nesting as a big issue that can bring confusion and it does complicate the configuration file. The proposed structure kept the nesting to the minimum while providing a relationship to the different phases in the lifecycle of the function.
Your suggestion of including deployment details inside a run
section sounds really confusing, as we have a func run
command to run things locally and func deploy
to run the function on a cluster. Overriding environment variables specifically for deployment can be added later on to the proposed structure. Does this make sense?
@rhuss we have discussed the multiple levels of nesting as a big issue that can bring confusion and it does complicate the configuration file. The proposed structure kept the nesting to the minimum while providing a relationship to the different phases in the lifecycle of the function.
I don't agree that careful and sensible nesting is more confusing than a huge flat list, especially when the list elements are sometimes ignored, sometimes not, depending on the context (whether running in the cluster or locally). That is confusing.
Your suggestion of including deployment details inside a
run
section sounds really confusing, as we have afunc run
command to run things locally andfunc deploy
to run the function on a cluster.
I agree that run
is probably not a good name here. In retrospect, I probably wouldn't have chosen "run" and "deploy" as names for local and cluster runs, as it's not intuitive. Try to ask people that do not know functions what if they could guess what kn func run
and kn func deploy
would do and what they think the difference ist (maybe that would be a good question for one of the next UX interviews, in case we have the possibility to those again l;-) But it's easy to complain after the fact, so won't do that here :) But maybe we could find a different name for that top-level element? I don't care so much about the concrete name, but I definitely care about avoiding having long flat lists with many ungrouped context-sensitive elements, which is never intuitive and requires reading and memorizing the documentation.
Currently, the
func.yaml
file describes a Func project and it follows its own conventions and schema for defining and validating the available configuration values.By refactoring
func.yaml
to a CRD-like resource we can:func
CLI we can follow the same principles as other Kubernetes resources do.func
CLIfunc
CLIThe following is an example of what this refactoring would look like:
@lance @evankanderson @zroubalik @matejvasek @xtreme-sameer-vohra (and community in general) feedback is highly appreciated. I've created the issue to see if we can discuss this in our weekly meeting tomorrow. Still in Draft, as I think that there are more advantages than the one listed here, wdyt?