Files
feedc0de 4127b8429b
Validate and deploy Jellyfin / Validate manifests and scripts (push) Successful in 12s
Validate and deploy Jellyfin / Deploy to Kubernetes (push) Successful in 18s
Initial commit with the existing deployment files
2026-10-09 09:14:10 +02:00

34 lines
1.4 KiB
Bash
Executable File

#!/bin/sh
set -eu
project_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
expected_context=kubernetes-admin@kubernetes
context=$(kubectl config current-context)
if [ "${context}" != "${expected_context}" ]; then
echo "Expected Kubernetes context ${expected_context}, found ${context}." >&2
exit 1
fi
if [ "$(findmnt -T /komposthaufen/multimedia -n -o FSTYPE)" != bcachefs ]; then
echo '/komposthaufen/multimedia is not backed by bcachefs.' >&2
exit 1
fi
test -d /komposthaufen/multimedia/Videos
kubectl apply --filename "${project_dir}/namespace.yaml"
kubectl --namespace jellyfin wait --for=condition=complete \
job/jellyfin-archlinux-migration --timeout=5s
kubectl apply --dry-run=server --filename "${project_dir}/jellyfin.yaml"
kubectl apply --filename "${project_dir}/jellyfin.yaml"
kubectl --namespace jellyfin rollout status deployment/jellyfin --timeout=30m
pod=$(kubectl --namespace jellyfin get pod \
--selector=app.kubernetes.io/name=jellyfin,app.kubernetes.io/component=server \
--output=jsonpath='{.items[0].metadata.name}')
node=$(kubectl --namespace jellyfin get pod "${pod}" --output=jsonpath='{.spec.nodeName}')
image=$(kubectl --namespace jellyfin get deployment jellyfin --output=jsonpath='{.spec.template.spec.containers[0].image}')
test "${node}" = arschrock
kubectl --namespace jellyfin get pod "${pod}" --output=wide
printf 'Jellyfin is ready on %s with image %s.\n' "${node}" "${image}"