diff --git a/longhorn/ingress.yaml b/longhorn/ingress.yaml index a6a3c22..dc6332a 100644 --- a/longhorn/ingress.yaml +++ b/longhorn/ingress.yaml @@ -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 diff --git a/longhorn/kustomization.yaml b/longhorn/kustomization.yaml index 14d8f3a..4a19a22 100644 --- a/longhorn/kustomization.yaml +++ b/longhorn/kustomization.yaml @@ -3,3 +3,6 @@ kind: Kustomization resources: - ingress.yaml + - recurrent-backup.yaml + - secrets.yaml + - servicemonitor.yaml diff --git a/longhorn/recurrent-backup.yaml b/longhorn/recurrent-backup.yaml new file mode 100644 index 0000000..9729728 --- /dev/null +++ b/longhorn/recurrent-backup.yaml @@ -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 diff --git a/longhorn/secrets.yaml b/longhorn/secrets.yaml new file mode 100644 index 0000000..125199f --- /dev/null +++ b/longhorn/secrets.yaml @@ -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 diff --git a/longhorn/servicemonitor.yaml b/longhorn/servicemonitor.yaml new file mode 100644 index 0000000..07cb02d --- /dev/null +++ b/longhorn/servicemonitor.yaml @@ -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