Add linkwarden.

This commit is contained in:
Joseph Hanson 2024-09-21 14:23:59 -05:00
parent 39d5378973
commit c60a65c465
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
7 changed files with 155 additions and 0 deletions

View file

@ -95,6 +95,11 @@ spec:
- kasm - kasm
password: password:
type: AlphaNumeric type: AlphaNumeric
- name: linkwarden
databases:
- linkwarden
password:
type: AlphaNumeric
- name: prowlarr - name: prowlarr
databases: databases:
- prowlarr_logs - prowlarr_logs

View file

@ -308,3 +308,33 @@ spec:
remoteRef: remoteRef:
remoteKey: coder remoteKey: coder
property: CODER_POSTGRES_PASSWORD property: CODER_POSTGRES_PASSWORD
---
# yaml-language-server: $schema=https://ks.hsn.dev/external-secrets.io/pushsecret_v1alpha1.json
apiVersion: external-secrets.io/v1alpha1
kind: PushSecret
metadata:
name: linkwarden
spec:
refreshInterval: 1h
secretStoreRefs:
- name: onepassword-connect
kind: ClusterSecretStore
selector:
secret:
name: postgres-pguser-linkwarden
data:
- match:
secretKey: host
remoteRef:
remoteKey: linkwarden
property: LINKWARDEN_POSTGRES_HOST
- match:
secretKey: user
remoteRef:
remoteKey: linkwarden
property: LINKWARDEN_POSTGRES_USER
- match:
secretKey: password
remoteRef:
remoteKey: linkwarden
property: LINKWARDEN_POSTGRES_PASSWORD

View file

@ -10,6 +10,7 @@ resources:
- ./autobrr/ks.yaml - ./autobrr/ks.yaml
- ./excalidraw/ks.yaml - ./excalidraw/ks.yaml
- ./it-tools/ks.yaml - ./it-tools/ks.yaml
- ./linkwarden/ks.yaml
- ./maintainerr/ks.yaml - ./maintainerr/ks.yaml
- ./omegabrr/ks.yaml - ./omegabrr/ks.yaml
- ./overseerr/ks.yaml - ./overseerr/ks.yaml

View file

@ -0,0 +1,23 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: linkwarden
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: linkwarden-secret
template:
engineVersion: v2
data:
NEXTAUTH_URL: "https://links.hsn.dev/api/v1/auth"
NEXTAUTH_SECRET: "{{ .LINKWARDEN_NEXTAUTH_SECRET }}"
LINKWARDEN_POSTGRES_REAL_HOST: "postgres-primary-real.database.svc"
DATABASE_URL: |-
postgres://{{ .LINKWARDEN_POSTGRES_USER }}:{{ .LINKWARDEN_POSTGRES_PASSWORD }}@{{ .LINKWARDEN_POSTGRES_REAL_HOST }}/linkwarden
dataFrom:
- extract:
key: linkwarden

View file

@ -0,0 +1,62 @@
---
# 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: linkwarden
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.4.0
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
strategy: rollback
values:
controllers:
linkwarden:
annotations:
reloader.stakater.com/auto: "true"
containers:
app:
image:
repository: ghcr.io/linkwarden/linkwarden
tag: v2.7.1@sha256:bbd22798ee726184d4571ea4f4d831d57475c86c4965c2bb1c3c2d3de88c728a
env:
TIMEZONE: "America/Chicago"
envFrom:
- secretRef:
name: linkwarden-secret
service:
app:
controller: linkwarden
ports:
http:
port: 3000
ingress:
app:
enabled: true
className: internal-nginx
hosts:
- host: &host "links.jahanson.tech"
paths:
- path: /
service:
identifier: app
port: http
tls:
- hosts:
- *host
persistence:
data:
existingClaim: linkwarden-data

View file

@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./externalsecret.yaml
- ./helmrelease.yaml
- ../../../../templates/volsync
- ../../../../templates/gatus/internal

View file

@ -0,0 +1,25 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app linkwarden
namespace: flux-system
spec:
targetNamespace: default
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/default/linkwarden/app
prune: true
sourceRef:
kind: GitRepository
name: theshire
wait: false # no flux ks dependents
interval: 30m
retryInterval: 1m
timeout: 5m
postBuild:
substitute:
APP: *app
GATUS_SUBDOMAIN: links