[miniflux] Migrate to common v3 (#1060)

* [miniflux] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* Update README

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* Fix CI

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2021-06-24 14:07:28 +02:00 committed by GitHub
parent b0fd990b6c
commit 482ffffbde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 74 additions and 91 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v2
appVersion: 2.0.28
appVersion: 2.0.32
description: Miniflux is a minimalist and opinionated feed reader.
name: miniflux
version: 2.5.1
version: 3.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- miniflux
@ -18,7 +18,7 @@ maintainers:
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 2.5.0
version: 3.2.0
- name: postgresql
version: 10.4.8
repository: https://charts.bitnami.com/bitnami

View File

@ -1,6 +1,6 @@
# miniflux
![Version: 2.5.1](https://img.shields.io/badge/Version-2.5.1-informational?style=flat-square) ![AppVersion: 2.0.28](https://img.shields.io/badge/AppVersion-2.0.28-informational?style=flat-square)
![Version: 3.0.0](https://img.shields.io/badge/Version-3.0.0-informational?style=flat-square) ![AppVersion: 2.0.32](https://img.shields.io/badge/AppVersion-2.0.32-informational?style=flat-square)
Miniflux is a minimalist and opinionated feed reader.
@ -19,7 +19,7 @@ Kubernetes: `>=1.16.0-0`
| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | postgresql | 10.4.8 |
| https://library-charts.k8s-at-home.com | common | 2.5.0 |
| https://library-charts.k8s-at-home.com | common | 3.2.0 |
## TL;DR
@ -76,33 +76,20 @@ N/A
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| command[0] | string | `"/usr/bin/miniflux"` | |
| command[1] | string | `"-c"` | |
| command[2] | string | `"/etc/miniflux.conf"` | |
| config.admin.password | string | `"miniflux"` | |
| config.admin.username | string | `"admin"` | |
| env.CREATE_ADMIN | string | `"1"` | |
| env.RUN_MIGRATIONS | string | `"1"` | |
| env | object | See below | environment variables. See [miniflux docs](https://miniflux.app/docs/configuration.html) for more details. |
| env.ADMIN_PASSWORD | string | `"changeme"` | Admin user password, it's used only if `CREATE_ADMIN` is enabled. |
| env.ADMIN_USERNAME | string | `"admin"` | Admin user login, it's used only if `CREATE_ADMIN` is enabled. |
| env.CREATE_ADMIN | string | `"1"` | Set to `1` to create an admin user from environment variables. |
| env.DATABASE_URL | string | `"postgres://{{ .Values.postgresql.postgresqlUsername }}:{{ .Values.postgresql.postgresqlPassword }}@{{ include \"common.names.fullname\" .}}-postgresql/{{ .Values.postgresql.postgresqlDatabase }}?sslmode=disable"` | Postgresql connection parameters. See [lib/pq](https://pkg.go.dev/github.com/lib/pq#hdr-Connection_String_Parameters) for more details. |
| env.RUN_MIGRATIONS | string | `"1"` | Set to `1` to run database migrations during application startup. |
| env.TZ | string | `"UTC"` | Set the container timezone. |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"miniflux/miniflux"` | |
| image.tag | string | `"2.0.28"` | |
| ingress.enabled | bool | `false` | |
| postgresql | object | `{"enabled":true,"persistence":{"enabled":false},"postgresqlDatabase":"miniflux","postgresqlPassword":"miniflux","postgresqlUsername":"postgres"}` | Bitnami postgres chart. For more options see https://github.com/bitnami/charts/tree/master/bitnami/postgresql |
| postgresql.enabled | bool | `true` | true: use bitnami postgres instance -- false: use your own postgres instance |
| postgresql.persistence.enabled | bool | `false` | if database is stored to a PVC. Set to true when you are done testing. |
| postgresql.postgresqlDatabase | string | `"miniflux"` | Postgres database |
| postgresql.postgresqlPassword | string | `"miniflux"` | Postgres user password |
| postgresql.postgresqlUsername | string | `"postgres"` | Postgres user -- Needs to be superuser to create hstore extension |
| probes.liveness.custom | bool | `true` | |
| probes.liveness.enabled | bool | `true` | |
| probes.liveness.spec.failureThreshold | int | `3` | |
| probes.liveness.spec.httpGet.path | string | `"/healthcheck"` | |
| probes.liveness.spec.httpGet.port | int | `8080` | |
| probes.liveness.spec.initialDelaySeconds | int | `30` | |
| probes.liveness.spec.periodSeconds | int | `10` | |
| probes.liveness.spec.timeoutSeconds | int | `1` | |
| service.port.port | int | `8080` | |
| strategy.type | string | `"Recreate"` | |
| image.tag | string | `"2.0.31"` | |
| ingress.main | object | See values.yaml | Enable and configure ingress settings for the chart under this key. |
| postgresql | object | Enabled (see values.yaml for more details) | Enable and configure postgresql database subchart under this key. For more options see [postgresql chart documentation](https://github.com/bitnami/charts/tree/master/bitnami/postgresql) |
| probes | object | See values.yaml | Configures the probes for the main Pod. |
| service | object | See values.yaml | Configures service settings for the chart. |
## Changelog
@ -110,11 +97,24 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [3.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.2.0. This introduces several breaking changes (`service`, `ingress` and `persistence` keys have been refactored).
Be sure to check out the [library chart](https://github.com/k8s-at-home/library-charts/blob/common-3.2.0/charts/stable/common/) for the up-to-date values.
- Changed image tag to `2.0.32`.
#### Removed
- **BREAKING**: Removed `config` section, since these values could be set through environment variables.
### [1.0.0]
- Initial chart release
[1.0.0]: https://github.com/k8s-at-home/charts/tree/miniflux-1.0.0/charts/home-assistant
[3.0.0]: #300
[1.0.0]: #100
## Support

View File

@ -9,9 +9,22 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [3.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.2.0. This introduces several breaking changes (`service`, `ingress` and `persistence` keys have been refactored).
Be sure to check out the [library chart](https://github.com/k8s-at-home/library-charts/blob/common-3.2.0/charts/stable/common/) for the up-to-date values.
- Changed image tag to `2.0.32`.
#### Removed
- **BREAKING**: Removed `config` section, since these values could be set through environment variables.
### [1.0.0]
- Initial chart release
[1.0.0]: https://github.com/k8s-at-home/charts/tree/miniflux-1.0.0/charts/home-assistant
[3.0.0]: #300
[1.0.0]: #100
{{- end -}}

View File

@ -1,27 +1 @@
{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Append the configMap to the additionalVolumes */}}
{{- define "miniflux.config.volume" -}}
name: config
secret:
secretName: {{ template "common.names.fullname" . }}-config
{{- end -}}
{{- $volume := include "miniflux.config.volume" . | fromYaml -}}
{{- $additionalVolumes := append .Values.additionalVolumes $volume }}
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
{{/* Append the config secret volume to the additionalVolumeMounts */}}
{{- define "miniflux.config.volumeMount" -}}
name: config
mountPath: /etc/miniflux.conf
subPath: miniflux.conf
{{- end -}}
{{- $volumeMount := include "miniflux.config.volumeMount" . | fromYaml -}}
{{- $additionalVolumeMounts := append .Values.additionalVolumeMounts $volumeMount }}
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
{{/* Render the templates */}}
{{ include "common.all" . }}

View File

@ -1,9 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.names.fullname" . }}-config
stringData:
miniflux.conf: |
ADMIN_USERNAME={{ .Values.config.admin.username }}
ADMIN_PASSWORD={{ .Values.config.admin.password }}
DATABASE_URL=postgres://{{ .Values.postgresql.postgresqlUsername }}:{{ .Values.postgresql.postgresqlPassword }}@{{ include "common.names.fullname" .}}-postgresql/{{ .Values.postgresql.postgresqlDatabase }}?sslmode=disable

View File

@ -5,34 +5,43 @@
# https://github.com/k8s-at-home/charts/tree/master/charts/common/values.yaml
#
command: ['/usr/bin/miniflux', '-c', '/etc/miniflux.conf']
image:
repository: miniflux/miniflux
tag: 2.0.31
pullPolicy: IfNotPresent
tag: 2.0.28
strategy:
type: Recreate
# See more environment variables in the miniflux documentation
# https://miniflux.app/docs/configuration.html
# -- environment variables. See [miniflux docs](https://miniflux.app/docs/configuration.html) for more details.
# @default -- See below
env:
# -- Set the container timezone.
TZ: UTC
# -- Postgresql connection parameters. See [lib/pq](https://pkg.go.dev/github.com/lib/pq#hdr-Connection_String_Parameters) for more details.
DATABASE_URL: postgres://{{ .Values.postgresql.postgresqlUsername }}:{{ .Values.postgresql.postgresqlPassword }}@{{ include "common.names.fullname" .}}-postgresql/{{ .Values.postgresql.postgresqlDatabase }}?sslmode=disable
# -- Set to `1` to run database migrations during application startup.
RUN_MIGRATIONS: '1'
# -- Set to `1` to create an admin user from environment variables.
CREATE_ADMIN: '1'
# -- Admin user login, it's used only if `CREATE_ADMIN` is enabled.
ADMIN_USERNAME: admin
# -- Admin user password, it's used only if `CREATE_ADMIN` is enabled.
ADMIN_PASSWORD: changeme
# -- Configures service settings for the chart.
# @default -- See values.yaml
service:
port:
port: 8080
main:
ports:
http:
port: 8080
ingress:
enabled: false
config:
admin:
username: admin
password: miniflux
# -- Enable and configure ingress settings for the chart under this key.
# @default -- See values.yaml
main:
enabled: false
# -- Configures the probes for the main Pod.
# @default -- See values.yaml
probes:
liveness:
enabled: true
@ -46,19 +55,15 @@ probes:
path: /healthcheck
port: 8080
# -- Bitnami postgres chart. For more options see https://github.com/bitnami/charts/tree/master/bitnami/postgresql
# -- Enable and configure postgresql database subchart under this key.
# For more options see [postgresql chart documentation](https://github.com/bitnami/charts/tree/master/bitnami/postgresql)
# @default -- Enabled (see values.yaml for more details)
postgresql:
# -- true: use bitnami postgres instance
# -- false: use your own postgres instance
enabled: true
# -- Postgres database
postgresqlDatabase: miniflux
# -- Postgres user
# -- Needs to be superuser to create hstore extension
postgresqlUsername: postgres
# -- Postgres user password
postgresqlPassword: miniflux
persistence:
# -- if database is stored to a PVC. Set to true when you are done testing.
enabled: false
# storageClass: ""
# size: 8Gi