feat: Move cluster services to wild-directory as unified packages
Convert all 15 cluster services from embedded API format to wild-directory packages using the unified manifest format: - metallb, traefik, cert-manager, longhorn, snapshot-controller - nfs, smtp, coredns, node-feature-discovery, nvidia-device-plugin - externaldns, docker-registry, headlamp, crowdsec, utils Changes: - wild-manifest.yaml → manifest.yaml with is, defaultConfig, requires - Eliminated configReferences and serviceConfig fields - Flattened kustomize.template/ to package root - Template vars use flat defaultConfig keys - install.sh paths updated for apps/ layout - Updated 9 app manifests: cloud.smtp.* → apps.smtp.* with requires - Removed dead install: true field from 6 app manifests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1
metallb/README.md
Normal file
1
metallb/README.md
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
3
metallb/configuration/kustomization.yaml
Normal file
3
metallb/configuration/kustomization.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace: metallb-system
|
||||
resources:
|
||||
- pool.yaml
|
||||
19
metallb/configuration/pool.yaml
Normal file
19
metallb/configuration/pool.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
apiVersion: metallb.io/v1beta1
|
||||
kind: IPAddressPool
|
||||
metadata:
|
||||
name: first-pool
|
||||
namespace: metallb-system
|
||||
spec:
|
||||
addresses:
|
||||
- {{ .ipAddressPool }}
|
||||
|
||||
---
|
||||
apiVersion: metallb.io/v1beta1
|
||||
kind: L2Advertisement
|
||||
metadata:
|
||||
name: l2-advertisement
|
||||
namespace: metallb-system
|
||||
spec:
|
||||
ipAddressPools:
|
||||
- first-pool
|
||||
51
metallb/install.sh
Executable file
51
metallb/install.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/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}"
|
||||
METALLB_DIR="${INSTANCE_DIR}/apps/metallb"
|
||||
|
||||
echo "=== Setting up MetalLB ==="
|
||||
echo ""
|
||||
|
||||
echo "Using compiled MetalLB templates..."
|
||||
if [ ! -f "${METALLB_DIR}/kustomization.yaml" ]; then
|
||||
echo "ERROR: Compiled templates not found at ${METALLB_DIR}"
|
||||
echo "Templates should be compiled before deployment."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Deploying MetalLB installation..."
|
||||
kubectl apply -k ${METALLB_DIR}/installation
|
||||
|
||||
echo "Waiting for MetalLB controller to be ready..."
|
||||
kubectl wait --for=condition=Available deployment/controller -n metallb-system --timeout=60s
|
||||
echo "Extra buffer for webhook initialization..."
|
||||
sleep 10
|
||||
|
||||
echo "Applying MetalLB configuration..."
|
||||
kubectl apply -k ${METALLB_DIR}/configuration
|
||||
|
||||
echo ""
|
||||
echo "MetalLB installed and configured successfully"
|
||||
echo ""
|
||||
echo "To verify the installation:"
|
||||
echo " kubectl get pods -n metallb-system"
|
||||
echo " kubectl get ipaddresspools.metallb.io -n metallb-system"
|
||||
echo ""
|
||||
echo "MetalLB will now provide LoadBalancer IPs for your services"
|
||||
3
metallb/installation/kustomization.yaml
Normal file
3
metallb/installation/kustomization.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
namespace: metallb-system
|
||||
resources:
|
||||
- github.com/metallb/metallb/config/native?ref=v0.15.0
|
||||
6
metallb/kustomization.yaml
Normal file
6
metallb/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- installation
|
||||
- configuration
|
||||
10
metallb/manifest.yaml
Normal file
10
metallb/manifest.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
name: metallb
|
||||
is: metallb
|
||||
description: Bare metal load-balancer for Kubernetes
|
||||
version: v0.15.0
|
||||
namespace: metallb-system
|
||||
deploymentName: controller
|
||||
category: infrastructure
|
||||
defaultConfig:
|
||||
ipAddressPool: "192.168.1.240-192.168.1.250"
|
||||
loadBalancerIp: "192.168.1.240"
|
||||
Reference in New Issue
Block a user