Skip to content

Commit 2992a1b

Browse files
add ghostfolio
1 parent 66f0774 commit 2992a1b

File tree

6 files changed

+114
-2
lines changed

6 files changed

+114
-2
lines changed

apps/ghostfolio/components/postgres/postgres-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ spec:
6262
- name: "POSTGRES_USER"
6363
valueFrom:
6464
secretKeyRef:
65-
name: "ghostfolio"
65+
name: "ghostfolio-postgres"
6666
key: "POSTGRES_USER"
6767
- name: "POSTGRES_PASSWORD"
6868
valueFrom:
6969
secretKeyRef:
70-
name: "ghostfolio"
70+
name: "ghostfolio-postgres"
7171
key: "POSTGRES_PASSWORD"
7272
- name: "PGDATA"
7373
value: "/data/pgdata"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
apiVersion: external-secrets.io/v1beta1
3+
kind: ExternalSecret
4+
metadata:
5+
name: "ghostfolio"
6+
spec:
7+
refreshInterval: 12h
8+
secretStoreRef:
9+
name: "vault"
10+
kind: "ClusterSecretStore"
11+
target:
12+
name: "ghostfolio"
13+
template:
14+
engineVersion: v2
15+
data:
16+
DATABASE_URL: "postgresql://{{ .postgres_user }}:{{ .postgres_password }}@postgres:5432/ghostfolio?connect_timeout=300"
17+
JWT_SECRET_KEY: "{{ .jwt_secret_key }}"
18+
ACCESS_TOKEN_SALT: "{{ .access_token_salt }}"
19+
data:
20+
- secretKey: "postgres_user"
21+
remoteRef:
22+
key: "secret/soeren.cloud/env/prod/ghostfolio"
23+
property: "POSTGRES_USER"
24+
- secretKey: "postgres_password"
25+
remoteRef:
26+
key: "secret/soeren.cloud/env/prod/ghostfolio"
27+
property: "POSTGRES_PASSWORD"
28+
- secretKey: "jwt_secret_key"
29+
remoteRef:
30+
key: "secret/soeren.cloud/env/prod/ghostfolio"
31+
property: "JWT_SECRET"
32+
- secretKey: "access_token_salt"
33+
remoteRef:
34+
key: "secret/soeren.cloud/env/prod/ghostfolio"
35+
property: "ACCESS_TOKEN_SALT"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
apiVersion: external-secrets.io/v1beta1
3+
kind: ExternalSecret
4+
metadata:
5+
name: "ghostfolio-postgres"
6+
spec:
7+
refreshInterval: 12h
8+
secretStoreRef:
9+
name: "vault"
10+
kind: "ClusterSecretStore"
11+
target:
12+
name: "ghostfolio-postgres"
13+
creationPolicy: "Owner"
14+
data:
15+
- secretKey: "POSTGRES_USER"
16+
remoteRef:
17+
key: "secret/soeren.cloud/env/prod/ghostfolio"
18+
property: "POSTGRES_USER"
19+
- secretKey: "POSTGRES_PASSWORD"
20+
remoteRef:
21+
key: "secret/soeren.cloud/env/prod/ghostfolio"
22+
property: "POSTGRES_PASSWORD"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
namespace: "ghostfolio"
5+
resources:
6+
- "../../../apps/ghostfolio"
7+
- "namespace.yaml"
8+
- "postgres-data-pv.yaml"
9+
- "external-secret-ghostfolio.yaml"
10+
- "external-secret-postgres.yaml"
11+
components:
12+
- ../../../apps/ghostfolio/components/istio
13+
- ../../../apps/ghostfolio/components/postgres
14+
- ../../../apps/ghostfolio/components/postgres-pvc
15+
- ../../../apps/ghostfolio/components/redis
16+
patches:
17+
- target:
18+
kind: "VirtualService"
19+
name: "ghostfolio"
20+
patch: |
21+
- op: "replace"
22+
path: "/spec/hosts"
23+
value:
24+
- "ghostfolio.svc.ez.soeren.cloud"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
kind: Namespace
3+
apiVersion: v1
4+
metadata:
5+
name: ghostfolio
6+
labels:
7+
name: ghostfolio
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
apiVersion: v1
3+
kind: PersistentVolume
4+
metadata:
5+
name: ghostfolio-postgres
6+
spec:
7+
accessModes:
8+
- ReadWriteOnce
9+
capacity:
10+
storage: 1Gi
11+
storageClassName: local-storage
12+
local:
13+
path: "/mnt/k8s/ghostfolio-postgres"
14+
claimRef:
15+
namespace: "ghostfolio"
16+
name: "ghostfolio-postgres"
17+
nodeAffinity:
18+
required:
19+
nodeSelectorTerms:
20+
- matchExpressions:
21+
- key: kubernetes.io/hostname
22+
operator: In
23+
values:
24+
- k8s.ez.soeren.cloud

0 commit comments

Comments
 (0)