Compare commits
4
Commits
fb4c6966af
...
fcba03f3d0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcba03f3d0 | ||
|
|
8ba503ca5d | ||
|
|
3b78dfec41 | ||
|
|
8509fff746 |
@@ -65,6 +65,7 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
lib' = import ./lib { inherit (top.nixunstable) lib; };
|
||||||
in
|
in
|
||||||
top.flake-parts.lib.mkFlake { inputs = top; } {
|
top.flake-parts.lib.mkFlake { inputs = top; } {
|
||||||
inherit systems;
|
inherit systems;
|
||||||
@@ -76,6 +77,7 @@
|
|||||||
nixpkgs = imported_packages.x86_64-linux;
|
nixpkgs = imported_packages.x86_64-linux;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit
|
inherit
|
||||||
|
lib'
|
||||||
metadata
|
metadata
|
||||||
self
|
self
|
||||||
top
|
top
|
||||||
@@ -112,7 +114,7 @@
|
|||||||
|
|
||||||
nixosConfigurations = (
|
nixosConfigurations = (
|
||||||
import ./hosts {
|
import ./hosts {
|
||||||
inherit top metadata;
|
inherit top metadata lib';
|
||||||
nixpkgs = imported_packages;
|
nixpkgs = imported_packages;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
top,
|
top,
|
||||||
|
lib',
|
||||||
metadata,
|
metadata,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
}:
|
}:
|
||||||
@@ -18,7 +19,7 @@ let
|
|||||||
channel.lib.nixosSystem {
|
channel.lib.nixosSystem {
|
||||||
pkgs = nixpkgs.${system};
|
pkgs = nixpkgs.${system};
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit metadata top;
|
inherit metadata top lib';
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
lib,
|
||||||
|
lib',
|
||||||
metadata,
|
metadata,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -9,7 +11,6 @@ let
|
|||||||
lanIP = metadata.hosts.${config.networking.hostName}.ip;
|
lanIP = metadata.hosts.${config.networking.hostName}.ip;
|
||||||
iot = "enp2s0";
|
iot = "enp2s0";
|
||||||
iotIP = "192.168.66.250";
|
iotIP = "192.168.66.250";
|
||||||
#routerIP = metadata.infra.gw;
|
|
||||||
extraHosts = builtins.readFile ./net/hosts;
|
extraHosts = builtins.readFile ./net/hosts;
|
||||||
|
|
||||||
proxyPort = 3128;
|
proxyPort = 3128;
|
||||||
@@ -84,17 +85,42 @@ in
|
|||||||
#########
|
#########
|
||||||
# dnsmasq config
|
# dnsmasq config
|
||||||
########
|
########
|
||||||
dnsmasq = {
|
bind = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
cacheNetworks = [
|
||||||
domain = "thehellings.lan";
|
metadata.infra.lan
|
||||||
expand-hosts = true;
|
metadata.infra.tailscale
|
||||||
log-queries = true;
|
metadata.infra.nebula
|
||||||
no-hosts = true; # Do not read /etc/hosts, which makes genesis resolve to 127.0.0.2
|
];
|
||||||
addn-hosts = "/etc/adblock_hosts";
|
zones =
|
||||||
hostsdir = "/etc/hosts.d/";
|
let
|
||||||
server = dnsServers;
|
makeZoneFile =
|
||||||
};
|
hosts: domain:
|
||||||
|
let
|
||||||
|
preamble = [
|
||||||
|
"$ORIGIN\t${domain}."
|
||||||
|
"$TTL\t1h"
|
||||||
|
"@\tIN\tSOA\t${config.networking.hostName}\tgreg@thehellings.com (1 1m 1m 1m 1m)"
|
||||||
|
"\tIN\tNS\t${config.networking.hostName}"
|
||||||
|
];
|
||||||
|
makeHost = host: "${host.name}\tIN\tA\t${host.address}";
|
||||||
|
in
|
||||||
|
pkgs.writeText "${domain}" (
|
||||||
|
builtins.concatStringsSep "\n" (preamble ++ (lib.map makeHost hosts) ++ [ "" ])
|
||||||
|
);
|
||||||
|
in
|
||||||
|
lib.mapAttrs
|
||||||
|
(domain: net: {
|
||||||
|
master = true;
|
||||||
|
file = makeZoneFile (lib'.hostsByNet net metadata.hosts) domain;
|
||||||
|
})
|
||||||
|
{
|
||||||
|
"shire-zebra.ts.net" = "tailscale";
|
||||||
|
"nebula.thehellings.com" = "nebula";
|
||||||
|
nebula = "nebula";
|
||||||
|
"thehellings.lan" = "lan";
|
||||||
|
lan = "lan";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
prometheus.exporters = {
|
prometheus.exporters = {
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
hostsByNet =
|
||||||
|
net: hosts:
|
||||||
|
let
|
||||||
|
netAttr =
|
||||||
|
{
|
||||||
|
lan = "ip";
|
||||||
|
nebula = "nebulaIp";
|
||||||
|
tailscale = "ts";
|
||||||
|
}
|
||||||
|
.${net};
|
||||||
|
in
|
||||||
|
lib.mapAttrsToList
|
||||||
|
(name: value: {
|
||||||
|
inherit name;
|
||||||
|
address = builtins.getAttr netAttr value;
|
||||||
|
})
|
||||||
|
(
|
||||||
|
lib.filterAttrs (
|
||||||
|
_host: settings: (builtins.hasAttr netAttr settings) && (builtins.getAttr netAttr settings) != null
|
||||||
|
) hosts
|
||||||
|
);
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
@@ -1,32 +1,21 @@
|
|||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
metadata:
|
metadata:
|
||||||
name: kubernetes-dashboard
|
name: headlamp
|
||||||
spec:
|
spec:
|
||||||
url: https://kubernetes.github.io/dashboard/
|
url: "https://kubernetes-sigs.github.io/headlamp/"
|
||||||
interval: "24h"
|
interval: "24h"
|
||||||
---
|
---
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: HelmRelease
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: kubernetes-dashboard
|
name: headlamp
|
||||||
spec:
|
spec:
|
||||||
interval: "24h"
|
interval: "24h"
|
||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: kubernetes-dashboard
|
chart: headlamp
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: kubernetes-dashboard
|
name: headlamp
|
||||||
interval: "24h"
|
interval: "24h"
|
||||||
values:
|
|
||||||
app:
|
|
||||||
settings:
|
|
||||||
global:
|
|
||||||
clusterName: Hellings Home
|
|
||||||
itemsPerPage: 25
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
hosts:
|
|
||||||
- dashboard.shire-zebra.ts.net
|
|
||||||
ingressClassName: tailscale
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: dashboard-tailscale
|
||||||
|
spec:
|
||||||
|
ingressClassName: tailscale
|
||||||
|
defaultBackend:
|
||||||
|
service:
|
||||||
|
name: headlamp
|
||||||
|
port:
|
||||||
|
number: 3001
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- headlamp
|
||||||
@@ -4,3 +4,4 @@ resources:
|
|||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- chart.yaml
|
- chart.yaml
|
||||||
- user.yaml
|
- user.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
|||||||
@@ -1,89 +0,0 @@
|
|||||||
apiVersion: postgresql.cnpg.io/v1
|
|
||||||
kind: Cluster
|
|
||||||
metadata:
|
|
||||||
name: immich
|
|
||||||
spec:
|
|
||||||
imageName: "ghcr.io/corentingiraud/cnpg-pgvector-vectorchord:16-migration"
|
|
||||||
#imageName: "ghcr.io/tensorchord/cloudnative-pgvecto.rs:16-v0.3.0"
|
|
||||||
#postgresUID: 1
|
|
||||||
instances: 1
|
|
||||||
storage:
|
|
||||||
size: 60Gi
|
|
||||||
primaryUpdateStrategy: unsupervised
|
|
||||||
postgresql:
|
|
||||||
shared_preload_libraries:
|
|
||||||
- vectors.so
|
|
||||||
- vchord.so
|
|
||||||
|
|
||||||
bootstrap:
|
|
||||||
recovery:
|
|
||||||
source: origin
|
|
||||||
# initdb:
|
|
||||||
# database: immich
|
|
||||||
# owner: immich
|
|
||||||
# secret:
|
|
||||||
# name: postgres-user-immich
|
|
||||||
# dataChecksums: true
|
|
||||||
# postInitApplicationSQL:
|
|
||||||
# - ALTER SYSTEM SET search_path TO "$user", public, vectors;
|
|
||||||
# - SET search_path TO "$user", public, vectors;
|
|
||||||
# - CREATE EXTENSION IF NOT EXISTS "cube";
|
|
||||||
# - CREATE EXTENSION IF NOT EXISTS "earthdistance";
|
|
||||||
# - GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "immich";
|
|
||||||
|
|
||||||
externalClusters:
|
|
||||||
- name: origin
|
|
||||||
plugin:
|
|
||||||
name: barman-cloud.cloudnative-pg.io
|
|
||||||
parameters:
|
|
||||||
barmanObjectName: k3sbackup-objectstore
|
|
||||||
serverName: pgvector
|
|
||||||
|
|
||||||
managed:
|
|
||||||
roles:
|
|
||||||
- name: immich
|
|
||||||
ensure: present
|
|
||||||
comment: Immich DB user
|
|
||||||
login: true
|
|
||||||
superuser: true
|
|
||||||
passwordSecret:
|
|
||||||
name: postgres-user-immich
|
|
||||||
|
|
||||||
plugins:
|
|
||||||
- name: barman-cloud.cloudnative-pg.io
|
|
||||||
isWALArchiver: true
|
|
||||||
parameters:
|
|
||||||
barmanObjectName: k3sbackup-objectstore
|
|
||||||
---
|
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
|
||||||
kind: Database
|
|
||||||
metadata:
|
|
||||||
name: database-immich
|
|
||||||
spec:
|
|
||||||
name: immich
|
|
||||||
owner: immich
|
|
||||||
cluster:
|
|
||||||
name: immich
|
|
||||||
extensions:
|
|
||||||
- name: vectors
|
|
||||||
ensure: present
|
|
||||||
- name: vectorchord
|
|
||||||
ensure: present
|
|
||||||
- name: cube
|
|
||||||
ensure: present
|
|
||||||
- name: earthdistance
|
|
||||||
ensure: present
|
|
||||||
---
|
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
|
||||||
kind: ScheduledBackup
|
|
||||||
metadata:
|
|
||||||
name: immich-backup
|
|
||||||
spec:
|
|
||||||
immediate: true # Create one when this is added to the cluster
|
|
||||||
schedule: "0 2 0 * * *" # 1AM, nightly
|
|
||||||
backupOwnerReference: self
|
|
||||||
cluster:
|
|
||||||
name: immich
|
|
||||||
method: plugin
|
|
||||||
pluginConfiguration:
|
|
||||||
name: barman-cloud.cloudnative-pg.io
|
|
||||||
@@ -7,5 +7,4 @@ resources:
|
|||||||
- postgres-gitlab.yaml
|
- postgres-gitlab.yaml
|
||||||
- postgres-pgadmin.yaml
|
- postgres-pgadmin.yaml
|
||||||
- postgres-matrix.yaml
|
- postgres-matrix.yaml
|
||||||
- immich.yaml
|
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
|
|||||||
@@ -133,37 +133,3 @@ spec:
|
|||||||
remoteRef:
|
remoteRef:
|
||||||
key: 685b29c6-9264-4e60-ba4a-b2ea005a5d7b
|
key: 685b29c6-9264-4e60-ba4a-b2ea005a5d7b
|
||||||
property: password
|
property: password
|
||||||
---
|
|
||||||
apiVersion: external-secrets.io/v1
|
|
||||||
kind: ExternalSecret
|
|
||||||
metadata:
|
|
||||||
name: postgres-user-immich
|
|
||||||
namespace: db
|
|
||||||
spec:
|
|
||||||
target:
|
|
||||||
name: postgres-user-immich
|
|
||||||
deletionPolicy: Delete
|
|
||||||
template:
|
|
||||||
type: Opaque
|
|
||||||
data:
|
|
||||||
username: |-
|
|
||||||
{{ .username }}
|
|
||||||
password: |-
|
|
||||||
{{ .password }}
|
|
||||||
data:
|
|
||||||
- secretKey: username
|
|
||||||
sourceRef:
|
|
||||||
storeRef:
|
|
||||||
name: bitwarden-login
|
|
||||||
kind: ClusterSecretStore
|
|
||||||
remoteRef:
|
|
||||||
key: 5ce63e26-dd7f-46d4-b7ed-b310002ef93f
|
|
||||||
property: username
|
|
||||||
- secretKey: password
|
|
||||||
sourceRef:
|
|
||||||
storeRef:
|
|
||||||
name: bitwarden-login
|
|
||||||
kind: ClusterSecretStore
|
|
||||||
remoteRef:
|
|
||||||
key: 5ce63e26-dd7f-46d4-b7ed-b310002ef93f
|
|
||||||
property: password
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: gitea
|
chart: gitea
|
||||||
version: "12.5.0"
|
version: "12.5.3"
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: gitea-repository
|
name: gitea-repository
|
||||||
@@ -35,7 +35,7 @@ spec:
|
|||||||
storageClass: longhorn-default
|
storageClass: longhorn-default
|
||||||
|
|
||||||
image:
|
image:
|
||||||
tag: "1.25.4"
|
tag: "1.25.5"
|
||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ spec:
|
|||||||
USER={{ .dbuser }}
|
USER={{ .dbuser }}
|
||||||
PASSWD="""{{ .dbpass }}"""
|
PASSWD="""{{ .dbpass }}"""
|
||||||
storage: |-
|
storage: |-
|
||||||
MINIO_ACCESS_KEY_ID={{ .minio_key }}
|
MINIO_ACCESS_KEY_ID={{ .minio_nas1_key }}
|
||||||
MINIO_SECRET_ACCESS_KEY={{ .minio_secret }}
|
MINIO_SECRET_ACCESS_KEY={{ .minio_nas1_secret }}
|
||||||
minio_key: "{{ .minio_nas1_key }}"
|
#minio_key: "{{ .minio_nas1_key }}"
|
||||||
minio_secret: "{{ .minio_nas1_secret }}"
|
#minio_secret: "{{ .minio_nas1_secret }}"
|
||||||
secretStoreRef:
|
secretStoreRef:
|
||||||
name: bitwarden-login
|
name: bitwarden-login
|
||||||
kind: ClusterSecretStore
|
kind: ClusterSecretStore
|
||||||
|
|||||||
@@ -31,3 +31,6 @@ spec:
|
|||||||
crds:
|
crds:
|
||||||
create: true
|
create: true
|
||||||
includeCRDs: true
|
includeCRDs: true
|
||||||
|
webhook:
|
||||||
|
certManager:
|
||||||
|
enable: true
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ spec:
|
|||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: kyverno
|
chart: kyverno
|
||||||
version: "1.17.1"
|
version: "3.7.1"
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: kyverno
|
name: kyverno
|
||||||
|
|||||||
@@ -20,14 +20,14 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
interval: 10m
|
interval: 10m
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: tailscale-operator
|
- name: tailscale
|
||||||
namespace: tailscale
|
namespace: tailscale
|
||||||
- name: kyverno
|
- name: kyverno
|
||||||
namespace: kyverno
|
namespace: kyverno-system
|
||||||
chart:
|
chart:
|
||||||
spec:
|
spec:
|
||||||
chart: longhorn
|
chart: longhorn
|
||||||
version: "1.10.2"
|
version: "1.11.1"
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: HelmRepository
|
kind: HelmRepository
|
||||||
name: longhorn
|
name: longhorn
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
main:
|
main:
|
||||||
image:
|
image:
|
||||||
tag: v2.4.1
|
tag: v2.7.5
|
||||||
env:
|
env:
|
||||||
DB_HOSTNAME: immich-rw.db.svc.cluster.local
|
DB_HOSTNAME: immich-rw
|
||||||
DB_DATABASE_NAME: immich
|
DB_DATABASE_NAME: immich
|
||||||
DB_USERNAME:
|
DB_USERNAME:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|||||||
@@ -0,0 +1,161 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: immich
|
||||||
|
spec:
|
||||||
|
imageName: "ghcr.io/tensorchord/cloudnative-vectorchord:18"
|
||||||
|
#postgresUID: 1
|
||||||
|
instances: 1
|
||||||
|
storage:
|
||||||
|
size: 60Gi
|
||||||
|
primaryUpdateStrategy: unsupervised
|
||||||
|
postgresql:
|
||||||
|
shared_preload_libraries:
|
||||||
|
- vchord.so
|
||||||
|
|
||||||
|
bootstrap:
|
||||||
|
# Use these with the name "immich-1" to restore from the backups
|
||||||
|
recovery:
|
||||||
|
source: origin
|
||||||
|
# Use these two lines in order to restore from the other database,
|
||||||
|
# once it has restored from the WALs
|
||||||
|
#pg_basebackup:
|
||||||
|
# source: restore
|
||||||
|
# Use this block to bootstrap the cluster, if you don't have backups.
|
||||||
|
# What are you doing without backups, you chump?!
|
||||||
|
# initdb:
|
||||||
|
# database: immich
|
||||||
|
# owner: immich
|
||||||
|
# secret:
|
||||||
|
# name: postgres-user-immich
|
||||||
|
# dataChecksums: true
|
||||||
|
# postInitApplicationSQL:
|
||||||
|
# - ALTER SYSTEM SET search_path TO "$user", public, vectors;
|
||||||
|
# - SET search_path TO "$user", public, vectors;
|
||||||
|
# - CREATE EXTENSION IF NOT EXISTS "cube";
|
||||||
|
# - CREATE EXTENSION IF NOT EXISTS "earthdistance";
|
||||||
|
# - GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "immich";
|
||||||
|
|
||||||
|
externalClusters:
|
||||||
|
- name: origin
|
||||||
|
plugin:
|
||||||
|
name: barman-cloud.cloudnative-pg.io
|
||||||
|
parameters:
|
||||||
|
barmanObjectName: k3sbackup-objectstore
|
||||||
|
serverName: immich
|
||||||
|
- name: restore
|
||||||
|
connectionParameters:
|
||||||
|
host: immich-1-rw
|
||||||
|
user: streaming_replica
|
||||||
|
sslmode: verify-full
|
||||||
|
sslCert:
|
||||||
|
name: immich-1-replication
|
||||||
|
key: tls.crt
|
||||||
|
sslKey:
|
||||||
|
name: immich-1-replication
|
||||||
|
key: tls.key
|
||||||
|
sslRootCert:
|
||||||
|
name: immich-1-ca
|
||||||
|
key: ca.crt
|
||||||
|
|
||||||
|
managed:
|
||||||
|
roles:
|
||||||
|
- name: immich
|
||||||
|
ensure: present
|
||||||
|
comment: Immich DB user
|
||||||
|
login: true
|
||||||
|
superuser: true
|
||||||
|
passwordSecret:
|
||||||
|
name: postgres-user-immich
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- name: barman-cloud.cloudnative-pg.io
|
||||||
|
isWALArchiver: true
|
||||||
|
parameters:
|
||||||
|
barmanObjectName: k3sbackup-objectstore
|
||||||
|
---
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Database
|
||||||
|
metadata:
|
||||||
|
name: database-immich
|
||||||
|
spec:
|
||||||
|
name: immich
|
||||||
|
owner: immich
|
||||||
|
cluster:
|
||||||
|
name: immich
|
||||||
|
extensions:
|
||||||
|
- name: vectors
|
||||||
|
ensure: present
|
||||||
|
- name: vectorchord
|
||||||
|
ensure: present
|
||||||
|
- name: cube
|
||||||
|
ensure: present
|
||||||
|
- name: earthdistance
|
||||||
|
ensure: present
|
||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: k3sbackup-externalsecret
|
||||||
|
spec:
|
||||||
|
target:
|
||||||
|
name: k3sbackup-secret
|
||||||
|
deletionPolicy: Delete
|
||||||
|
template:
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
username: |-
|
||||||
|
{{ .username }}
|
||||||
|
password: |-
|
||||||
|
{{ .password }}
|
||||||
|
data:
|
||||||
|
- secretKey: username
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: bitwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: 685b29c6-9264-4e60-ba4a-b2ea005a5d7b
|
||||||
|
property: username
|
||||||
|
- secretKey: password
|
||||||
|
sourceRef:
|
||||||
|
storeRef:
|
||||||
|
name: bitwarden-login
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
remoteRef:
|
||||||
|
key: 685b29c6-9264-4e60-ba4a-b2ea005a5d7b
|
||||||
|
property: password
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: barmancloud.cnpg.io/v1
|
||||||
|
kind: ObjectStore
|
||||||
|
metadata:
|
||||||
|
name: k3sbackup-objectstore
|
||||||
|
spec:
|
||||||
|
configuration:
|
||||||
|
destinationPath: "s3://k3sbackup/postgres"
|
||||||
|
endpointURL: "http://chronicles.thehellings.lan:9000/"
|
||||||
|
s3Credentials:
|
||||||
|
accessKeyId:
|
||||||
|
name: k3sbackup-secret
|
||||||
|
key: username
|
||||||
|
secretAccessKey:
|
||||||
|
name: k3sbackup-secret
|
||||||
|
key: password
|
||||||
|
wal:
|
||||||
|
compression: gzip
|
||||||
|
retentionPolicy: "30d"
|
||||||
|
---
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: ScheduledBackup
|
||||||
|
metadata:
|
||||||
|
name: immich-backup
|
||||||
|
spec:
|
||||||
|
immediate: false # Create one when this is added to the cluster
|
||||||
|
schedule: "0 2 0 * * *" # 1AM, nightly
|
||||||
|
backupOwnerReference: self
|
||||||
|
cluster:
|
||||||
|
name: immich
|
||||||
|
method: plugin
|
||||||
|
pluginConfiguration:
|
||||||
|
name: barman-cloud.cloudnative-pg.io
|
||||||
@@ -2,8 +2,9 @@ namespace: immich
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- chart.yaml
|
|
||||||
- postgres-user-secret.yaml
|
- postgres-user-secret.yaml
|
||||||
|
- database.yaml
|
||||||
|
- chart.yaml
|
||||||
- pvc.yaml
|
- pvc.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
- backup.yaml
|
- backup.yaml
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
let
|
let
|
||||||
cfg = config.greg.kubernetes;
|
cfg = config.greg.kubernetes;
|
||||||
cert-manager = pkgs.fetchurl {
|
cert-manager = pkgs.fetchurl {
|
||||||
url = "https://github.com/cert-manager/cert-manager/releases/download/v1.18.2/cert-manager.yaml";
|
url = "https://github.com/cert-manager/cert-manager/releases/download/v1.20.2/cert-manager.yaml";
|
||||||
sha256 = "0vx1nfyhl0rzb6psfxplq8pfp18mrrdk83n8rj2ph8q6r15vcih5";
|
sha256 = "sha256-HOEcrpEq3sxp5rtiNDX6/J7SFQX57/+YvXHXuA8B2x8=";
|
||||||
};
|
};
|
||||||
flux = pkgs.fetchurl {
|
flux = pkgs.fetchurl {
|
||||||
url = "https://github.com/fluxcd/flux2/releases/download/v2.7.2/install.yaml";
|
url = "https://github.com/fluxcd/flux2/releases/download/v2.7.2/install.yaml";
|
||||||
|
|||||||
+8
-1
@@ -2,8 +2,11 @@
|
|||||||
"infra": {
|
"infra": {
|
||||||
"dns": "10.42.1.5",
|
"dns": "10.42.1.5",
|
||||||
"gw": "10.42.1.1",
|
"gw": "10.42.1.1",
|
||||||
|
"lan": "10.42.0.0/16",
|
||||||
"netmask": "255.255.0.0",
|
"netmask": "255.255.0.0",
|
||||||
"prefix": "16"
|
"nebula": "10.157.0.0/16",
|
||||||
|
"prefix": "16",
|
||||||
|
"tailscale": "100.64.0.0/10"
|
||||||
},
|
},
|
||||||
"hosts": {
|
"hosts": {
|
||||||
"chronicles": {
|
"chronicles": {
|
||||||
@@ -110,6 +113,10 @@
|
|||||||
"external": true,
|
"external": true,
|
||||||
"system": "x86_64-linux"
|
"system": "x86_64-linux"
|
||||||
},
|
},
|
||||||
|
"printer": {
|
||||||
|
"external": true,
|
||||||
|
"ip": "10.42.1.3"
|
||||||
|
},
|
||||||
"proxmoxtemplate": {
|
"proxmoxtemplate": {
|
||||||
"external": true,
|
"external": true,
|
||||||
"system": "x86_64-linux"
|
"system": "x86_64-linux"
|
||||||
|
|||||||
Reference in New Issue
Block a user