-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtasks.yaml
63 lines (57 loc) · 2.18 KB
/
tasks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
includes:
- actions: https://raw.githubusercontent.com/defenseunicorns/uds-common/refs/tags/v1.2.2/tasks/actions.yaml
variables:
- name: VERSION
default: "v1.30.4-k3s1"
- name: IMAGE_NAME
default: "rancher/k3s"
- name: K3D_EXTRA_ARGS
default: ""
- name: NGINX_EXTRA_PORTS
default: "[]"
tasks:
- name: default
description: "Build and deploy uds-k3d"
actions:
- description: "Build UDS K3d package"
cmd: "uds zarf package create --confirm --no-progress"
- description: "Deploy UDS K3d package"
cmd: |
uds zarf package deploy zarf-package-uds-k3d-*.tar.zst \
--set K3D_IMAGE=${IMAGE_NAME}:${VERSION} \
--set K3D_EXTRA_ARGS="${K3D_EXTRA_ARGS}" \
--set NGINX_EXTRA_PORTS="${NGINX_EXTRA_PORTS}" \
--no-progress --confirm
- name: validate
actions:
- description: Validate coredns is up
wait:
cluster:
kind: Pod
name: "k8s-app=kube-dns"
namespace: kube-system
condition: Ready
- description: Validate coredns is resolving *.uds.dev internally
cmd: |
set -e
FOO_IP=$(uds zarf tools kubectl run dig-test --image=arunvelsriram/utils -q --restart=Never --rm -i -- dig +short foo.uds.dev)
if [ "${FOO_IP}" != "127.0.0.1" ]; then
echo "CoreDNS is resolving foo.uds.dev to host.k3d.internal"
else
echo "CoreDNS patch failed, foo.uds.dev is resolving to 127.0.0.1"
exit 1
fi
- description: Validate zarf init
cmd: |
set -e
uds zarf tools download-init --no-progress
# Test zarf init due to containerd issue - https://github.com/defenseunicorns/zarf/issues/592
uds zarf init --confirm --no-progress
# - name: build-image
# actions:
# - description: Build the custom k3s image
# cmd: docker build -t ${IMAGE_NAME}:${VERSION} --build-arg K3S_TAG=${VERSION} docker/
# - name: publish-image
# actions:
# - description: Publish the custom k3s image
# cmd: docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ${IMAGE_NAME}:${VERSION} docker