Compare commits
11 Commits
f1b24f2fef
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
d5e336c80b
|
|||
|
28dab8e5f4
|
|||
|
fad4d94dc0
|
|||
|
bf226ea855
|
|||
|
dd873c296d
|
|||
|
e0babc5b5f
|
|||
|
995eddb4e8
|
|||
|
e2bd3ae33f
|
|||
|
35472754c0
|
|||
|
9154fafaef
|
|||
|
c0b51106f2
|
16
apps/lldap/base/cluster-restore.yaml
Normal file
16
apps/lldap/base/cluster-restore.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: lldap-db
|
||||||
|
spec:
|
||||||
|
bootstrap:
|
||||||
|
recovery:
|
||||||
|
source: source
|
||||||
|
externalClusters:
|
||||||
|
- name: source
|
||||||
|
plugin:
|
||||||
|
name: barman-cloud.cloudnative-pg.io
|
||||||
|
parameters:
|
||||||
|
barmanObjectName: garage-store
|
||||||
|
serverName: lldap-db
|
||||||
|
plugins: []
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: Cluster
|
kind: Cluster
|
||||||
metadata:
|
metadata:
|
||||||
name: lldap-db
|
name: db
|
||||||
namespace: lldap
|
namespace: lldap
|
||||||
# TODO: Add labels?
|
# TODO: Add labels?
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ spec:
|
|||||||
- name: LLDAP_DATABASE_URL
|
- name: LLDAP_DATABASE_URL
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: lldap-db-app
|
name: db-app
|
||||||
key: uri
|
key: uri
|
||||||
- name: TZ
|
- name: TZ
|
||||||
value: CET
|
value: CET
|
||||||
|
|||||||
@@ -7,3 +7,11 @@ resources:
|
|||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
- http-route.yaml
|
- http-route.yaml
|
||||||
|
- secret-s3-garage.yaml
|
||||||
|
- object-store.yaml
|
||||||
|
|
||||||
|
# Uncomment to restore database from backup
|
||||||
|
# patches:
|
||||||
|
# - path: cluster-restore.yaml
|
||||||
|
# target:
|
||||||
|
# kind: Cluster
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ apiVersion: barmancloud.cnpg.io/v1
|
|||||||
kind: ObjectStore
|
kind: ObjectStore
|
||||||
metadata:
|
metadata:
|
||||||
name: garage-store
|
name: garage-store
|
||||||
namespace: cnpg-system
|
namespace: lldap
|
||||||
spec:
|
spec:
|
||||||
configuration:
|
configuration:
|
||||||
destinationPath: s3://cnpg-backup/
|
destinationPath: s3://cnpg-backup/lldap
|
||||||
endpointURL: http://192.178.1.1:3900
|
|
||||||
s3Credentials:
|
s3Credentials:
|
||||||
accessKeyId:
|
accessKeyId:
|
||||||
name: s3-garage
|
name: s3-garage
|
||||||
@@ -14,5 +13,8 @@ spec:
|
|||||||
secretAccessKey:
|
secretAccessKey:
|
||||||
name: s3-garage
|
name: s3-garage
|
||||||
key: ACCESS_SECRET_KEY
|
key: ACCESS_SECRET_KEY
|
||||||
|
region:
|
||||||
|
name: s3-garage
|
||||||
|
key: REGION
|
||||||
wal:
|
wal:
|
||||||
compression: gzip
|
compression: gzip
|
||||||
9
apps/lldap/base/secret-s3-garage.yaml
Normal file
9
apps/lldap/base/secret-s3-garage.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: s3-garage
|
||||||
|
namespace: lldap
|
||||||
|
annotations:
|
||||||
|
reflector.v1.k8s.emberstack.com/reflects: "cnpg-system/s3-garage"
|
||||||
|
type: Opaque
|
||||||
|
data: {}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: Cluster
|
kind: Cluster
|
||||||
metadata:
|
metadata:
|
||||||
name: lldap-db
|
name: db
|
||||||
spec:
|
spec:
|
||||||
instances: 2
|
instances: 2
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: Cluster
|
kind: Cluster
|
||||||
metadata:
|
metadata:
|
||||||
name: lldap-db
|
name: db
|
||||||
spec:
|
spec:
|
||||||
instances: 1
|
instances: 1
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ patches:
|
|||||||
- path: cluster.yaml
|
- path: cluster.yaml
|
||||||
target:
|
target:
|
||||||
kind: Cluster
|
kind: Cluster
|
||||||
|
- path: object-store.yaml
|
||||||
|
target:
|
||||||
|
kind: ObjectStore
|
||||||
- path: http-route.yaml
|
- path: http-route.yaml
|
||||||
target:
|
target:
|
||||||
kind: HTTPRoute
|
kind: HTTPRoute
|
||||||
|
|||||||
8
apps/lldap/staging/object-store.yaml
Normal file
8
apps/lldap/staging/object-store.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: barmancloud.cnpg.io/v1
|
||||||
|
kind: ObjectStore
|
||||||
|
metadata:
|
||||||
|
name: garage-store
|
||||||
|
namespace: lldap
|
||||||
|
spec:
|
||||||
|
configuration:
|
||||||
|
endpointURL: http://192.168.1.1:3900
|
||||||
@@ -9,6 +9,7 @@ resources:
|
|||||||
- ../../controllers/longhorn/longhorn.yaml
|
- ../../controllers/longhorn/longhorn.yaml
|
||||||
- ../../controllers/local-path-provisioner/local-path-provisioner.yaml
|
- ../../controllers/local-path-provisioner/local-path-provisioner.yaml
|
||||||
- ../../controllers/cnpg/cnpg.yaml
|
- ../../controllers/cnpg/cnpg.yaml
|
||||||
|
- ../../controllers/reflector/reflector.yaml
|
||||||
|
|
||||||
- ../../configs/artifacts.yaml
|
- ../../configs/artifacts.yaml
|
||||||
- ../../configs/cilium-config/cilium-config.yaml
|
- ../../configs/cilium-config/cilium-config.yaml
|
||||||
|
|||||||
@@ -39,3 +39,8 @@ spec:
|
|||||||
copy:
|
copy:
|
||||||
- from: "@foundation/controllers/cnpg/**"
|
- from: "@foundation/controllers/cnpg/**"
|
||||||
to: "@artifact/"
|
to: "@artifact/"
|
||||||
|
- name: reflector
|
||||||
|
originRevision: "@foundation"
|
||||||
|
copy:
|
||||||
|
- from: "@foundation/controllers/reflector/**"
|
||||||
|
to: "@artifact/"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- ../base
|
- ../base
|
||||||
- secret-s3-garage.enc.yaml
|
- secret-s3-garage.enc.yaml
|
||||||
- object-store.yaml
|
|
||||||
|
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
- name: values-overlay
|
- name: values-overlay
|
||||||
|
|||||||
@@ -3,10 +3,13 @@ kind: Secret
|
|||||||
metadata:
|
metadata:
|
||||||
name: s3-garage
|
name: s3-garage
|
||||||
namespace: cnpg-system
|
namespace: cnpg-system
|
||||||
|
annotations:
|
||||||
|
reflector.v1.k8s.emberstack.com/reflection-allowed: "true"
|
||||||
type: Opaque
|
type: Opaque
|
||||||
stringData:
|
stringData:
|
||||||
ACCESS_KEY_ID: ENC[AES256_GCM,data:TOEQMG/kHs5XUk77ijyV089ZTq1dKsoZUas=,iv:mVDOkl5qOxGdvCvdcXUuUjX85oKqbd+n5maHsKwCiFg=,tag:pho0oWPTwtM6lGQ2vA1d5A==,type:str]
|
ACCESS_KEY_ID: ENC[AES256_GCM,data:TOEQMG/kHs5XUk77ijyV089ZTq1dKsoZUas=,iv:mVDOkl5qOxGdvCvdcXUuUjX85oKqbd+n5maHsKwCiFg=,tag:pho0oWPTwtM6lGQ2vA1d5A==,type:str]
|
||||||
SECRET_ACCESS_KEY: ENC[AES256_GCM,data:mc42T/AQ8NRi32SzvwGJA6LEq1x0Yz3Tu+CPDYPf+E2+C00zQcGRk6tACPvRoMxRzU4ZZpK346e2K/8ajU77hg==,iv:Isxe81aQEbI5xd1dRjXDKj/2Jp9eTHdv0/XVBBHoRyE=,tag:gtcmKmfUIfIy977Df11P4g==,type:str]
|
ACCESS_SECRET_KEY: ENC[AES256_GCM,data:INipEOcpPSij6TDu+bCuMOdsGm58nEBC4UJfEGRqeMmXZ9A+EBrMiRL6z3s29uz4qdqwZ3C8E4PVz01/41bMEA==,iv:x+gku8q7efHaaMpD/dc19IrwmK2gDp04bjH8WN/xhkc=,tag:QiSF6B8IqMrCsOUCe8c0bw==,type:str]
|
||||||
|
REGION: ENC[AES256_GCM,data:WIGPWwii,iv:ZdP5uNYqa8CZxa/xyrYXxGvE9fzt95slzwpzSzRy9DY=,tag:yANYtLzJCL/1pcvBXY7X7g==,type:str]
|
||||||
sops:
|
sops:
|
||||||
age:
|
age:
|
||||||
- recipient: age1860txadrlqrjwnqh0g466re2nt8jk7xhj640pq9gpsddpg23uynqsp2hul
|
- recipient: age1860txadrlqrjwnqh0g466re2nt8jk7xhj640pq9gpsddpg23uynqsp2hul
|
||||||
@@ -27,8 +30,8 @@ sops:
|
|||||||
K09tZGI0Z2w0eXh5eHcvcEttMy82aU0K2fnCDfYIShzw2Zipof+C8zf9pcOmiDg9
|
K09tZGI0Z2w0eXh5eHcvcEttMy82aU0K2fnCDfYIShzw2Zipof+C8zf9pcOmiDg9
|
||||||
2SCiIfAJs9MB3n078P068z77KpvdlJYOi9pUTKSBhNw+mBI24y6X6A==
|
2SCiIfAJs9MB3n078P068z77KpvdlJYOi9pUTKSBhNw+mBI24y6X6A==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2025-12-15T03:46:42Z"
|
lastmodified: "2025-12-18T02:50:50Z"
|
||||||
mac: ENC[AES256_GCM,data:UG9rSQ4ep7Ln4g5QCtvD6U90Oc8iWpni+kypMpJ+AQM8LC0TTs9zFQgcxmo2wjZn38Fp+br/5KC172SqBNG4Q1yXhlRiqiIeyx9ynrZeceRSqHaaruB1hj83/0FwahqjB/t6yutWIfnp00UC92mMKGlef48UNZ8IW17e5uHE0m4=,iv:LvR4BEkgAr6PJ8fYATFois4j8/rgztn/Jggj/mFgCIk=,tag:W38qDd1RkCdK3bVMqOVnjA==,type:str]
|
mac: ENC[AES256_GCM,data:+kfs0EDnnZNnHMf91P6rAN52lugHFO4XcNJiKLpXt7bfTSMbiwgVbvRElXGTbLXLVSz70uZyzV/mt0ZcfEfPbwE/Pdh6SmFiWwQwLT1M50MdrxAWWYvSCS9r4h1Cow3N3K2/dXH7N/4AVHTg3ohXlP92fxVh1wL0cVnke/lcQgY=,iv:M5n9+lgq0fBx5Yg1e0N6v0obbnmarvVwIHAjCr5XmM4=,tag:NBA01MtG40T3nST7b00tiw==,type:str]
|
||||||
pgp:
|
pgp:
|
||||||
- created_at: "2025-12-11T23:56:15Z"
|
- created_at: "2025-12-11T23:56:15Z"
|
||||||
enc: |-
|
enc: |-
|
||||||
|
|||||||
23
controllers/reflector/helm-release.yaml
Normal file
23
controllers/reflector/helm-release.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: reflector
|
||||||
|
namespace: reflector
|
||||||
|
spec:
|
||||||
|
interval: 12h
|
||||||
|
install:
|
||||||
|
strategy:
|
||||||
|
name: RetryOnFailure
|
||||||
|
retryInterval: 2m
|
||||||
|
upgrade:
|
||||||
|
strategy:
|
||||||
|
name: RetryOnFailure
|
||||||
|
retryInterval: 3m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: reflector
|
||||||
|
version: "9.1.x"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: reflector
|
||||||
|
interval: 24h
|
||||||
9
controllers/reflector/helm-repository.yaml
Normal file
9
controllers/reflector/helm-repository.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
|
kind: HelmRepository
|
||||||
|
metadata:
|
||||||
|
name: reflector
|
||||||
|
namespace: reflector
|
||||||
|
spec:
|
||||||
|
type: "oci"
|
||||||
|
interval: 24h
|
||||||
|
url: oci://ghcr.io/emberstack/helm-charts
|
||||||
6
controllers/reflector/kustomization.yaml
Normal file
6
controllers/reflector/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- helm-repository.yaml
|
||||||
|
- helm-release.yaml
|
||||||
4
controllers/reflector/namespace.yaml
Normal file
4
controllers/reflector/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: reflector
|
||||||
15
controllers/reflector/reflector.yaml
Normal file
15
controllers/reflector/reflector.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: reflector
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
interval: 1h
|
||||||
|
retryInterval: 2m
|
||||||
|
timeout: 5m
|
||||||
|
sourceRef:
|
||||||
|
kind: ExternalArtifact
|
||||||
|
name: reflector
|
||||||
|
path: ./
|
||||||
|
prune: true
|
||||||
|
wait: true
|
||||||
Reference in New Issue
Block a user