Compare commits
4 Commits
wip/certmg
...
a551f2e4ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a551f2e4ca | ||
|
|
a80dce42b0 | ||
|
|
63243c6d2e | ||
|
|
1f9f7e275c |
@@ -167,7 +167,8 @@ Mit diesen Schritten hast du ein Persistent Volume (PV) und einen Persistent Vol
|
|||||||
|
|
||||||
|
|
||||||
## Disable Localpath as default
|
## Disable Localpath as default
|
||||||
|
```
|
||||||
kubectl get storageclass
|
kubectl get storageclass
|
||||||
|
|
||||||
kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
|
kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
|
||||||
|
```
|
||||||
1
Longhorn/auth
Normal file
1
Longhorn/auth
Normal file
@@ -0,0 +1 @@
|
|||||||
|
basti:$apr1$N23gJpBe$CYlDcwTfp8YsQMq0UcADQ0
|
||||||
62
Longhorn/justfile
Normal file
62
Longhorn/justfile
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
set fallback:=true
|
||||||
|
|
||||||
|
export LONGHORN_NAMESPACE := env("LONGHORN_NAMESPACE","longhorn-system")
|
||||||
|
|
||||||
|
add-helm-repo:
|
||||||
|
helm repo add longhorn https://charts.longhorn.io --force-update
|
||||||
|
helm repo update
|
||||||
|
|
||||||
|
# Delete namespace
|
||||||
|
delete-namespace:
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
if kubectl get namespace ${LONGHORN_NAMESPACE} &>/dev/null; then
|
||||||
|
kubectl delete namespace ${LONGHORN_NAMESPACE} --ignore-not-found
|
||||||
|
else
|
||||||
|
echo "Namespace ${LONGHORN_NAMESPACE} does not exist."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
install:
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
just env::check
|
||||||
|
|
||||||
|
just add-helm-repo
|
||||||
|
|
||||||
|
helm upgrade longhorn longhorn/longhorn \
|
||||||
|
--install \
|
||||||
|
--cleanup-on-fail \
|
||||||
|
--namespace ${LONGHORN_NAMESPACE} \
|
||||||
|
--create-namespace \
|
||||||
|
--values longhorn-values.yaml
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
for crd in $(kubectl get crd -o name | grep longhorn); do
|
||||||
|
kubectl patch $crd -p '{"metadata":{"finalizers":[]}}' --type=merge
|
||||||
|
done
|
||||||
|
|
||||||
|
kubectl -n ${LONGHORN_NAMESPACE} patch -p '{"value": "true"}' --type=merge lhs deleting-confirmation-flag || true
|
||||||
|
|
||||||
|
helm uninstall longhorn --namespace ${LONGHORN_NAMESPACE} || true
|
||||||
|
just delete-namespace
|
||||||
|
|
||||||
|
|
||||||
|
install-dashboard-ingress:
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
just env::check
|
||||||
|
|
||||||
|
echo "Deploying Longhorn Dashboard Ingress with EXTERNAL_DOMAIN=${EXTERNAL_DOMAIN}"
|
||||||
|
gomplate -f longhorn-certificate-gomplate.yaml | kubectl apply -f -
|
||||||
|
gomplate -f longhorn-ingressroute-gomplate.yaml | kubectl apply -f -
|
||||||
|
|
||||||
|
uninstall-dashboard-ingress:
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
kubectl delete -f longhorn-ingressroute-gomplate.yaml || true
|
||||||
|
kubectl delete -f longhorn-certificate-gomplate.yaml || true
|
||||||
@@ -7,7 +7,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
secretName: longhorn-web-ui-tls
|
secretName: longhorn-web-ui-tls
|
||||||
dnsNames:
|
dnsNames:
|
||||||
- longhorn-dashboard.k8s.schnrbs.work
|
- longhorn-dashboard.{{.Env.EXTERNAL_DOMAIN}}
|
||||||
issuerRef:
|
issuerRef:
|
||||||
name: cloudflare-cluster-issuer
|
name: cloudflare-cluster-issuer
|
||||||
kind: ClusterIssuer
|
kind: ClusterIssuer
|
||||||
@@ -7,7 +7,7 @@ spec:
|
|||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- match: Host(`longhorn-dashboard.k8s.schnrbs.work`)
|
- match: Host(`longhorn-dashboard.{{.Env.EXTERNAL_DOMAIN}}`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
services:
|
services:
|
||||||
- name: longhorn-frontend
|
- name: longhorn-frontend
|
||||||
@@ -1,18 +1,6 @@
|
|||||||
global:
|
|
||||||
nodeSelector:
|
|
||||||
node.longhorn.io/create-default-disk: "true"
|
|
||||||
|
|
||||||
service:
|
|
||||||
ui:
|
|
||||||
type: NodePort
|
|
||||||
nodePort: 30050
|
|
||||||
manager:
|
|
||||||
type: ClusterIP
|
|
||||||
|
|
||||||
# Replica count for the default Longhorn StorageClass.
|
# Replica count for the default Longhorn StorageClass.
|
||||||
persistence:
|
persistence:
|
||||||
defaultClass: false
|
|
||||||
defaultFsType: ext4
|
|
||||||
defaultClassReplicaCount: 2
|
defaultClassReplicaCount: 2
|
||||||
reclaimPolicy: Delete
|
reclaimPolicy: Delete
|
||||||
|
|
||||||
@@ -25,12 +13,10 @@ csi:
|
|||||||
|
|
||||||
# Default replica count and storage path
|
# Default replica count and storage path
|
||||||
defaultSettings:
|
defaultSettings:
|
||||||
upgradeChecker: false
|
|
||||||
kubernetesClusterAutoscalerEnabled: false
|
kubernetesClusterAutoscalerEnabled: false
|
||||||
allowCollectingLonghornUsageMetrics: false
|
allowCollectingLonghornUsageMetrics: false
|
||||||
createDefaultDiskLabeledNodes: true
|
|
||||||
defaultReplicaCount: 2
|
defaultReplicaCount: 2
|
||||||
defaultDataPath: "/k8s-data"
|
# defaultDataPath: "/k8s-data"
|
||||||
|
|
||||||
longhornUI:
|
longhornUI:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
37
Test-Deployment/justfile
Normal file
37
Test-Deployment/justfile
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
set fallback:=true
|
||||||
|
|
||||||
|
export EXTERNAL := env("EXTERNAL_DOMAIN", "")
|
||||||
|
|
||||||
|
install-nginx:
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
just env::check
|
||||||
|
|
||||||
|
if [ -z "${EXTERNAL}" ]; then
|
||||||
|
echo "ERROR: EXTERNAL_DOMAIN environment variable is not set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
kubectl apply -f nginx-deployment.yaml
|
||||||
|
gomplate -f nginx-certificate-gomplate.yaml | kubectl apply -f -
|
||||||
|
gomplate -f nginx-ingress-route-gomplate.yaml | kubectl apply -f -
|
||||||
|
|
||||||
|
install-dishes:
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
just env::check
|
||||||
|
|
||||||
|
if [ -z "${EXTERNAL}" ]; then
|
||||||
|
echo "ERROR: EXTERNAL_DOMAIN environment variable is not set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
kubectl apply -f dishes-deployment.yaml
|
||||||
|
gomplate -f dishes-certificate-gomplate.yaml | kubectl apply -f -
|
||||||
|
gomplate -f dishes-ingress-route-gomplate.yaml | kubectl apply -f -
|
||||||
|
|
||||||
|
remove-nginx:
|
||||||
|
kubectl delete ns test || true
|
||||||
|
|
||||||
|
remove-dishes:
|
||||||
|
kubectl delete ns dishes || true
|
||||||
3
justfile
3
justfile
@@ -9,4 +9,5 @@ default:
|
|||||||
mod env
|
mod env
|
||||||
mod BasicSetup '01_Basic_Setup'
|
mod BasicSetup '01_Basic_Setup'
|
||||||
mod MetalLbSetup 'Metallb_Setup'
|
mod MetalLbSetup 'Metallb_Setup'
|
||||||
mod Traefik
|
mod Traefik
|
||||||
|
mod Longhorn
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: longhorn-web-ui
|
|
||||||
namespace: longhorn-system
|
|
||||||
annotations:
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
- host: longhorn.k8s.internal.schnrbs.work
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: longhorn-frontend
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- longhorn.k8s.internal.schnrbs.work
|
|
||||||
secretName: longhorn-web-ui-tls
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user