Files
Homelabv4/infrastructure/vault/manifests/eso-bootstrap-job.yaml
T
Scooby HuskyandClaude Opus 4.6 263dd3f6cc Use bitnami/kubectl:1.29 for hook jobs
The :1.31 tag is gone from Docker Hub and :latest is blocked by Kyverno
disallow-latest-tag policy. The 1.29 image is cached on cluster nodes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 18:00:16 -05:00

49 lines
1.7 KiB
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: vault-eso-bootstrap
namespace: vault
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
argocd.argoproj.io/sync-wave: "2"
spec:
backoffLimit: 5
template:
spec:
serviceAccountName: argocd-hook-sa
containers:
- name: eso-bootstrap
image: bitnami/kubectl:1.29
command:
- /bin/bash
- -c
- |
set -euo pipefail
echo "=== Vault ESO Bootstrap ==="
# Wait for ESO to be ready
echo "Waiting for External Secrets Operator..."
for i in $(seq 1 60); do
if kubectl -n external-secrets get deploy/external-secrets >/dev/null 2>&1; then
kubectl -n external-secrets rollout status deploy/external-secrets --timeout=180s && break
fi
echo " waiting for ESO deployment... (attempt $i/60)"
sleep 5
done
# Wait for ClusterSecretStore to be ready
echo "Checking ClusterSecretStore vault-backend..."
for i in $(seq 1 30); do
STATUS=$(kubectl get clustersecretstore vault-backend -o jsonpath='{.status.conditions[0].status}' 2>/dev/null || echo "")
if [ "$STATUS" = "True" ]; then
echo " ClusterSecretStore vault-backend is ready"
break
fi
echo " waiting for ClusterSecretStore... (attempt $i/30)"
sleep 5
done
echo "=== Vault ESO Bootstrap Complete ==="
restartPolicy: Never