generated from onedr0p/cluster-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storage): install restic rest-server (#1593)
- Loading branch information
1 parent
b774967
commit c5c60dc
Showing
5 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ resources: | |
- ./filebrowser/ks.yaml | ||
- ./kopia/ks.yaml | ||
- ./minio/ks.yaml | ||
- ./restic/ks.yaml | ||
- ./zot/ks.yaml |
14 changes: 14 additions & 0 deletions
14
kubernetes/storage/apps/default/restic/app/certificate.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.18b.haus/cert-manager.io/certificate_v1.json | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: restic | ||
spec: | ||
secretName: restic-tls | ||
issuerRef: | ||
name: letsencrypt-production | ||
kind: ClusterIssuer | ||
commonName: restic.18b.haus | ||
dnsNames: | ||
- restic.18b.haus |
82 changes: 82 additions & 0 deletions
82
kubernetes/storage/apps/default/restic/app/helmrelease.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json | ||
apiVersion: helm.toolkit.fluxcd.io/v2 | ||
kind: HelmRelease | ||
metadata: | ||
name: restic | ||
spec: | ||
interval: 2h | ||
chart: | ||
spec: | ||
chart: app-template | ||
version: 3.5.1 | ||
interval: 30m | ||
sourceRef: | ||
kind: HelmRepository | ||
name: bjw-s | ||
namespace: flux-system | ||
values: | ||
controllers: | ||
restic: | ||
annotations: | ||
reloader.stakater.com/auto: "true" | ||
containers: | ||
app: | ||
image: | ||
repository: docker.io/restic/rest-server | ||
tag: 0.13.0 | ||
env: | ||
OPTIONS: > | ||
--listen 0.0.0.0:443 | ||
--private-repos | ||
--prometheus | ||
--prometheus-no-auth | ||
--tls | ||
--tls-cert /certs/tls.crt | ||
--tls-key /certs/tls.key | ||
probes: | ||
liveness: | ||
enabled: false | ||
readiness: | ||
enabled: false | ||
startup: | ||
enabled: false | ||
resources: | ||
requests: | ||
cpu: 5m | ||
memory: 128Mi | ||
securityContext: | ||
privileged: true | ||
runAsUser: 0 | ||
service: | ||
app: | ||
controller: restic | ||
type: LoadBalancer | ||
annotations: | ||
external-dns.alpha.kubernetes.io/hostname: restic.18b.haus | ||
io.cilium/lb-ipam-ips: 192.168.40.156 | ||
ports: | ||
https: | ||
port: 443 | ||
serviceMonitor: | ||
app: | ||
serviceName: restic | ||
endpoints: | ||
- port: metrics | ||
scheme: http | ||
path: /metrics | ||
interval: 1m | ||
scrapeTimeout: 10s | ||
persistence: | ||
certs: | ||
type: secret | ||
name: restic-tls | ||
globalMounts: | ||
- path: /certs | ||
readOnly: true | ||
repository: | ||
type: hostPath | ||
hostPath: /io/restic | ||
hostPathType: Directory | ||
globalMounts: | ||
- path: /data |
7 changes: 7 additions & 0 deletions
7
kubernetes/storage/apps/default/restic/app/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./certificate.yaml | ||
- ./helmrelease.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: &app restic | ||
namespace: flux-system | ||
spec: | ||
targetNamespace: default | ||
commonMetadata: | ||
labels: | ||
app.kubernetes.io/name: *app | ||
dependsOn: | ||
- name: cert-manager-issuers | ||
path: ./kubernetes/storage/apps/default/restic/app | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: home-kubernetes | ||
wait: false | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 5m |