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:
20
longhorn/README.md
Normal file
20
longhorn/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Longhorn Storage
|
||||
|
||||
See: [Longhorn Docs v 1.8.1](https://longhorn.io/docs/1.8.1/deploy/install/install-with-kubectl/)
|
||||
|
||||
## Installation Notes
|
||||
|
||||
- Manifest copied from https://raw.githubusercontent.com/longhorn/longhorn/v1.8.1/deploy/longhorn.yaml
|
||||
- Using kustomize to apply custom configuration (see `kustomization.yaml`)
|
||||
|
||||
## Important Settings
|
||||
|
||||
- **Number of Replicas**: Set to 1 (default is 3) to accommodate smaller clusters
|
||||
- This avoids "degraded" volumes when fewer than 3 nodes are available
|
||||
- For production with 3+ nodes, consider changing back to 3 for better availability
|
||||
|
||||
## Common Operations
|
||||
|
||||
- View volumes: `kubectl get volumes.longhorn.io -n longhorn-system`
|
||||
- Check volume status: `kubectl describe volumes.longhorn.io <volume-name> -n longhorn-system`
|
||||
- Access Longhorn UI: Set up port-forwarding with `kubectl -n longhorn-system port-forward service/longhorn-frontend 8080:80`
|
||||
21
longhorn/ingress.yaml
Normal file
21
longhorn/ingress.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: longhorn-ingress
|
||||
namespace: longhorn-system
|
||||
spec:
|
||||
rules:
|
||||
- host: "longhorn.{{ .internalDomain }}"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: longhorn-frontend
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- secretName: wildcard-internal-wild-cloud-tls
|
||||
hosts:
|
||||
- "longhorn.{{ .internalDomain }}"
|
||||
47
longhorn/install.sh
Executable file
47
longhorn/install.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/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"
|
||||
7
longhorn/kustomization.yaml
Normal file
7
longhorn/kustomization.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- longhorn.yaml
|
||||
- ingress.yaml
|
||||
- volumesnapshotclass-longhorn.yaml
|
||||
5191
longhorn/longhorn.yaml
Normal file
5191
longhorn/longhorn.yaml
Normal file
File diff suppressed because it is too large
Load Diff
13
longhorn/manifest.yaml
Normal file
13
longhorn/manifest.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
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:
|
||||
internalDomain: "{{ .cloud.internalDomain }}"
|
||||
backupTarget: "nfs://{{ .apps.nfs.host }}:/data/{{ .cluster.name }}/backups"
|
||||
8
longhorn/volumesnapshotclass-longhorn.yaml
Normal file
8
longhorn/volumesnapshotclass-longhorn.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: snapshot.storage.k8s.io/v1
|
||||
kind: VolumeSnapshotClass
|
||||
metadata:
|
||||
name: longhorn-snapshot-class
|
||||
driver: driver.longhorn.io
|
||||
deletionPolicy: Delete
|
||||
parameters:
|
||||
type: snap
|
||||
Reference in New Issue
Block a user