feat!: Update Flux ks names and add volsync and snapshot-controller (#1036)

This commit is contained in:
Devin Buhl authored and GitHub committed 2023-11-23 17:49:40 -05:00
1 parent fc3c7b56af
commit 84574b2f64
89 files changed
+325 -91

No files matched your search

@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Pre Flux-Kustomizations
- ./namespace.yaml
# Flux-Kustomizations
- ./volsync/ks.yaml
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: volsync
labels:
kustomize.toolkit.fluxcd.io/prune: disabled
@@ -0,0 +1,42 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: volsync
spec:
interval: 30m
chart:
spec:
chart: volsync
version: 0.8.0
sourceRef:
kind: HelmRepository
name: backube
namespace: flux-system
maxHistory: 2
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
dependsOn:
- name: snapshot-controller
namespace: kube-system
values:
manageCRDs: true
image:
# https://github.com/backube/volsync/issues/828
repository: &image ghcr.io/onedr0p/volsync
tag: &tag 0.8.0
rclone:
repository: *image
tag: *tag
restic:
repository: *image
tag: *tag
metrics:
disableAuth: true
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ./prometheusrule.yaml
@@ -0,0 +1,27 @@
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: volsync
spec:
groups:
- name: volsync.rules
rules:
- alert: VolSyncComponentAbsent
annotations:
summary: VolSync component has disappeared from Prometheus target discovery.
expr: |
absent(up{job="volsync-metrics"})
for: 15m
labels:
severity: critical
- alert: VolSyncVolumeOutOfSync
annotations:
summary: >-
{{ $labels.obj_namespace }}/{{ $labels.obj_name }} volume
is out of sync.
expr: |
volsync_volume_out_of_sync == 1
for: 15m
labels:
severity: critical
@@ -0,0 +1,20 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app volsync
namespace: flux-system
spec:
targetNamespace: volsync
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/volsync/volsync/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m