Files
tenant01/tenant01-k0s-hcp.yaml
2025-12-15 21:36:33 +01:00

124 lines
4.8 KiB
YAML

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cluster1-k0s-hcp
namespace: argocd
spec:
project: default
sources:
- repoURL: https://git.weystrom.dev/argodent/cluster-templates.git
targetRevision: HEAD
path: tinkerbell-k0s-hcp
helm:
releaseName: cluster1
valuesObject:
workersNumber: 3
k0smotron:
externalAddress: "172.16.81.254"
persistence:
type: emptyDir
etcd:
persistence:
storageClass: openebs-hostpath
size: 1Gi
service:
type: NodePort
apiPort: 30443
konnectivityPort: 30132
worker:
bootMode: netboot
hardwareAffinity:
matchLabels:
tinkerbell.org/role: worker
templateOverride: |
version: "0.1"
name: worker-provision
global_timeout: 9000
tasks:
- name: "worker-provision"
worker: "{{.device_1}}"
volumes:
- /dev:/dev
- /dev/console:/dev/console
- /lib/firmware:/lib/firmware:ro
actions:
- name: "Stream Debian Image"
image: quay.io/tinkerbell/actions/image2disk:latest
timeout: 3000
environment:
DEST_DISK: {{ index .Hardware.Disks 0 }}
IMG_URL: https://cdimage.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.raw
COMPRESSED: false
- name: "Grow Partition"
image: quay.io/tinkerbell/actions/cexec:latest
timeout: 90
environment:
BLOCK_DEVICE: {{ index .Hardware.Disks 0 }}1
FS_TYPE: ext4
CHROOT: y
DEFAULT_INTERPRETER: "/bin/sh -c"
CMD_LINE: "growpart {{ index .Hardware.Disks 0 }} 1 && resize2fs {{ index .Hardware.Disks 0 }}1"
- name: "Add Cloud-Init Config"
image: quay.io/tinkerbell/actions/writefile:latest
timeout: 90
environment:
DEST_DISK: {{ formatPartition ( index .Hardware.Disks 0 ) 1 }}
FS_TYPE: ext4
DEST_PATH: /etc/cloud/cloud.cfg.d/10_tinkerbell.cfg
UID: 0
GID: 0
MODE: 0600
DIRMODE: 0700
CONTENTS: |
datasource:
Ec2:
metadata_urls: ["http://172.16.81.254:7172"]
strict_id: false
system_info:
default_user:
name: tink
plain_text_passwd: tink
lock_passwd: false
groups: [wheel, adm, sudo]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
ssh_pwauth: true
manage_etc_hosts: localhost
warnings:
dsid_missing_source: off
- name: "Add Cloud-Init DS-Identity"
image: quay.io/tinkerbell/actions/writefile:latest
timeout: 90
environment:
DEST_DISK: {{ formatPartition ( index .Hardware.Disks 0 ) 1 }}
FS_TYPE: ext4
DEST_PATH: /etc/cloud/ds-identify.cfg
UID: 0
GID: 0
MODE: 0600
DIRMODE: 0700
CONTENTS: |
datasource: Ec2
- name: "Reboot into installed OS"
image: ghcr.io/jacobweinstock/waitdaemon:latest
timeout: 90
pid: host
command: ["reboot"]
environment:
IMAGE: alpine
WAIT_SECONDS: 10
volumes:
- /var/run/docker.sock:/var/run/docker.sock
k0s:
version: v1.33.4+k0s.0
- repoURL: https://git.weystrom.dev/argodent/tenant01.git
targetRevision: HEAD
path: hardware
destination:
server: https://kubernetes.default.svc
namespace: tenant01
syncPolicy:
syncOptions:
- CreateNamespace=true
- ServerSideApply=true