Skip to content
This repository was archived by the owner on Oct 6, 2022. It is now read-only.
Open
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
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,38 +152,40 @@ matches the version of kubernetes deployed.
version of kubernetes in parallel. You could have one step which builds the
[node image], exports it as and OCI image, and pushes it to a registry and then
some more parallel jobs that consume that image. With that approach you don't
need to compile the smae [node image] over and over.
See also [the ouput `exported-node-image`](#out-exported-node-image).
need to compile the smae [node image] over and over.
See also [the ouput `exported-node-image`](#out-exported-node-image).
_Note_: If the task is configured to use upstream kind's default [node image],
this feature is not available. A warning is printed and the output is kept
empty.
- <a id="install-metallb"></a> `INSTALL_METALLB`
- <a id="install-metallb"></a> `INSTALL_METALLB`
If this parameter is set, [metallb] is installed onto the cluster. This
allows users to deploy services of type `LoadBalancer` and get an
`EXTERNAL-IP` for those. This external IP can be used to connect to a
exposed service from the task container, thus from code running in
`KIND_TESTS`.
- `KIND_PRE_START`
- `KIND_PRE_START`
... if you want or need to run something just before the kind cluster is
started
- `DOCKERD_OPTS`
- `DOCKERD_OPTS`
... if you need to add some configs when starting the docker daemon
- `DOCKERD_TIMEOUT`
- `DOCKERD_TIMEOUT`
... how long do you want to wait for docker to come up?
- `KINDONC_DEBUG`
- `KINDONC_DEBUG`
... if you want to see all the ugly things that are happening to bring up docker and to run kind
- `KIND_LOGLEVEL`
... make kind more or less verbose when it is doing its business.
For kind `<= 0.5.1` this value is used for the `--loglevel` option and needs to be one of `panic`, `fatal`, `error`, `warning`, `info`, `debug`.
For kind `> 0.5.1` this value is used for the `--verbosity` option and needs to be and integer.
- `KIND_CLUSTER_NAME`
- `KIND_LOGLEVEL`
... make kind more or less verbose when it is doing its business.
For kind `<= 0.5.1` this value is used for the `--loglevel` option and needs to be one of `panic`, `fatal`, `error`, `warning`, `info`, `debug`.
For kind `> 0.5.1` this value is used for the `--verbosity` option and needs to be and integer.
- `KIND_CLUSTER_NAME`
... in case you want to change kind's cluster name -- you actually should not need to do that ...
- `NODE_IMAGE`
... in case you want to pull the kind node image from somewhere else ...

# Well known task inputs & outputs

## Inputs

- `kind-on-c`, _mandatory_
- `kind-on-c`, _mandatory_
The file tree of this repo. At least the [task file](./kind.yaml) and [the
entrypoint](./entrypoint.sh) will (or should) be used from this input, in
future potentially more.
Expand Down
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@ kind::image::prepare() {
return 0
fi

if [ -n "${NODE_IMAGE+x}" ]
then
echo "${NODE_IMAGE}"
return 0
fi

# Fallback to not using a special node image, use the default from kind
# upstream
}
Expand Down
23 changes: 12 additions & 11 deletions kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ outputs:
run:
path: kind-on-c/entrypoint.sh
params:
KIND_TESTS:
KIND_CONFIG:
EXPORT_NODE_ROOTFS:
EXPORT_NODE_IMAGE:
INSTALL_METALLB:
KIND_PRE_START:
DOCKERD_OPTS:
DOCKERD_TIMEOUT:
KINDONC_DEBUG:
KIND_LOGLEVEL:
KIND_CLUSTER_NAME:
KIND_TESTS:
KIND_CONFIG:
EXPORT_NODE_ROOTFS:
EXPORT_NODE_IMAGE:
INSTALL_METALLB:
KIND_PRE_START:
DOCKERD_OPTS:
DOCKERD_TIMEOUT:
KINDONC_DEBUG:
KIND_LOGLEVEL:
KIND_CLUSTER_NAME:
NODE_IMAGE: