From 448c9411e45d7c6a12c2f986b5426093e7219927 Mon Sep 17 00:00:00 2001 From: Finn Date: Wed, 17 Jul 2024 21:32:13 -0700 Subject: [PATCH] add miniflux --- k8s/kustomization.yaml | 1 + k8s/miniflux/database.yaml | 20 ++++++++++ k8s/miniflux/ingress.yaml | 31 ++++++++++++++++ k8s/miniflux/kustomization.yaml | 9 +++++ k8s/miniflux/miniflux.yaml | 66 +++++++++++++++++++++++++++++++++ k8s/miniflux/namespace.yaml | 4 ++ 6 files changed, 131 insertions(+) create mode 100644 k8s/miniflux/database.yaml create mode 100644 k8s/miniflux/ingress.yaml create mode 100644 k8s/miniflux/kustomization.yaml create mode 100644 k8s/miniflux/miniflux.yaml create mode 100644 k8s/miniflux/namespace.yaml diff --git a/k8s/kustomization.yaml b/k8s/kustomization.yaml index 8fed4a4..9ba70a6 100644 --- a/k8s/kustomization.yaml +++ b/k8s/kustomization.yaml @@ -12,3 +12,4 @@ resources: - shlink - system-upgrade - keycloak + - miniflux diff --git a/k8s/miniflux/database.yaml b/k8s/miniflux/database.yaml new file mode 100644 index 0000000..f586d97 --- /dev/null +++ b/k8s/miniflux/database.yaml @@ -0,0 +1,20 @@ +apiVersion: "acid.zalan.do/v1" +kind: postgresql +metadata: + name: miniflux-database +spec: + teamId: miniflux + volume: + size: 1Gi + numberOfInstances: 2 + users: + superuser: + - superuser + - createdb + miniflux: [] + databases: + miniflux: miniflux + preparedDatabases: + miniflux: {} + postgresql: + version: "16" diff --git a/k8s/miniflux/ingress.yaml b/k8s/miniflux/ingress.yaml new file mode 100644 index 0000000..3aa5b31 --- /dev/null +++ b/k8s/miniflux/ingress.yaml @@ -0,0 +1,31 @@ + +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: miniflux +spec: + rules: + - host: miniflux.janky.solutions + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: miniflux + port: + name: web +--- +apiVersion: v1 +kind: Service +metadata: + name: miniflux + labels: + app: miniflux +spec: + ports: + - name: web + port: 8080 + clusterIP: None + selector: + app: miniflux diff --git a/k8s/miniflux/kustomization.yaml b/k8s/miniflux/kustomization.yaml new file mode 100644 index 0000000..adbd02b --- /dev/null +++ b/k8s/miniflux/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: miniflux +resources: + - namespace.yaml + - ingress.yaml + - database.yaml + - miniflux.yaml + - secrets.yaml diff --git a/k8s/miniflux/miniflux.yaml b/k8s/miniflux/miniflux.yaml new file mode 100644 index 0000000..5ce5744 --- /dev/null +++ b/k8s/miniflux/miniflux.yaml @@ -0,0 +1,66 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: miniflux + labels: + app: miniflux +spec: + replicas: 2 + selector: + matchLabels: + app: miniflux + template: + metadata: + labels: + app: miniflux + spec: + containers: + - name: miniflux + image: git.janky.solutions/finn/miniflux:disable-local-auth + imagePullPolicy: Always + resources: {} + envFrom: + - secretRef: + name: miniflux + env: + - name: DATABASE_URL + value: "postgresql://miniflux-database.miniflux.svc.cluster.local/miniflux" + - name: PGUSER + valueFrom: + secretKeyRef: + name: miniflux.miniflux-database.credentials.postgresql.acid.zalan.do + key: username + - name: PGPASSWORD + valueFrom: + secretKeyRef: + name: miniflux.miniflux-database.credentials.postgresql.acid.zalan.do + key: password + - name: RUN_MIGRATIONS + value: "1" + - name: BASE_URL + value: https://miniflux.janky.solutions + - name: HTTPS + value: "1" + - name: MEDIA_PROXY_MODE + value: all + - name: METRICS_COLLECTOR + value: "1" + - name: METRICS_ALLOWED_NETWORKS + value: 10.42.0.0/16 + - name: OAUTH2_PROVIDER + value: oidc + - name: OAUTH2_OIDC_DISCOVERY_ENDPOINT + value: https://auth-next.janky.solutions/realms/janky.solutions + - name: OAUTH2_REDIRECT_URL + value: https://miniflux.janky.solutions/oauth2/oidc/callback + - name: OAUTH2_CLIENT_ID + value: miniflux + - name: OAUTH2_USER_CREATION + value: "1" + - name: DISABLE_LOCAL_AUTH + value: "1" + ports: + - name: web + containerPort: 8080 + + diff --git a/k8s/miniflux/namespace.yaml b/k8s/miniflux/namespace.yaml new file mode 100644 index 0000000..4ae15f8 --- /dev/null +++ b/k8s/miniflux/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: miniflux