chart: make the default deployment ready to install
CI / test (push) Successful in 1m38s
CI / chart (push) Successful in 2s
CI / image (push) Successful in 3m4s

Use the CI-published :latest tag with pullPolicy Always, since the chart
previously defaulted to appVersion 0.1.0, which is not published as an image.

Add ingress annotations with a cert-manager ClusterIssuer so the TLS secret is
issued instead of having to exist beforehand.

Extend release.sh --deploy to create the registry image pull secret from the
local Docker config and pass it to the release, and document both the scripted
and manual deployment paths.
This commit is contained in:
TapTap committed 2026-11-13 16:09:02 +00:00
1 parent 96d704f192
commit 441fa056ba
5 files changed
+58 -12

No files matched your search

+20 -3
View File
@@ -14,6 +14,8 @@ NAMESPACE="${NAMESPACE:-musicmanager}"
RELEASE="${RELEASE:-musicmanager}"
USERS_SECRET="${USERS_SECRET:-musicmanager-users}"
USERS_FILE="${USERS_FILE:-$ROOT/config/users.yaml}"
PULL_SECRET="${PULL_SECRET:-musicmanager-registry}"
DOCKER_CONFIG_FILE="${DOCKER_CONFIG_FILE:-$HOME/.docker/config.json}"
TAG=""
DEPLOY=0
@@ -35,6 +37,9 @@ Environment:
RELEASE Helm release name (default: musicmanager)
USERS_SECRET Secret holding users.yaml (default: musicmanager-users)
USERS_FILE Path to users.yaml for --deploy (default: config/users.yaml)
PULL_SECRET Image pull secret name (default: musicmanager-registry)
DOCKER_CONFIG_FILE Docker config used for the pull secret
(default: ~/.docker/config.json)
EOF
}
@@ -65,8 +70,9 @@ fi
if [[ $DEPLOY -eq 1 ]]; then
echo "Deploying $RELEASE to namespace $NAMESPACE with image tag $TAG"
kubectl create namespace "$NAMESPACE" --dry-run=client -o yaml | kubectl apply -f -
if [[ -f "$USERS_FILE" ]]; then
kubectl create namespace "$NAMESPACE" --dry-run=client -o yaml | kubectl apply -f -
kubectl -n "$NAMESPACE" create secret generic "$USERS_SECRET" \
--from-file=users.yaml="$USERS_FILE" \
--dry-run=client -o yaml | kubectl apply -f -
@@ -74,8 +80,19 @@ if [[ $DEPLOY -eq 1 ]]; then
echo "No users file at $USERS_FILE; assuming secret $USERS_SECRET already exists."
fi
helm_args=(--set image.tag="$TAG" --set users.existingSecret="$USERS_SECRET")
if [[ -f "$DOCKER_CONFIG_FILE" ]]; then
kubectl -n "$NAMESPACE" create secret generic "$PULL_SECRET" \
--type=kubernetes.io/dockerconfigjson \
--from-file=.dockerconfigjson="$DOCKER_CONFIG_FILE" \
--dry-run=client -o yaml | kubectl apply -f -
helm_args+=(--set "imagePullSecrets[0].name=$PULL_SECRET")
else
echo "No Docker config at $DOCKER_CONFIG_FILE; assuming an image pull secret is configured."
fi
helm upgrade --install "$RELEASE" "$ROOT/charts/musicmanager" \
--namespace "$NAMESPACE" \
--set image.tag="$TAG" \
--set users.existingSecret="$USERS_SECRET"
"${helm_args[@]}"
fi