Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add zarf var for k3d_extra_args #32

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ build/
*.tar.zst
zarf-sbom
tmp/

zarf-config.yaml
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,16 @@ This package is published via CI, but can be created locally with the following

## Additional Info

You can set extra k3d args by setting the deploy-time ZARF_VAR_K3D_EXTRA_ARGS.
Set Extra k3d args:

```yaml
package:
deploy:
set:
k3d_extra_args: "--gpus=1"
```

Configure MinIO:

- [Configuring Minio](docs/MINIO.md)
6 changes: 5 additions & 1 deletion zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ variables:
description: "K3d image to use"
default: "rancher/k3s:v1.27.4-k3s1"

- name: K3D_EXTRA_ARGS
description: "Optionally pass k3d arguments to the default"
default: ""

components:
- name: destroy-cluster
required: true
Expand All @@ -45,7 +49,7 @@ components:
--k3s-arg "--disable=metrics-server@server:*" \
--k3s-arg "--disable=servicelb@server:*" \
--k3s-arg "--disable=local-storage@server:*" \
--image ${ZARF_VAR_K3D_IMAGE} \
--image ${ZARF_VAR_K3D_IMAGE} ${ZARF_VAR_K3D_EXTRA_ARGS} \
${ZARF_VAR_CLUSTER_NAME}
description: "Create the cluster"
onSuccess:
Expand Down