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 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: longhorn-frontend name: longhorn-frontend
namespace: longhorn-system namespace: longhorn-system
annotations:
kubernetes.io/ingress.class: "traefik-inter"
spec: spec:
tls: ingressClassName: nginx-internal
- secretName: longhorn-beta-tls rules:
hosts: - host: longhorn.entos
- longhorn.beta.entos http:
rules: paths:
- host: longhorn.beta.entos - path: /
http: pathType: Prefix
paths: backend:
- path: / service:
pathType: Prefix name: longhorn-frontend
backend: port:
service: number: 80
name: longhorn-frontend
port:
number: 80

View File

@ -3,3 +3,6 @@ kind: Kustomization
resources: resources:
- ingress.yaml - 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