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
utils/README.md
Normal file
1
utils/README.md
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
39
utils/install.sh
Executable file
39
utils/install.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/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"
|
||||
5
utils/kustomization.yaml
Normal file
5
utils/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- netdebug.yaml
|
||||
9
utils/manifest.yaml
Normal file
9
utils/manifest.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
name: utils
|
||||
is: utils
|
||||
description: Utility tools and scripts for cluster administration
|
||||
version: v1.0.1
|
||||
namespace: debug
|
||||
deploymentName: netdebug
|
||||
category: infrastructure
|
||||
defaultConfig:
|
||||
namespace: debug
|
||||
73
utils/netdebug.yaml
Normal file
73
utils/netdebug.yaml
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: debug
|
||||
labels:
|
||||
pod-security.kubernetes.io/enforce: privileged
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: netdebug
|
||||
namespace: debug
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: netdebug
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: netdebug
|
||||
namespace: debug
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: cluster-admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: netdebug
|
||||
namespace: debug
|
||||
labels:
|
||||
app: netdebug
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: netdebug
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: netdebug
|
||||
spec:
|
||||
serviceAccountName: netdebug
|
||||
containers:
|
||||
- name: netdebug
|
||||
image: nicolaka/netshoot:latest
|
||||
command: ["/bin/bash"]
|
||||
args: ["-c", "while true; do sleep 3600; done"]
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
securityContext:
|
||||
privileged: true
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: netdebug
|
||||
namespace: debug
|
||||
spec:
|
||||
selector:
|
||||
app: netdebug
|
||||
ports:
|
||||
- port: 22
|
||||
targetPort: 22
|
||||
name: ssh
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user