Skip to content

Commit

Permalink
Merge pull request #454 from lentzi90/development
Browse files Browse the repository at this point in the history
Switch jern.me to external-secrets and move nextcloud to jern.fi
  • Loading branch information
lentzi90 authored Dec 20, 2024
2 parents 3ee3883 + 963226d commit 8aff069
Show file tree
Hide file tree
Showing 27 changed files with 95 additions and 112 deletions.
1 change: 0 additions & 1 deletion .github/workflows/kustomize-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
- argocd/overlays/kind
- cert-manager/overlays/kind
- nginx-ingress/overlays/kind
- gitea/overlays/kind
- nextcloud/overlays/kind
- cloudnative-pg/overlays/kind
- pi-hole/overlays/kind
Expand Down
2 changes: 1 addition & 1 deletion apps/nextcloud-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
server: https://kubernetes.default.svc
project: default
source:
path: nextcloud/overlays/jern.me
path: nextcloud/overlays/jern.fi
repoURL: https://github.com/lentzi90/personal-cloud.git
targetRevision: HEAD
syncPolicy: {}
17 changes: 17 additions & 0 deletions minio/overlays/jern.me/externalsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: minio-root-creds
spec:
refreshInterval: 1h
secretStoreRef:
# This name must match the metadata.name in the `SecretStore`
name: bitwarden-personal-cloud
kind: ClusterSecretStore
data:
- secretKey: MINIO_ROOT_USER
remoteRef:
key: 46fe8669-f670-484a-b458-b24c008d1b3f
- secretKey: MINIO_ROOT_PASSWORD
remoteRef:
key: 2df100eb-fdc0-4406-99a4-b24c008d3574
4 changes: 1 addition & 3 deletions minio/overlays/jern.me/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ resources:
- ../../base
- namespace.yaml
- pv.yaml
- externalsecret.yaml

patches:
- path: pvc.yaml

generators:
- minio-root-generator.yaml
7 changes: 0 additions & 7 deletions minio/overlays/jern.me/minio-root-generator.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions minio/overlays/jern.me/minio-root.env

This file was deleted.

6 changes: 3 additions & 3 deletions nextcloud/bases/basic/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: nextcloud
image: nextcloud:22.2.2-apache
image: nextcloud
env:
- name: NC_overwriteprotocol
value: https
Expand All @@ -35,7 +35,7 @@ spec:
port: http
httpHeaders:
- name: Host
value: nextcloud.jern.me
value: nextcloud.example.com
initialDelaySeconds: 2400
timeoutSeconds: 10
failureThreshold: 6
Expand All @@ -45,7 +45,7 @@ spec:
port: http
httpHeaders:
- name: Host
value: nextcloud.jern.me
value: nextcloud.example.com
initialDelaySeconds: 30
timeoutSeconds: 3
periodSeconds: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: nextcloud-cert
spec:
dnsNames:
- nextcloud.jern.me
- nextcloud.jern.fi
issuerRef:
group: cert-manager.io
kind: ClusterIssuer
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ spec:
httpGet:
httpHeaders:
- name: Host
value: nextcloud.jern.me
value: nextcloud.jern.fi
readinessProbe:
httpGet:
httpHeaders:
- name: Host
value: nextcloud.jern.me
value: nextcloud.jern.fi
resources:
requests:
cpu: 200m
Expand Down
38 changes: 38 additions & 0 deletions nextcloud/overlays/jern.fi/externalsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: minio-creds
spec:
refreshInterval: 1h
secretStoreRef:
# This name must match the metadata.name in the `SecretStore`
name: bitwarden-personal-cloud
kind: ClusterSecretStore
data:
- secretKey: USER
remoteRef:
key: e2f8b061-39b2-424a-a584-b24c0088f2f1
- secretKey: PASSWORD
remoteRef:
key: 0ac7b595-a1b5-494b-b973-b24c00891023
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: nextcloud-admin
spec:
refreshInterval: 1h
secretStoreRef:
# This name must match the metadata.name in the `SecretStore`
name: bitwarden-personal-cloud
kind: ClusterSecretStore
data:
- secretKey: NEXTCLOUD_ADMIN_USER
remoteRef:
key: bb358c4d-1645-41ac-80c9-b24c00896313
- secretKey: NEXTCLOUD_ADMIN_PASSWORD
remoteRef:
key: d77b580e-8dca-4881-9892-b24c008a50a9
- secretKey: REDIS_HOST_PASSWORD
remoteRef:
key: cb4cdfce-4324-4936-b74b-b24c008a7ef3
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ metadata:
spec:
ingressClassName: nginx
tls:
- secretName: nextcloud-cert
hosts:
- nextcloud.jern.me
- secretName: nextcloud-cert
hosts:
- nextcloud.jern.fi
rules:
- host: nextcloud.jern.me
http:
paths:
- backend:
service:
name: nextcloud
port:
name: http
path: /
pathType: Prefix
---
- host: nextcloud.jern.fi
http:
paths:
- backend:
service:
name: nextcloud
port:
name: http
path: /
pathType: Prefix
# Nextcloud recommends rewriting /.wellknown/carddav and /.wellknown/caldav
# to /remote.php/dav since some clients have trouble with this.
# See https://docs.nextcloud.com/server/21/admin_manual/issues/general_troubleshooting.html#service-discovery
Expand All @@ -34,9 +33,9 @@ spec:
# tls:
# - secretName: nextcloud-cert
# hosts:
# - nextcloud.jern.me
# - nextcloud.jern.fi
# rules:
# - host: nextcloud.jern.me
# - host: nextcloud.jern.fi
# http:
# paths:
# - backend:
Expand All @@ -53,3 +52,4 @@ spec:
# name: http
# path: /.wellknown/caldav
# pathType: Exact
---
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace: nextcloud
labels:
- includeSelectors: true
pairs:
environment: jern.me
environment: jern.fi

resources:
- ../../bases/basic
Expand All @@ -15,6 +15,7 @@ resources:
- postgres.yaml
- scheduled-backup.yaml
- certificate.yaml
- externalsecret.yaml

patches:
- path: deployment.yaml
Expand All @@ -28,10 +29,6 @@ configMapGenerator:
- POSTGRES_DB=nextcloud
- POSTGRES_HOST=nextcloud-database-rw

generators:
- nextcloud-admin-generator.yaml
- minio-credentials-generator.yaml

configurations:
- config/cloudnative-pg.yaml

Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions nextcloud/overlays/jern.me/minio-credentials-generator.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions nextcloud/overlays/jern.me/minio.env

This file was deleted.

7 changes: 0 additions & 7 deletions nextcloud/overlays/jern.me/nextcloud-admin-generator.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions nextcloud/overlays/jern.me/nextcloud-admin.env

This file was deleted.

14 changes: 14 additions & 0 deletions pi-hole/overlays/jern.me/externalsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: pi-hole-env
spec:
refreshInterval: 1h
secretStoreRef:
# This name must match the metadata.name in the `SecretStore`
name: bitwarden-personal-cloud
kind: ClusterSecretStore
data:
- secretKey: WEBPASSWORD
remoteRef:
key: e17b2830-6c61-414e-8a9d-b24c008e0608
3 changes: 0 additions & 3 deletions pi-hole/overlays/jern.me/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,3 @@ configMapGenerator:
- 02-interface.conf
- 05-custom-cname.conf
name: custom

generators:
- pi-hole-env-generator.yaml
7 changes: 0 additions & 7 deletions pi-hole/overlays/jern.me/pi-hole-env-generator.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions pi-hole/overlays/jern.me/pi-hole.env

This file was deleted.

0 comments on commit 8aff069

Please sign in to comment.