Skip to content

Commit 7082a03

Browse files
committed
ci(deploy): template chart README/NOTES with version
Signed-off-by: Vaughn Dice <vdice@akamai.com>
1 parent 867bd7c commit 7082a03

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

deploy/helm/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# runtime-class-manager
22

3-
runtime-class-manager is a Kubernetes operator that manages installation of Wasm shims onto nodes and related Runtimeclasses via [Shim custom resources](../../config/crd/bases/runtime.spinkube.dev_shims.yaml).
3+
runtime-class-manager is a Kubernetes operator that manages installation of Wasm shims onto nodes and related Runtimeclasses via [Shim custom resources](https://github.com/spinframework/runtime-class-manager/tree/v{{ CHART_VERSION }}/config/crd/bases/runtime.spinkube.dev_shims.yaml).
44

55
## Prerequisites
66

@@ -12,23 +12,24 @@ runtime-class-manager is a Kubernetes operator that manages installation of Wasm
1212
The following installs the runtime-class-manager chart with the release name `rcm`:
1313

1414
```shell
15-
helm upgrade --install \
15+
helm upgrade --install rcm \
1616
--namespace rcm \
1717
--create-namespace \
18+
--version {{ CHART_VERSION }} \
1819
--wait \
19-
rcm .
20+
oci://ghcr.io/spinframework/charts/runtime-class-manager
2021
```
2122

2223
## Post-installation
2324

24-
With runtime-class-manager running, you're ready to create one or more Wasm Shims. See the samples in the [config/samples directory](../../config/samples/).
25+
With runtime-class-manager running, you're ready to create one or more Wasm Shims. See the samples in the [config/samples directory](https://github.com/spinframework/runtime-class-manager/tree/v{{ CHART_VERSION }}/config/samples/).
2526

2627
> Note: Ensure that the `location` for the specified shim binary points to the correct architecture for your Node(s)
2728
28-
For example, here we install the Spin shim:
29+
For example, here we install the Spin shim on nodes with x86_64 architecture:
2930

3031
```shell
31-
kubectl apply -f https://raw.githubusercontent.com/spinframework/runtime-class-manager/refs/heads/main/config/samples/test_shim_spin.yaml
32+
ARCH=x86_64 kubectl apply -f https://raw.githubusercontent.com/spinframework/runtime-class-manager/refs/heads/v{{ CHART_VERSION }}/config/samples/sample_shim_spin_$ARCH.yaml
3233
```
3334

3435
Now when you annotate one or more nodes with a label corresponding to the `nodeSelector` declared in the Shim, runtime-class-manager will install the shim as well as create the corresponding Runtimeclass:

deploy/helm/templates/NOTES.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
Welcome to Runtime-Class-Manager.
1+
Welcome to Runtime-Class-Manager {{ .Chart.AppVersion }}.
22

33
Next steps:
44

5-
Create one or more Wasm Shim custom resources. See the samples in https://github.com/spinframework/runtime-class-manager/tree/main/config/samples.
5+
Create one or more Wasm Shim custom resources. See the samples in https://github.com/spinframework/runtime-class-manager/tree/{{ .Chart.AppVersion }}/config/samples.
66

77
> Note: Ensure that the `location` for the specified shim binary points to the correct architecture for your Node(s)
88

99
For example, install the Spin shim on nodes with x86_64 architecture:
1010

1111
```shell
12-
ARCH=x86_64 kubectl apply -f https://raw.githubusercontent.com/spinframework/runtime-class-manager/refs/heads/main/config/samples/sample_shim_spin_$ARCH.yaml
12+
ARCH=x86_64 kubectl apply -f https://raw.githubusercontent.com/spinframework/runtime-class-manager/refs/heads/{{ .Chart.AppVersion }}/config/samples/sample_shim_spin_$ARCH.yaml
1313
```
1414

1515
Next, annotate one or more nodes with a label corresponding to the `nodeSelector` declared in the Shim, runtime-class-manager will install the shim as well as create the corresponding RuntimeClass:

deploy/update-chart-versions.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ yq -i '.image.tag = env(APP_VERSION)' "${STAGING_DIR}/${CHART_NAME}-${CHART_VERS
1818
yq -i '.rcm.shimDownloaderImage.tag = env(APP_VERSION)' "${STAGING_DIR}/${CHART_NAME}-${CHART_VERSION}/values.yaml"
1919
yq -i '.rcm.nodeInstallerImage.tag = env(APP_VERSION)' "${STAGING_DIR}/${CHART_NAME}-${CHART_VERSION}/values.yaml"
2020

21+
## Update README.md with CHART_VERSION
22+
sed -i.bak -e "s%{{ CHART_VERSION }}%${CHART_VERSION}%g" "${STAGING_DIR}/${CHART_NAME}-${CHART_VERSION}/README.md"
23+
2124
# Cleanup
2225
find "${STAGING_DIR}/${CHART_NAME}-${CHART_VERSION}" -type f -name '*.bak' -print0 | xargs -0 rm -- || true

0 commit comments

Comments
 (0)