homelab/manifests/portfolio/registry-secret.sh

14 lines
525 B
Bash

#!/usr/bin/env bash
# Usage: bash manifests/portfolio/registry-secret.sh
# Description: Creates the Gitea container registry pull secret for the portfolio namespace
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../../.env"
kubectl create secret docker-registry gitea-registry \
--namespace portfolio \
--docker-server="$REGISTRY_SERVER" \
--docker-username="$REGISTRY_USER" \
--docker-password="$REGISTRY_PASSWORD" \
--dry-run=client -o yaml | kubectl apply -f -