feat: Deploy child payload from parent zarf package

This commit is contained in:
2026-04-13 22:00:03 +10:00
parent a0c8a681f6
commit 25811528dc
4 changed files with 30 additions and 25 deletions

View File

@@ -37,38 +37,23 @@ components:
maxTotalSeconds: 600
after:
- cmd: |
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 kairos@${ZARF_VAR_KUBEVIP_ADDRESS} "sudo cat /etc/rancher/k3s/k3s.yaml" > harvester-kairos.yaml
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 kairos@${ZARF_VAR_KUBEVIP_ADDRESS} "sudo cat /etc/rancher/k3s/k3s.yaml" > harvester-kairos.yaml
sed -i "s/127.0.0.1/${ZARF_VAR_KUBEVIP_ADDRESS}/g" harvester-kairos.yaml
maxRetries: 10
- name: deploy-kairosoperator
- name: prepare-payload
required: true
files:
- source: "manifests/kairos-operator-rendered.yaml"
target: "kairos-operator.yaml"
- source: "https://charts.jetstack.io/charts/cert-manager-v1.20.1.tgz"
target: "cert-manager.tgz"
images:
- quay.io/jetstack/cert-manager-controller:v1.20.1
- quay.io/jetstack/cert-manager-webhook:v1.20.1
- quay.io/jetstack/cert-manager-cainjector:v1.20.1
- quay.io/kairos/operator:v0.0.7
- source: "../../init/zarf-init-amd64-v0.74.2.tar.zst"
target: "zarf-init.tar.zst"
- source: "../../build/zarf-package-deploy-kairos-operator-amd64.tar.zst"
target: "kairos-operator.tar.zst"
- name: invoke-deployment-kairos-operator
required: true
actions:
onDeploy:
before:
- cmd: |
export KUBECONFIG=harvester-kairos.yaml
./zarf tools helm install cert-manager cert-manager.tgz \
--namespace cert-manager --create-namespace \
--set installCRDs=true \
--set global.imageRegistry=${ZARF_VAR_REGISTRY_HOST}:31999 \
--wait
description: "Installing Cert-Manager on NEW cluster"
after:
- cmd: |
export KUBECONFIG=harvester-kairos.yaml
sed -i "s|quay.io|${ZARF_VAR_REGISTRY_HOST}:31999/quay.io|g" kairos-operator.yaml
./zarf tools kubectl apply -f kairos-operator.yaml
description: "Deploying Kairos Operator to NEW cluster"
./zarf init zarf-init.tar.zst --confirm --log-level warn
./zarf package deploy kairos-operator.tar.zst --confirm --log-level warn

View File

@@ -0,0 +1,19 @@
kind: ZarfPackageConfig
metadata:
name: deploy-kairos-operator
# version: 0.0.1
# description: |
# "Deploys Kairos Operator"
components:
- name: kairos-operator
required: true
manifests:
- name: kairos-operator-kustomized
files:
- manifests/kairos-operator-rendered.yaml
images:
- quay.io/kairos/operator:v0.1.0-beta4
# Possible images - kairos-operator
- busybox:latest
- quay.io/kairos/operator-node-labeler:v0.1.0-beta4