feat: update manifests and namespaces to use templated namespace variables
This commit is contained in:
@@ -2,11 +2,11 @@ name: cert-manager
|
||||
is: cert-manager
|
||||
description: X.509 certificate management for Kubernetes
|
||||
version: v1.17.2
|
||||
namespace: cert-manager
|
||||
category: infrastructure
|
||||
requires:
|
||||
- name: traefik
|
||||
defaultConfig:
|
||||
namespace: cert-manager
|
||||
cloudDomain: "{{ .cloud.domain }}"
|
||||
internalDomain: "{{ .cloud.internalDomain }}"
|
||||
email: "{{ .operator.email }}"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: cert-manager
|
||||
name: "{{ .namespace }}"
|
||||
|
||||
@@ -2,11 +2,11 @@ name: coredns
|
||||
is: coredns
|
||||
description: DNS server for internal cluster DNS resolution
|
||||
version: v1.12.0
|
||||
namespace: kube-system
|
||||
category: infrastructure
|
||||
requires:
|
||||
- name: metallb
|
||||
defaultConfig:
|
||||
namespace: kube-system
|
||||
internalDomain: "{{ .cloud.internalDomain }}"
|
||||
loadBalancerIp: "{{ .apps.metallb.loadBalancerIp }}"
|
||||
externalResolver: "8.8.8.8"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: crowdsec
|
||||
namespace: "{{ .namespace }}"
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
|
||||
@@ -2,12 +2,12 @@ name: crowdsec
|
||||
is: crowdsec
|
||||
description: CrowdSec security engine with Traefik bouncer for threat detection and rate limiting
|
||||
version: v1.7.8
|
||||
namespace: crowdsec
|
||||
category: infrastructure
|
||||
requires:
|
||||
- name: longhorn
|
||||
- name: traefik
|
||||
defaultConfig:
|
||||
namespace: crowdsec
|
||||
rateLimitAverage: "100"
|
||||
rateLimitBurst: "100"
|
||||
defaultSecrets:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: crowdsec
|
||||
name: "{{ .namespace }}"
|
||||
labels:
|
||||
app: crowdsec
|
||||
managedBy: kustomize
|
||||
|
||||
@@ -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"
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: docker-registry
|
||||
namespace: "{{ .namespace }}"
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: docker-registry
|
||||
name: "{{ .namespace }}"
|
||||
|
||||
@@ -2,12 +2,12 @@ name: externaldns
|
||||
is: externaldns
|
||||
description: Automatically configures DNS records for services
|
||||
version: v0.13.4
|
||||
namespace: externaldns
|
||||
deploymentName: external-dns
|
||||
category: infrastructure
|
||||
requires:
|
||||
- name: cert-manager
|
||||
defaultConfig:
|
||||
namespace: externaldns
|
||||
ownerId: "wild-cloud-{{ .cluster.name }}"
|
||||
defaultSecrets:
|
||||
- key: cloudflareToken
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: externaldns
|
||||
name: "{{ .namespace }}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: headlamp
|
||||
namespace: "{{ .namespace }}"
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
|
||||
@@ -2,10 +2,10 @@ name: headlamp
|
||||
is: headlamp
|
||||
description: Modern Kubernetes web UI (SIG UI) with in-cluster authentication
|
||||
version: v0.42.0
|
||||
namespace: headlamp
|
||||
category: infrastructure
|
||||
requires:
|
||||
- name: traefik
|
||||
- name: cert-manager
|
||||
defaultConfig:
|
||||
namespace: headlamp
|
||||
internalDomain: "{{ .cloud.internalDomain }}"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: headlamp
|
||||
name: "{{ .namespace }}"
|
||||
|
||||
@@ -1,47 +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}"
|
||||
LONGHORN_DIR="${INSTANCE_DIR}/apps/longhorn"
|
||||
|
||||
echo "=== Setting up Longhorn ==="
|
||||
echo ""
|
||||
|
||||
echo "Using pre-compiled Longhorn templates..."
|
||||
if [ ! -f "${LONGHORN_DIR}/kustomization.yaml" ]; then
|
||||
echo "ERROR: Compiled templates not found at ${LONGHORN_DIR}"
|
||||
echo "Templates should be compiled before deployment."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Deploying Longhorn..."
|
||||
kubectl apply -k ${LONGHORN_DIR}/
|
||||
|
||||
echo "Waiting for Longhorn to be ready..."
|
||||
kubectl wait --for=condition=available --timeout=300s deployment/longhorn-driver-deployer -n longhorn-system || true
|
||||
|
||||
echo ""
|
||||
echo "Longhorn installed successfully"
|
||||
echo ""
|
||||
echo "To verify the installation:"
|
||||
echo " kubectl get pods -n longhorn-system"
|
||||
echo " kubectl get storageclass"
|
||||
echo ""
|
||||
echo "To access the Longhorn UI:"
|
||||
echo " kubectl port-forward -n longhorn-system svc/longhorn-frontend 8080:80"
|
||||
@@ -2,12 +2,12 @@ name: longhorn
|
||||
is: longhorn
|
||||
description: Cloud-native distributed block storage for Kubernetes
|
||||
version: v1.8.1
|
||||
namespace: longhorn-system
|
||||
deploymentName: longhorn-ui
|
||||
category: infrastructure
|
||||
requires:
|
||||
- name: traefik
|
||||
- name: nfs
|
||||
defaultConfig:
|
||||
namespace: longhorn-system
|
||||
internalDomain: "{{ .cloud.internalDomain }}"
|
||||
backupTarget: "nfs://{{ .apps.nfs.host }}:/data/{{ .cluster.name }}/backups"
|
||||
|
||||
@@ -2,9 +2,9 @@ name: metallb
|
||||
is: metallb
|
||||
description: Bare metal load-balancer for Kubernetes
|
||||
version: v0.15.0
|
||||
namespace: metallb-system
|
||||
deploymentName: controller
|
||||
category: infrastructure
|
||||
defaultConfig:
|
||||
namespace: metallb-system
|
||||
ipAddressPool: "192.168.1.240-192.168.1.250"
|
||||
loadBalancerIp: "192.168.1.240"
|
||||
|
||||
@@ -2,11 +2,11 @@ name: nfs
|
||||
is: nfs
|
||||
description: NFS client provisioner for external NFS storage
|
||||
version: v4.0.18
|
||||
namespace: nfs
|
||||
deploymentName: ""
|
||||
storageClassName: "nfs"
|
||||
category: infrastructure
|
||||
defaultConfig:
|
||||
namespace: nfs
|
||||
host: "192.168.1.100"
|
||||
mediaPath: "/mnt/storage/media"
|
||||
storageCapacity: "1Ti"
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Ensure WILD_INSTANCE is set
|
||||
if [ -z "${WILD_INSTANCE}" ]; then
|
||||
echo "ERROR: WILD_INSTANCE is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure WILD_API_DATA_DIR is set
|
||||
if [ -z "${WILD_API_DATA_DIR}" ]; then
|
||||
echo "ERROR: WILD_API_DATA_DIR is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure KUBECONFIG is set
|
||||
if [ -z "${KUBECONFIG}" ]; then
|
||||
echo "ERROR: KUBECONFIG is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INSTANCE_DIR="${WILD_API_DATA_DIR}/instances/${WILD_INSTANCE}"
|
||||
NFD_DIR="${INSTANCE_DIR}/apps/node-feature-discovery"
|
||||
|
||||
echo "🔧 === Setting up Node Feature Discovery ==="
|
||||
echo ""
|
||||
|
||||
# Templates should already be compiled
|
||||
echo "📦 Using pre-compiled Node Feature Discovery templates..."
|
||||
if [ ! -f "${NFD_DIR}/kustomization.yaml" ]; then
|
||||
echo "❌ ERROR: Compiled templates not found at ${NFD_DIR}/kustomization.yaml"
|
||||
echo "Templates should be compiled before deployment."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "🚀 Deploying Node Feature Discovery..."
|
||||
kubectl apply -k "${NFD_DIR}/"
|
||||
|
||||
echo "⏳ Waiting for Node Feature Discovery DaemonSet to be ready..."
|
||||
kubectl rollout status daemonset/node-feature-discovery-worker -n node-feature-discovery --timeout=300s
|
||||
|
||||
echo ""
|
||||
echo "✅ Node Feature Discovery installed successfully"
|
||||
echo ""
|
||||
echo "💡 To verify the installation:"
|
||||
echo " kubectl get pods -n node-feature-discovery"
|
||||
echo " kubectl get nodes --show-labels | grep feature.node.kubernetes.io"
|
||||
echo ""
|
||||
echo "🎮 GPU nodes should now be labeled with GPU device information:"
|
||||
echo " kubectl get nodes --show-labels | grep pci-10de"
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: node-feature-discovery
|
||||
namespace: "{{ .namespace }}"
|
||||
labels:
|
||||
- pairs:
|
||||
app.kubernetes.io/name: node-feature-discovery
|
||||
|
||||
@@ -2,6 +2,7 @@ name: node-feature-discovery
|
||||
is: node-feature-discovery
|
||||
description: Detects hardware features available on each node
|
||||
version: v0.17.3
|
||||
namespace: node-feature-discovery
|
||||
deploymentName: node-feature-discovery-master
|
||||
category: infrastructure
|
||||
defaultConfig:
|
||||
namespace: node-feature-discovery
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: node-feature-discovery
|
||||
name: "{{ .namespace }}"
|
||||
labels:
|
||||
pod-security.kubernetes.io/enforce: privileged
|
||||
pod-security.kubernetes.io/audit: privileged
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: kube-system
|
||||
namespace: "{{ .namespace }}"
|
||||
resources:
|
||||
- daemonset.yaml
|
||||
- runtimeclass.yaml
|
||||
|
||||
@@ -2,8 +2,9 @@ name: nvidia-device-plugin
|
||||
is: nvidia-device-plugin
|
||||
description: NVIDIA device plugin for Kubernetes
|
||||
version: v0.17.1
|
||||
namespace: kube-system
|
||||
deploymentName: nvidia-device-plugin-daemonset
|
||||
category: infrastructure
|
||||
requires:
|
||||
- name: node-feature-discovery
|
||||
defaultConfig:
|
||||
namespace: kube-system
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Ensure WILD_INSTANCE is set
|
||||
if [ -z "${WILD_INSTANCE}" ]; then
|
||||
echo "❌ ERROR: WILD_INSTANCE is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure WILD_API_DATA_DIR is set
|
||||
if [ -z "${WILD_API_DATA_DIR}" ]; then
|
||||
echo "❌ ERROR: WILD_API_DATA_DIR is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure KUBECONFIG is set
|
||||
if [ -z "${KUBECONFIG}" ]; then
|
||||
echo "❌ ERROR: KUBECONFIG is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INSTANCE_DIR="${WILD_API_DATA_DIR}/instances/${WILD_INSTANCE}"
|
||||
SNAPSHOT_CONTROLLER_DIR="${INSTANCE_DIR}/apps/snapshot-controller"
|
||||
|
||||
echo "🔧 === Setting up Snapshot Controller ==="
|
||||
echo ""
|
||||
|
||||
# Templates should already be compiled
|
||||
echo "📦 Using pre-compiled snapshot-controller templates..."
|
||||
if [ ! -f "${SNAPSHOT_CONTROLLER_DIR}/kustomization.yaml" ]; then
|
||||
echo "❌ ERROR: Compiled templates not found at ${SNAPSHOT_CONTROLLER_DIR}/kustomization.yaml"
|
||||
echo "Templates should be compiled before deployment."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "🚀 Deploying Snapshot Controller..."
|
||||
kubectl apply -k ${SNAPSHOT_CONTROLLER_DIR}/
|
||||
|
||||
echo "⏳ Waiting for snapshot-controller to be ready..."
|
||||
kubectl wait --for=condition=available --timeout=300s deployment/snapshot-controller -n kube-system || true
|
||||
|
||||
# Check if VolumeSnapshot CRDs are installed
|
||||
echo "✔️ Checking VolumeSnapshot CRDs..."
|
||||
kubectl api-resources | grep -q "snapshot.storage.k8s.io" && echo "✅ VolumeSnapshot CRDs found" || echo "⚠️ VolumeSnapshot CRDs not found"
|
||||
|
||||
echo ""
|
||||
echo "✅ Snapshot Controller installed successfully"
|
||||
echo ""
|
||||
echo "💡 To verify the installation:"
|
||||
echo " kubectl get pods -n kube-system | grep snapshot-controller"
|
||||
echo " kubectl get crd | grep snapshot"
|
||||
echo ""
|
||||
echo "📘 To create a snapshot:"
|
||||
echo " kubectl apply -f - <<EOF"
|
||||
echo " apiVersion: snapshot.storage.k8s.io/v1"
|
||||
echo " kind: VolumeSnapshot"
|
||||
echo " metadata:"
|
||||
echo " name: test-snapshot"
|
||||
echo " namespace: default"
|
||||
echo " spec:"
|
||||
echo " volumeSnapshotClassName: longhorn-snapshot-class"
|
||||
echo " source:"
|
||||
echo " persistentVolumeClaimName: your-pvc"
|
||||
echo " EOF"
|
||||
echo ""
|
||||
@@ -2,6 +2,7 @@ name: snapshot-controller
|
||||
is: snapshot-controller
|
||||
description: Kubernetes CSI Snapshot Controller for managing VolumeSnapshots
|
||||
version: v8.1.0
|
||||
namespace: kube-system
|
||||
deploymentName: snapshot-controller
|
||||
category: infrastructure
|
||||
defaultConfig:
|
||||
namespace: kube-system
|
||||
|
||||
@@ -2,9 +2,9 @@ name: traefik
|
||||
is: traefik
|
||||
description: Cloud-native reverse proxy and ingress controller
|
||||
version: v3.4
|
||||
namespace: traefik
|
||||
category: infrastructure
|
||||
requires:
|
||||
- name: metallb
|
||||
defaultConfig:
|
||||
namespace: traefik
|
||||
loadBalancerIp: "{{ .apps.metallb.loadBalancerIp }}"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: traefik
|
||||
name: "{{ .namespace }}"
|
||||
|
||||
@@ -1,39 +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}"
|
||||
UTILS_DIR="${INSTANCE_DIR}/apps/utils"
|
||||
|
||||
echo "=== Setting up Cluster Utilities ==="
|
||||
echo ""
|
||||
|
||||
echo "Using compiled utils templates..."
|
||||
if [ ! -f "${UTILS_DIR}/kustomization.yaml" ]; then
|
||||
echo "ERROR: Compiled templates not found at ${UTILS_DIR}"
|
||||
echo "Templates should be compiled before deployment."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Applying utility manifests..."
|
||||
kubectl apply -k ${UTILS_DIR}/
|
||||
|
||||
echo ""
|
||||
echo "Cluster utilities installed successfully"
|
||||
echo ""
|
||||
echo "Utility resources have been deployed to the cluster"
|
||||
@@ -2,7 +2,6 @@ name: utils
|
||||
is: utils
|
||||
description: Utility tools and scripts for cluster administration
|
||||
version: v1.0.1
|
||||
namespace: debug
|
||||
deploymentName: netdebug
|
||||
category: infrastructure
|
||||
defaultConfig:
|
||||
|
||||
Reference in New Issue
Block a user