diff --git a/cert-manager/manifest.yaml b/cert-manager/manifest.yaml index b6e6285..c887cd9 100644 --- a/cert-manager/manifest.yaml +++ b/cert-manager/manifest.yaml @@ -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 }}" diff --git a/cert-manager/namespace.yaml b/cert-manager/namespace.yaml index c90416f..b7816b8 100644 --- a/cert-manager/namespace.yaml +++ b/cert-manager/namespace.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: cert-manager + name: "{{ .namespace }}" diff --git a/coredns/manifest.yaml b/coredns/manifest.yaml index 6fce55e..7295d61 100644 --- a/coredns/manifest.yaml +++ b/coredns/manifest.yaml @@ -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" diff --git a/crowdsec/kustomization.yaml b/crowdsec/kustomization.yaml index 235425c..ef7046c 100644 --- a/crowdsec/kustomization.yaml +++ b/crowdsec/kustomization.yaml @@ -1,6 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: crowdsec +namespace: "{{ .namespace }}" labels: - includeSelectors: true pairs: diff --git a/crowdsec/manifest.yaml b/crowdsec/manifest.yaml index c1b7dd2..12341b9 100644 --- a/crowdsec/manifest.yaml +++ b/crowdsec/manifest.yaml @@ -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: diff --git a/crowdsec/namespace.yaml b/crowdsec/namespace.yaml index 6a2f796..765c75e 100644 --- a/crowdsec/namespace.yaml +++ b/crowdsec/namespace.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Namespace metadata: - name: crowdsec + name: "{{ .namespace }}" labels: app: crowdsec managedBy: kustomize diff --git a/docker-registry/install.sh b/docker-registry/install.sh deleted file mode 100755 index 41757d5..0000000 --- a/docker-registry/install.sh +++ /dev/null @@ -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" diff --git a/docker-registry/kustomization.yaml b/docker-registry/kustomization.yaml index 2271c5a..848522c 100644 --- a/docker-registry/kustomization.yaml +++ b/docker-registry/kustomization.yaml @@ -1,6 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: docker-registry +namespace: "{{ .namespace }}" labels: - includeSelectors: true pairs: diff --git a/docker-registry/manifest.yaml b/docker-registry/manifest.yaml index 01eec7c..1cc5460 100644 --- a/docker-registry/manifest.yaml +++ b/docker-registry/manifest.yaml @@ -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" diff --git a/docker-registry/namespace.yaml b/docker-registry/namespace.yaml index 4cd3252..b7816b8 100644 --- a/docker-registry/namespace.yaml +++ b/docker-registry/namespace.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: docker-registry + name: "{{ .namespace }}" diff --git a/externaldns/manifest.yaml b/externaldns/manifest.yaml index 1b0da60..32e611b 100644 --- a/externaldns/manifest.yaml +++ b/externaldns/manifest.yaml @@ -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 diff --git a/externaldns/namespace.yaml b/externaldns/namespace.yaml index e9b0ed6..b7816b8 100644 --- a/externaldns/namespace.yaml +++ b/externaldns/namespace.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: externaldns + name: "{{ .namespace }}" diff --git a/headlamp/kustomization.yaml b/headlamp/kustomization.yaml index af059cd..f157e87 100644 --- a/headlamp/kustomization.yaml +++ b/headlamp/kustomization.yaml @@ -1,6 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: headlamp +namespace: "{{ .namespace }}" labels: - includeSelectors: true pairs: diff --git a/headlamp/manifest.yaml b/headlamp/manifest.yaml index 956e2cf..5766db4 100644 --- a/headlamp/manifest.yaml +++ b/headlamp/manifest.yaml @@ -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 }}" diff --git a/headlamp/namespace.yaml b/headlamp/namespace.yaml index 6f6c133..b7816b8 100644 --- a/headlamp/namespace.yaml +++ b/headlamp/namespace.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: headlamp + name: "{{ .namespace }}" diff --git a/longhorn/install.sh b/longhorn/install.sh deleted file mode 100755 index 22b3b06..0000000 --- a/longhorn/install.sh +++ /dev/null @@ -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" diff --git a/longhorn/manifest.yaml b/longhorn/manifest.yaml index 6a002d3..d3638a6 100644 --- a/longhorn/manifest.yaml +++ b/longhorn/manifest.yaml @@ -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" diff --git a/metallb/manifest.yaml b/metallb/manifest.yaml index e03b7cc..70ed30e 100644 --- a/metallb/manifest.yaml +++ b/metallb/manifest.yaml @@ -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" diff --git a/nfs/manifest.yaml b/nfs/manifest.yaml index a15da31..8b669a0 100644 --- a/nfs/manifest.yaml +++ b/nfs/manifest.yaml @@ -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" diff --git a/node-feature-discovery/install.sh b/node-feature-discovery/install.sh deleted file mode 100755 index 4a7d6bb..0000000 --- a/node-feature-discovery/install.sh +++ /dev/null @@ -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" diff --git a/node-feature-discovery/kustomization.yaml b/node-feature-discovery/kustomization.yaml index 7d32cf0..6e9e8e9 100644 --- a/node-feature-discovery/kustomization.yaml +++ b/node-feature-discovery/kustomization.yaml @@ -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 diff --git a/node-feature-discovery/manifest.yaml b/node-feature-discovery/manifest.yaml index b33a73e..5e46b1d 100644 --- a/node-feature-discovery/manifest.yaml +++ b/node-feature-discovery/manifest.yaml @@ -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 diff --git a/node-feature-discovery/namespace.yaml b/node-feature-discovery/namespace.yaml index 75867e7..ff0ca11 100644 --- a/node-feature-discovery/namespace.yaml +++ b/node-feature-discovery/namespace.yaml @@ -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 diff --git a/nvidia-device-plugin/kustomization.yaml b/nvidia-device-plugin/kustomization.yaml index c402fd6..88face4 100644 --- a/nvidia-device-plugin/kustomization.yaml +++ b/nvidia-device-plugin/kustomization.yaml @@ -1,6 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: kube-system +namespace: "{{ .namespace }}" resources: - daemonset.yaml - runtimeclass.yaml diff --git a/nvidia-device-plugin/manifest.yaml b/nvidia-device-plugin/manifest.yaml index dc16b1d..c54eb95 100644 --- a/nvidia-device-plugin/manifest.yaml +++ b/nvidia-device-plugin/manifest.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 diff --git a/snapshot-controller/install.sh b/snapshot-controller/install.sh deleted file mode 100755 index b2c03a7..0000000 --- a/snapshot-controller/install.sh +++ /dev/null @@ -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 - <