feat: update manifests and namespaces to use templated namespace variables

This commit is contained in:
2026-05-17 23:26:20 +00:00
parent edff518815
commit 872a804aa7
31 changed files with 28 additions and 277 deletions

View File

@@ -1,48 +0,0 @@
#!/bin/bash
set -e
set -o pipefail
if [ -z "${WILD_INSTANCE}" ]; then
echo "ERROR: WILD_INSTANCE is not set"
exit 1
fi
if [ -z "${WILD_API_DATA_DIR}" ]; then
echo "ERROR: WILD_API_DATA_DIR is not set"
exit 1
fi
if [ -z "${KUBECONFIG}" ]; then
echo "ERROR: KUBECONFIG is not set"
exit 1
fi
INSTANCE_DIR="${WILD_API_DATA_DIR}/instances/${WILD_INSTANCE}"
DOCKER_REGISTRY_DIR="${INSTANCE_DIR}/apps/docker-registry"
echo "=== Setting up Docker Registry ==="
echo ""
echo "Using pre-compiled Docker Registry templates..."
if [ ! -f "${DOCKER_REGISTRY_DIR}/kustomization.yaml" ]; then
echo "ERROR: Compiled templates not found at ${DOCKER_REGISTRY_DIR}"
echo "Templates should be compiled before deployment."
exit 1
fi
echo "Deploying Docker Registry..."
kubectl apply -k "${DOCKER_REGISTRY_DIR}/"
echo "Waiting for Docker Registry to be ready..."
kubectl wait --for=condition=available --timeout=300s deployment/docker-registry -n docker-registry
echo ""
echo "Docker Registry installed successfully"
echo ""
echo "Deployment status:"
kubectl get pods -n docker-registry
kubectl get services -n docker-registry
echo ""
echo "To use the registry:"
echo " docker tag myimage registry.local/myimage"
echo " docker push registry.local/myimage"

View File

@@ -1,6 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: docker-registry
namespace: "{{ .namespace }}"
labels:
- includeSelectors: true
pairs:

View File

@@ -2,11 +2,11 @@ name: docker-registry
is: docker-registry
description: Private Docker image registry for cluster
version: "3.0.0"
namespace: docker-registry
category: infrastructure
requires:
- name: traefik
- name: cert-manager
defaultConfig:
namespace: docker-registry
host: "registry.{{ .cloud.internalDomain }}"
storage: "100Gi"

View File

@@ -1,4 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: docker-registry
name: "{{ .namespace }}"