migrate miniflux

This commit is contained in:
Morten Olsen
2026-01-02 10:42:06 +01:00
parent 4f88506ba7
commit b64ce72f3c
12 changed files with 255 additions and 159 deletions

View File

@@ -1,3 +1,7 @@
apiVersion: v2
version: 1.0.0
name: miniflux
dependencies:
- name: common
version: 1.0.0
repository: file://../../common

View File

@@ -1,10 +0,0 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: OidcClient
metadata:
name: "{{ .Release.Name }}"
spec:
environment: "{{ .Values.globals.environment }}"
redirectUris:
- path: oauth2/oidc/callback
subdomain: "{{ .Values.subdomain }}"
matchingMode: strict

View File

@@ -1,6 +1 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: PostgresDatabase
metadata:
name: '{{ .Release.Name }}'
spec:
environment: '{{ .Values.globals.environment }}'
{{ include "common.database" . }}

View File

@@ -1,75 +1 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ .Release.Name }}"
spec:
strategy:
type: RollingUpdate
replicas: 1
revisionHistoryLimit: 0
selector:
matchLabels:
app: "{{ .Release.Name }}"
template:
metadata:
labels:
app: "{{ .Release.Name }}"
spec:
containers:
- name: "{{ .Release.Name }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
tcpSocket:
port: http
readinessProbe:
tcpSocket:
port: http
volumeMounts:
- mountPath: /data
name: data
env:
- name: TZ
value: "{{ .Values.globals.timezone }}"
- name: BASE_URL
value: https://{{ .Values.subdomain }}.{{ .Values.globals.domain }}
- name: RUN_MIGRATIONS
value: "1"
- name: DISABLE_LOCAL_AUTH
value: "1"
- name: OAUTH2_CLIENT_ID
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-client"
key: clientId
- name: OAUTH2_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-client"
key: clientSecret
- name: OAUTH2_OIDC_DISCOVERY_ENDPOINT
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-client"
key: configurationIssuer
- name: OAUTH2_OIDC_PROVIDER_NAME
value: Authentik
- name: OAUTH2_PROVIDER
value: oidc
- name: OAUTH2_REDIRECT_URL
value: https://{{ .Values.subdomain }}.{{ .Values.globals.domain }}/oauth2/oidc/callback
- name: OAUTH2_USER_CREATION
value: "1"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-pg-connection"
key: url
volumes:
- name: data
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-data"
{{ include "common.deployment" . }}

View File

@@ -0,0 +1 @@
{{ include "common.oidc" . }}

View File

@@ -1,11 +1 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: '{{ .Release.Name }}-data'
spec:
accessModes:
- 'ReadWriteOnce'
resources:
requests:
storage: '1Gi'
storageClassName: '{{ .Values.globals.environment }}'
{{ include "common.pvc" . }}

View File

@@ -1,15 +1 @@
apiVersion: v1
kind: Service
metadata:
name: "{{ .Release.Name }}"
labels:
app: "{{ .Release.Name }}"
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 8080
protocol: TCP
name: http
selector:
app: "{{ .Release.Name }}"
{{ include "common.service" . }}

View File

@@ -1,39 +1 @@
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
name: "{{ .Release.Name }}-public"
namespace: "{{ .Release.Namespace }}"
spec:
gateways:
- "{{ .Values.globals.istio.gateways.public }}"
- mesh
hosts:
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
- mesh
http:
- route:
- destination:
host: "{{ .Release.Name }}"
port:
number: 80
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
name: "{{ .Release.Name }}-private"
namespace: "{{ .Release.Namespace }}"
spec:
gateways:
- "{{ .Values.globals.istio.gateways.private }}"
- mesh
hosts:
- "{{ .Values.subdomain }}.{{ .Values.globals.domain }}"
- mesh
http:
- route:
- destination:
host: "{{ .Release.Name }}"
port:
number: 80
{{ include "common.virtualService" . }}

View File

@@ -2,4 +2,85 @@ image:
repository: ghcr.io/miniflux/miniflux
tag: latest@sha256:9a1f95a7a05b77040d19bb7be96194af4c222de02fb84165fb808f65700c064f
pullPolicy: IfNotPresent
subdomain: miniflux
# Deployment configuration
deployment:
strategy: RollingUpdate
replicas: 1
revisionHistoryLimit: 0
# Container configuration
container:
port: 8080
healthProbe:
type: tcpSocket
port: http # Use named port
# Service configuration
service:
port: 80
type: ClusterIP
# Volume configuration
volumes:
- name: data
mountPath: /data
persistentVolumeClaim: data
# Persistent volume claims
persistentVolumeClaims:
- name: data
size: 1Gi
# VirtualService configuration
virtualService:
enabled: true
gateways:
public: true
private: true
# OIDC client
oidc:
enabled: true
redirectUris:
- "/oauth2/oidc/callback"
# Database configuration
database:
enabled: true
# Environment variables
env:
TZ:
value: "{timezone}"
BASE_URL:
value: "https://{subdomain}.{domain}"
RUN_MIGRATIONS: "1"
DISABLE_LOCAL_AUTH: "1"
OAUTH2_CLIENT_ID:
valueFrom:
secretKeyRef:
name: "{release}-oidc-credentials"
key: clientId
OAUTH2_CLIENT_SECRET:
valueFrom:
secretKeyRef:
name: "{release}-oidc-credentials"
key: clientSecret
OAUTH2_OIDC_DISCOVERY_ENDPOINT:
valueFrom:
secretKeyRef:
name: "{release}-oidc-credentials"
key: issuer
OAUTH2_OIDC_PROVIDER_NAME: Authentik
OAUTH2_PROVIDER: oidc
OAUTH2_REDIRECT_URL:
value: "https://{subdomain}.{domain}/oauth2/oidc/callback"
OAUTH2_USER_CREATION: "1"
DATABASE_URL:
valueFrom:
secretKeyRef:
name: "{release}-connection"
key: url