feat(longhorn): Update backups and ingress

This commit is contained in:
Tanguy Herbron 2024-12-21 22:35:00 +01:00
parent 3948296901
commit 10079bf091
5 changed files with 69 additions and 20 deletions

View File

@ -1,24 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: longhorn-frontend
namespace: longhorn-system
annotations:
kubernetes.io/ingress.class: "traefik-inter"
name: longhorn-frontend
namespace: longhorn-system
spec:
tls:
- secretName: longhorn-beta-tls
hosts:
- longhorn.beta.entos
rules:
- host: longhorn.beta.entos
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: longhorn-frontend
port:
number: 80
ingressClassName: nginx-internal
rules:
- host: longhorn.entos
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: longhorn-frontend
port:
number: 80

View File

@ -3,3 +3,6 @@ kind: Kustomization
resources:
- ingress.yaml
- recurrent-backup.yaml
- secrets.yaml
- servicemonitor.yaml

View File

@ -0,0 +1,15 @@
apiVersion: longhorn.io/v1beta1
kind: RecurringJob
metadata:
name: hourly-backup
namespace: longhorn-system
spec:
cron: "0 * * * *"
task: backup
groups:
- standard-pvc
retain: 10
concurrency: 10
labels:
recurrence: hourly
group: standard-pvc

24
longhorn/secrets.yaml Normal file
View File

@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: longhorn-s3-secrets
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://git.halis.io/athens-school/k3s-secrets
targetRevision: prod-migration
path: longhorn
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=false
- ApplyOutOfSyncOnly=true
- PruneLast=true
destination:
server: https://kubernetes.default.svc
namespace: longhorn-system

View File

@ -0,0 +1,13 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: longhorn
namespace: longhorn-system
labels:
team: core
spec:
selector:
matchLabels:
app: longhorn-manager
endpoints:
- port: manager