Add KUBERNETES_DEPLOYMENT_REPLICAS variable for configurable pod replicas
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 21s

This commit is contained in:
2025-10-06 14:59:26 +08:00
parent f2cc11f537
commit 3dd30bb53f
3 changed files with 4 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ KUBECONFIG_DATA="${KUBECONFIG_DATA:-}"
KUBERNETES_URL="${KUBERNETES_URL:-https://kubernetes.default.svc}"
KUBERNETES_NAMESPACE="${KUBERNETES_NAMESPACE:-default}"
KUBERNETES_INGRESS_HOST="${KUBERNETES_INGRESS_HOST:-example.com}"
KUBERNETES_DEPLOYMENT_REPLICAS="${KUBERNETES_DEPLOYMENT_REPLICAS:-2}"
# Container Registry (inherited from ci.sh)
CONTAINER_REGISTRY_URL="${CONTAINER_REGISTRY_URL:-127.0.0.1}"
@@ -39,6 +40,7 @@ print_help() {
echo " KUBERNETES_URL Kubernetes API server URL"
echo " KUBERNETES_NAMESPACE Deploy namespace (default: default)"
echo " KUBERNETES_INGRESS_HOST Ingress host (default: example.com)"
echo " KUBERNETES_DEPLOYMENT_REPLICAS Number of pod replicas (default: 2)"
echo ""
echo " Container Registry Variables (from ci.sh):"
echo " CONTAINER_REGISTRY_URL"

View File

@@ -12,7 +12,7 @@ metadata:
app: ${CONTAINER_IMAGE_NAME}
spec:
# Number of pod replicas to run
replicas: 2
replicas: ${KUBERNETES_DEPLOYMENT_REPLICAS}
# Label selector to identify pods managed by this deployment
selector: