Addons Playbooks¶
Scenarios: 8
Addon Contract Nginx With Core
Cross-check the `nginx` add-on source package against the current `productive-k3s-core` source validation contract.
cd productive-k3s-addons
ADDON=nginx PRODUCTIVE_K3S_CORE_REPO_DIR=../productive-k3s-core make -C ./tests test-contractAddon Impact Metadata Review
Review the impact metadata that tells `core` and operators which add-ons imply cluster-local or host-local changes.
$\n for addon in addons/*;
do\n [[ -f "${addon}/addon.yaml" ]] || continue\n name="$(basename "${addon}")"\n cluster="$(awk "/^spec:/{in_spec=1;
next} in_spec && /^ impact:/{in_impact=1;
next} in_impact && /^ cluster:/{sub(/^ cluster:[[:space:]]*/, \\"\\", \\$0);
print;
exit}" "${addon}/addon.yaml")"\n host="$(awk "/^spec:/{in_spec=1;
next} in_spec && /^ impact:/{in_impact=1;
next} in_impact && /^ host:/{sub(/^ host:[[:space:]]*/, \\"\\", \\$0);
print;
exit}" "${addon}/addon.yaml")"\n summary="$(awk "/^spec:/{in_spec=1;
next} in_spec && /^ impact:/{in_impact=1;
next} in_impact && /^ summary:/{sub(/^ summary:[[:space:]]*/, \\"\\", \\$0);
print;
exit}" "${addon}/addon.yaml")"\n printf "%s|cluster=%s|host=%s|summary=%s\\n" "${name}" "${cluster}" "${host}" "${summary}"\n done | sort\nAddon Public Host Nginx
Exercise the `nginx` live install path that uses the narrow public-host exposure contract consumed by `core`.
cd productive-k3s-addons
ADDON=nginx PRODUCTIVE_K3S_CORE_REPO_DIR=../productive-k3s-core PK3S_ADDON_PUBLIC_HOST=nginx-01.k3s.lab.internal make -C ./tests test-liveAddon Validate Nginx Package
Validate the public `nginx` add-on source package as the simplest representative add-on in the catalog.
cd productive-k3s-addons
bash ./scripts/validate-addon-package.sh . --kind addon --name nginxLive Matrix Ubuntu24
Run the full live matrix of public add-ons and stacks inside a fresh Ubuntu 24 VM through the repository's existing harness.
cd productive-k3s-addons
PRODUCTIVE_K3S_CORE_REPO_DIR=../productive-k3s-core make -C ./tests test-live-matrix-ubuntu24Package Layout Basic
Validate the full `productive-k3s-addons` source-tree contract before discussing individual add-ons or stacks.
cd productive-k3s-addons
bash ./scripts/validate-addon-package.sh .Stack Contract Base With Core
Validate the `base` stack source against the current `productive-k3s-core` stack contract.
cd productive-k3s-addons
STACK=base PRODUCTIVE_K3S_CORE_REPO_DIR=../productive-k3s-core make -C ./tests test-contractStack Validate Base Definition
Validate the `base` stack definition and inspect its declared add-on composition.
bash ./scripts/validate-addon-package.sh . --kind stack --name base
awk /\^metadata:/\{in_meta=1\;next\}\ in_meta\ \&\&\ /\^\ \ name:/\{print\ \"stack=\"\ \$2\}\ /\^spec:/\{in_spec=1\;next\}\ in_spec\ \&\&\ /\^\ \ addons:/\{in_addons=1\;next\}\ in_addons\ \&\&\ /\^\ \ \ \ -\ /\{sub\(/\^\ \ \ \ -\ /\,\"\"\,\$0\)\;\ print\ \"addon=\"\ \$0\;\ next\}\ in_addons\ \&\&\ \!/\^\ \ \ \ -\ /\{exit\} ./stacks/base/stack.yaml