forked from zarf-dev/zarf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zarf.yaml
111 lines (105 loc) · 3.99 KB
/
zarf.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
kind: ZarfInitConfig
metadata:
name: Zarf Official Init Package
description: "Used to establish a new Zarf cluster"
seed:
- library/registry:2.7.1
components:
- name: k3s
description: >
*** REQUIRES ROOT ***
Install K3s, certified Kubernetes distribution built for IoT & Edge computing.
K3s provides the cluster need for Zarf running in Appliance Mode as well as can
host a low-resource Gitops Service if not using an existing Kubernetes platform.
scripts:
retry: true
before:
# If running RHEL variant, disable firewalld
# https://rancher.com/docs/k3s/latest/en/advanced/#additional-preparation-for-red-hat-centos-enterprise-linux
# NOTE: The empty echo prevents infinite retry loops on non-RHEL systems where the exit code would be an error
- "[ -e /etc/redhat-release ] && systemctl disable firewalld --now || echo ''"
after:
# Configure K3s systemd service
- "systemctl daemon-reload"
- "systemctl enable --now k3s"
# Wait for the K3s node to come up
- "/usr/sbin/kubectl get nodes"
# Make sure things are really ready in k8s
- "/usr/sbin/kubectl wait --for=condition=available deployment/coredns -n kube-system"
files:
# Include the actual K3s binary
- source: https://github.com/k3s-io/k3s/releases/download/v1.21.6+k3s1/k3s
shasum: 89eb5f3d12524d0a9d5b56ba3e2707b106e1731dd0e6d2e7b898ac585f4959df
target: /usr/sbin/k3s
executable: true
# K3s magic provides these tools when symlinking
symlinks:
- /usr/sbin/kubectl
- /usr/sbin/ctr
- /usr/sbin/crictl
# Transfer the K3s images for containerd to pick them up
- source: https://github.com/k3s-io/k3s/releases/download/v1.21.6+k3s1/k3s-airgap-images-amd64.tar.zst
shasum: 772ae839f8c7718e2022d103076df53452d4f09d2a22afdf4b5796cf0cbce62c
target: /var/lib/rancher/k3s/agent/images/k3s.tar.zst
# K3s removal script
- source: assets/scripts/zarf-clean-k3s.sh
target: /usr/sbin/zarf-clean-k3s.sh
executable: true
# The K3s systemd service definition
- source: assets/scripts/k3s.service
target: /etc/systemd/system/k3s.service
symlinks:
- /etc/systemd/system/multi-user.target.wants/k3s.service
# Mock file for creating the kube config symlink
- source: assets/misc/empty-file
target: /etc/rancher/k3s/k3s.yaml
symlinks:
- /root/.kube/config
- name: container-registry-seed
required: true
charts:
- name: docker-registry
url: https://github.com/defenseunicorns/docker-registry.helm.git
version: 2.0.0
namespace: zarf
valuesFiles:
- assets/charts/registry-values.yaml
- assets/charts/registry-values-seed.yaml
- name: container-registry
required: true
manifests:
- name: kep-1775-registry-annotation
files:
- assets/manifests/registry/configmap.yaml
charts:
- name: docker-registry
url: https://github.com/defenseunicorns/docker-registry.helm.git
version: 2.0.0
namespace: zarf
valuesFiles:
- assets/charts/registry-values.yaml
- name: logging
description: "Add Promtail, Grafana and Loki (PGL) to this cluster for log monitoring."
images:
- grafana/grafana:8.1.6
- grafana/loki:2.4.1
- grafana/promtail:2.1.0
- quay.io/kiwigrid/k8s-sidecar:1.12.3
charts:
- name: loki-stack
url: https://grafana.github.io/helm-charts
version: 2.5.1
namespace: zarf
valuesFiles:
- assets/charts/pgl-values.yaml
- name: gitops-service
description: "Add Registry and Gitea for serving gitops-based clusters in an airgap"
images:
- gitea/gitea:1.13.7
charts:
- name: gitea
url: https://dl.gitea.io/charts
version: 2.2.5
namespace: zarf
valuesFiles:
- assets/charts/gitea-values.yaml