18 lines
642 B
Bash
18 lines
642 B
Bash
#!/usr/bin/env bash
|
|
# Usage: bash manifests/home-services/discord-bot-secret.sh
|
|
# Description: Regenerates the discord-bot SealedSecret from .env
|
|
set -euo pipefail
|
|
|
|
source "$(dirname "$0")/../../.env"
|
|
|
|
kubectl create secret generic discord-bot-secret \
|
|
--namespace=default \
|
|
--from-literal=DISCORD_TOKEN="${DISCORD_TOKEN}" \
|
|
--from-literal=GUILD_ID="${GUILD_ID}" \
|
|
--dry-run=client -o yaml \
|
|
| kubeseal --controller-namespace=kube-system \
|
|
--controller-name=sealed-secrets-controller \
|
|
--format=yaml \
|
|
> "$(dirname "$0")/discord-bot-sealed.yaml"
|
|
|
|
echo "discord-bot-sealed.yaml regenerated — commit to repo" |