Skip to content

Commit 7153e99

Browse files
committed
Describe schema when authoring packages using the CLI
refs carvel-dev/kapp-controller#1677 Signed-off-by: Max Brauer <mbrauer@vmware.com>
1 parent 563dd37 commit 7153e99

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

site/content/kapp-controller/docs/develop/kctrl-package-authoring.md

+14
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,20 @@ certmanager.carvel.dev certmanager
118118
Succeeded
119119
```
120120

121+
### Reviewing the schema
122+
123+
Once you've got the package put together, it's definitely worth reviewing the details of the package's schema. A package
124+
communicates its schema as an OpenAPI v3 schema via `.spec.valuesSchema`. The schema gives you the rules for how to put
125+
together correct values for an installation of the package.
126+
127+
In case of ytt templates, the schema will be exported using [ytt's schema export
128+
functionality](https://carvel.dev/ytt/docs/latest/how-to-export-schema/).
129+
130+
In case of Helm charts, the schema will be inferred, but this is not a perfect process. The more clearly the Helm chart
131+
describes its values, the more accurate the schema will be. However, when a field in the Helm chart has `null` as
132+
its default value, its type cannot be inferred. In that case, it will be assumed to be _any_ possible type. See
133+
[kapp-controller!1677](https://github.com/carvel-dev/kapp-controller/pull/1677).
134+
121135
### Relevant FAQs
122136
- [How can we add additional configuration to an upstream release artifact?](/kapp-controller/docs/latest/kctrl-faq/#how-can-we-add-ytt-overlays-or-additional-configuration-to-upstream-release-artifacts)
123137
- [How can we go about updating packages dependent on an upstream release?](/kapp-controller/docs/latest/kctrl-faq/#how-can-we-go-about-updating-a-package-dependent-on-an-upstream-release)

0 commit comments

Comments
 (0)