Add values injection to README

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/143/head
Brad Davidson 2021-09-02 16:22:57 -07:00 committed by Brad Davidson
parent de5dd4c9f4
commit 852b7a34e1
1 changed files with 21 additions and 1 deletions

View File

@ -10,6 +10,26 @@ package/
<package>/
```
### RKE2 Integration
RKE2 injects at runtime a number of cluster configuration values into values.yaml; the most important of which is `global.systemDefaultRegistry`.
If set this **must** be used as a registry prefix for all images used by the chart.
The authoritative list of variables can be found within the
[setChartValues function of boostrap.go](https://github.com/rancher/rke2/blob/master/pkg/bootstrap/bootstrap.go);
at the time this document was last updated it includes:
* `global.clusterCIDR` - the CIDR range used for pod IP addresses.
* `global.clusterDNS` - the cluster DNS (coredns) service address.
* `global.clusterDomain` - the cluster DNS suffix.
* `global.rke2DataDir` - the RKE2 data-dir; effectively must be the same on all nodes.
* `global.serviceCIDR` - the CIDR range used for in-cluster service IP addresses.
* `global.systemDefaultRegistry` - the default registry that all images should be loaded from.
For an example of a chart that uses systemdefaultregistry you can look at:
* https://github.com/rancher/rke2-charts/blob/de5dd4c9f4ded7c08b4417922f691139d2417e9f/packages/rke2-canal/charts/templates/_helpers.tpl#L1-L7
* https://github.com/rancher/rke2-charts/blob/de5dd4c9f4ded7c08b4417922f691139d2417e9f/packages/rke2-canal/charts/templates/daemonset.yaml#L53
### Configuration
This repository branch contains a `configuration.yaml` file that is used to specify how it interacts with other repository branches.
@ -83,4 +103,4 @@ If this `major.minor.patch` (e.g. `0.0.1`) version of the Chart has been release
`make validate`: Validates your current repository branch against all the repository branches indicated in your configuration.yaml
`make docs`: Pulls in the latest docs, scripts, etc. from the charts-build-scripts repository
`make docs`: Pulls in the latest docs, scripts, etc. from the charts-build-scripts repository