feat: update manifests and namespaces to use templated namespace variables
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user