🚀 linkding

This commit is contained in:
auricom
2023-09-13 23:31:26 +02:00
parent 2c2419c81b
commit 73747d11ff
8 changed files with 178 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ spec:
- name: POSTGRES_HOST
value: ${POSTGRES_HOST}
- name: POSTGRES_DB
value: "authelia,bazarr,freshrss,gatus,ghostfolio,kresus,immich,invidious,joplin,lldap,lychee,outline,paperless,prowlarr_main,pushover-notifier,radarr_main,semaphore,sharry,tandoor,vaultwarden,vikunja,wallabag"
value: "authelia,bazarr,freshrss,gatus,ghostfolio,kresus,immich,invidious,joplin,linkding,lldap,lychee,outline,paperless,prowlarr_main,pushover-notifier,radarr_main,semaphore,sharry,tandoor,vaultwarden,vikunja,wallabag"
- name: POSTGRES_USER
valueFrom:
secretKeyRef:

View File

@@ -27,6 +27,7 @@ resources:
- ./kresus/ks.yaml
- ./kubernetes-schemas/ks.yaml
- ./lidarr/ks.yaml
- ./linkding/ks.yaml
- ./libreddit/ks.yaml
- ./lldap/ks.yaml
- ./lychee/ks.yaml

View File

@@ -0,0 +1,35 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: linkding
namespace: default
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: linkding-secret
creationPolicy: Owner
template:
engineVersion: v2
data:
# App
LD_DB_USER: &dbUser "{{ .POSTGRES_USERNAME }}"
LD_DB_PASSWORD: &dbPass "{{ .POSTGRES_PASSWORD }}"
LD_DB_HOST: &dbHost postgres-rw.default.svc.cluster.local
LD_DB_DATABASE: &dbName linkding
LD_SUPERUSER_NAME: "{{ .username }}"
LD_SUPERUSER_PASSWORD: "{{ .password }}"
# Postgres Init
INIT_POSTGRES_DBNAME: *dbName
INIT_POSTGRES_HOST: *dbHost
INIT_POSTGRES_USER: *dbUser
INIT_POSTGRES_PASS: *dbPass
INIT_POSTGRES_SUPER_PASS: "{{ .POSTGRES_SUPER_PASS }}"
dataFrom:
- extract:
key: cloudnative-pg
- extract:
key: linkding

View File

@@ -0,0 +1,22 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: linkding-gatus-ep
namespace: default
labels:
gatus.io/enabled: "true"
data:
config.yaml: |
endpoints:
- name: linkding
group: internal
url: https://links.${SECRET_CLUSTER_DOMAIN}
interval: 1m
client:
insecure: true
conditions:
- "[STATUS] == 200"
alerts:
- type: pushover

View File

@@ -0,0 +1,82 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta1.json
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: &app linkding
namespace: default
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 1.5.1
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
maxHistory: 2
install:
createNamespace: true
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
controller:
strategy: RollingUpdate
annotations:
reloader.stakater.com/auto: "true"
initContainers:
01-init-db:
image: ghcr.io/auricom/postgres-init:15.4
imagePullPolicy: IfNotPresent
envFrom: &envFrom
- secretRef:
name: linkding-secret
image:
repository: sissbruecker/linkding
tag: 1.21.0
envFrom: *envFrom
service:
main:
ports:
http:
port: &port 9090
ingress:
main:
enabled: true
ingressClassName: "nginx"
annotations:
hajimari.io/icon: link
hosts:
- host: &host "links.${SECRET_CLUSTER_DOMAIN}"
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- *host
probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
path: /health
port: *port
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probes
startup:
enabled: false
resources:
requests:
cpu: 10m
memory: 256Mi

View File

@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/kustomization.json
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- ./externalsecret.yaml
- ./gatus.yaml
- ./helmrelease.yaml

View File

@@ -0,0 +1,26 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: cluster-apps-linkding
namespace: flux-system
labels:
substitution.flux.home.arpa/enabled: "true"
spec:
path: ./kubernetes/apps/default/linkding/app
prune: true
sourceRef:
kind: GitRepository
name: home-ops-kubernetes
dependsOn:
- name: cluster-apps-cloudnative-pg-cluster
- name: cluster-apps-external-secrets-stores
healthChecks:
- apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
name: linkding
namespace: default
interval: 30m
retryInterval: 1m
timeout: 3m

View File

@@ -43,8 +43,8 @@ spec:
env: &env
SYMFONY__ENV__DATABASE_DRIVER: pdo_pgsql
SYMFONY__ENV__DOMAIN_NAME: https://wallabag.${SECRET_CLUSTER_DOMAIN}
SYMFONY__ENV__FOSUSER_REGISTRATION: "false"
SYMFONY__ENV__FOSUSER_CONFIRMATION: "false"
SYMFONY__ENV__FOSUSER_REGISTRATION: "true"
SYMFONY__ENV__FOSUSER_CONFIRMATION: "true"
SYMFONY__ENV__FROM_EMAIL: wallabag@${SECRET_DOMAIN}
SYMFONY__ENV__MAILER_HOST: smtp-relay.default.svc.cluster.local.
SYMFONY__ENV__MAILER_PORT: "2525"