knative/func

Document all values/defaults in func.yaml

Closed this issue · 5 comments

There should be a section for each runtime which documents all possible configuration options and used defaults.

Without this, user cannot easily find out what defaults are applied to their application (for example definition of health checks for a Quarkus runtime).

/kind documentation

lance commented

We do currently have a document for func.yaml but it clearly is missing some references such as the health endpoints. https://github.com/knative/func/blob/main/docs/reference/func_yaml.md

Sometimes this conundrum is solved by writing a fully-populated, but commented-out config file to disk, which has all (commented) values set to their defaults at time of installation.

We can not fully replicate the workflow due to the choice of yaml as our config file format, but, we could potentially get most of the benefit by prepending this fully-populated config as a generated header to func.yaml on save.

The header config comment block would not inhibit the parsing of the config, and we would be free to add as much exposition as is necessary for each setting, while not falling into the pitfalls of a pre-populated config.

This also has an interesting potential benefit of allowing us to re-generate this docs header as the system is updated so it stays current.

We can also write the func.yaml as a Go template, as is outlined in #1853

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.