diff --git a/kubernetes/apps/system/kustomization.yaml b/kubernetes/apps/system/kustomization.yaml index bbfd6492..948b8349 100644 --- a/kubernetes/apps/system/kustomization.yaml +++ b/kubernetes/apps/system/kustomization.yaml @@ -9,3 +9,4 @@ resources: - ./node-feature-discovery/ks.yaml - ./reloader/ks.yaml - ./snapshot-controller/ks.yaml + - ./volsync/ks.yaml diff --git a/kubernetes/apps/system/volsync/app/helmrelease.yaml b/kubernetes/apps/system/volsync/app/helmrelease.yaml new file mode 100644 index 00000000..9c2420b7 --- /dev/null +++ b/kubernetes/apps/system/volsync/app/helmrelease.yaml @@ -0,0 +1,37 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta2.json +apiVersion: helm.toolkit.fluxcd.io/v2beta2 +kind: HelmRelease +metadata: + name: volsync +spec: + interval: 30m + chart: + spec: + chart: volsync + version: 0.8.0 + sourceRef: + kind: HelmRepository + name: backube + namespace: flux-system + interval: 30m + values: + manageCRDs: true + metrics: + disableAuth: true + + # TODO: Refactor if/when https://github.com/backube/volsync/pull/1054 gets merged + postRenderers: + - kustomize: + patches: + - target: + version: v1 + kind: Deployment + name: volsync + patch: | + - op: add + path: /spec/template/metadata/labels/egress.home.arpa~1apiserver + value: allow + - op: add + path: /spec/template/metadata/labels/egress.home.arpa~1kubedns + value: allow diff --git a/kubernetes/apps/system/volsync/app/kustomization.yaml b/kubernetes/apps/system/volsync/app/kustomization.yaml new file mode 100644 index 00000000..fbba51d1 --- /dev/null +++ b/kubernetes/apps/system/volsync/app/kustomization.yaml @@ -0,0 +1,6 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml diff --git a/kubernetes/apps/system/volsync/ks.yaml b/kubernetes/apps/system/volsync/ks.yaml new file mode 100644 index 00000000..afe610a2 --- /dev/null +++ b/kubernetes/apps/system/volsync/ks.yaml @@ -0,0 +1,22 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &appname volsync + namespace: flux-system +spec: + targetNamespace: system + commonMetadata: + labels: + app.kubernetes.io/name: *appname + interval: 10m + path: "./kubernetes/apps/system/volsync/app" + prune: true + sourceRef: + kind: GitRepository + name: homelab + dependsOn: + - name: snapshot-controller + wait: false + timeout: 2m