Compare commits
45 Commits
homepage-0
...
postgres-c
Author | SHA1 | Date | |
---|---|---|---|
81bd94a1db | |||
e49b1482a1 | |||
ba4273041d | |||
d45a5f6084 | |||
e3627d3531 | |||
f12bb5a879 | |||
f4c2938d95 | |||
7a8c6e7b3c | |||
c0ca3a909c | |||
792e4c018c | |||
e51e4e34dc | |||
e429bc51f7 | |||
6adb00b442 | |||
9a5bc849bc | |||
9ef96af4a5 | |||
66a5099f75 | |||
f2e1dabf24 | |||
39b46177ea | |||
c69d61a07d | |||
1236a200cd | |||
|
24845fb336 | ||
|
a398abdf63 | ||
|
5bbd6db883 | ||
9e2d2a7503 | |||
|
ea662406ed | ||
06661efd7e | |||
ec95fd84f9 | |||
86d7e9f156 | |||
5a3cb20dcb | |||
1cb675e7c3 | |||
438ceef98b | |||
0be01806dd | |||
639f7a4031 | |||
ba3e6551e2 | |||
d12db5479a | |||
e44c961258 | |||
0999f6272f | |||
7bfb8f5920 | |||
eb79c0ba68 | |||
466b67581f | |||
031b1dec3a | |||
41282e79e8 | |||
ffcaf51b66 | |||
30d69f695c | |||
c5feb14abc |
2
.github/renovate-update-notification/Dockerfile
vendored
Normal file
2
.github/renovate-update-notification/Dockerfile
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# This file is processed by Renovate bot so that it creates a PR on new major Renovate versions
|
||||||
|
FROM renovate/renovate:37
|
74
.github/renovate.json
vendored
Normal file
74
.github/renovate.json
vendored
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:recommended",
|
||||||
|
"mergeConfidence:all-badges",
|
||||||
|
":rebaseStalePrs"
|
||||||
|
],
|
||||||
|
"timezone": "US/Mountain",
|
||||||
|
"schedule": [
|
||||||
|
"after 10am every weekday",
|
||||||
|
"before 5pm every weekday"
|
||||||
|
],
|
||||||
|
"labels": ["outside-rule"],
|
||||||
|
"bumpVersion": "minor",
|
||||||
|
"packageRules": [
|
||||||
|
{
|
||||||
|
"description": "Disables for non major Renovate version",
|
||||||
|
"matchPaths": [
|
||||||
|
".github/renovate-update-notification/Dockerfile"
|
||||||
|
],
|
||||||
|
"matchUpdateTypes": [
|
||||||
|
"minor",
|
||||||
|
"patch",
|
||||||
|
"pin",
|
||||||
|
"digest",
|
||||||
|
"rollback"
|
||||||
|
],
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Generate for major Renovate version",
|
||||||
|
"matchPaths": [
|
||||||
|
".github/renovate-update-notification/Dockerfile"
|
||||||
|
],
|
||||||
|
"matchUpdateTypes": [
|
||||||
|
"major"
|
||||||
|
],
|
||||||
|
"addLabels": [
|
||||||
|
"upgrade"
|
||||||
|
],
|
||||||
|
"automerge": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Generate image updates on Tuesdays",
|
||||||
|
"matchPackageNames": [
|
||||||
|
"linuxserver/calibre",
|
||||||
|
"homeassistant/home-assistant",
|
||||||
|
"ghcr.io/gethomepage/homepage",
|
||||||
|
"ghcr.io/cloudnative-pg/postgresql"
|
||||||
|
],
|
||||||
|
"matchDatasources": [
|
||||||
|
"docker",
|
||||||
|
"gitea-releases",
|
||||||
|
"gitea-tags",
|
||||||
|
"github-releases",
|
||||||
|
"github-tags",
|
||||||
|
"gitlab-packages",
|
||||||
|
"gitlab-releases",
|
||||||
|
"gitlab-tags"
|
||||||
|
],
|
||||||
|
"schedule": [
|
||||||
|
"after 10am on tuesday",
|
||||||
|
"before 5pm on tuesday"
|
||||||
|
],
|
||||||
|
"addLabels": [
|
||||||
|
"upgrade",
|
||||||
|
"weekly",
|
||||||
|
"image"
|
||||||
|
],
|
||||||
|
"automerge": false,
|
||||||
|
"minimumReleaseAge": "3 days"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
10
.github/workflows/lint-test.yaml
vendored
10
.github/workflows/lint-test.yaml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Lint and Test Charts
|
name: lint-and-test-charts
|
||||||
|
|
||||||
on: pull_request
|
on: pull_request
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -16,13 +16,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: v3.13.3
|
version: v3.13.3
|
||||||
|
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
- name: Set up chart-testing
|
- name: Set up chart-testing
|
||||||
uses: helm/chart-testing-action@v2.6.0
|
uses: helm/chart-testing-action@v2.6.1
|
||||||
|
|
||||||
- name: Run chart-testing (list-changed)
|
- name: Run chart-testing (list-changed)
|
||||||
id: list-changed
|
id: list-changed
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create kind cluster
|
- name: Create kind cluster
|
||||||
if: steps.list-changed.outputs.changed == 'true'
|
if: steps.list-changed.outputs.changed == 'true'
|
||||||
uses: helm/kind-action@v1.8.0
|
uses: helm/kind-action@v1.9.0
|
||||||
|
|
||||||
- name: Run chart-testing (install)
|
- name: Run chart-testing (install)
|
||||||
if: steps.list-changed.outputs.changed == 'true'
|
if: steps.list-changed.outputs.changed == 'true'
|
||||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Release Charts
|
name: release-charts
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
14
README.md
14
README.md
@@ -1,9 +1,21 @@
|
|||||||
|
# Welcome
|
||||||
|
|
||||||
|
Welcome to the documentation for the [alexlebens's Helm charts](https://github.com/alexlebens/helm-charts).
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
[Helm](https://helm.sh) must be installed to use the charts in this repository.
|
[Helm](https://helm.sh) must be installed to use the charts in this repository.
|
||||||
|
|
||||||
Refer to Helm's [documentation](https://helm.sh/docs/) to get started.
|
Refer to Helm's [documentation](https://helm.sh/docs/) to get started.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```sh
|
||||||
|
helm repo add alexlebens http://alexlebens.github.io/helm-charts/
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then run `helm search repo alexlebens` to search the charts.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under the terms of the Apache 2.0 License license.
|
This project is licensed under the terms of the Apache 2.0 License license.
|
||||||
|
13
charts/calibre-server/Chart.yaml
Normal file
13
charts/calibre-server/Chart.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: calibre-server
|
||||||
|
version: 0.0.4
|
||||||
|
description: Chart for Calibre content database
|
||||||
|
keywords:
|
||||||
|
- media
|
||||||
|
- books
|
||||||
|
sources:
|
||||||
|
- https://github.com/kovidgoyal/calibre
|
||||||
|
maintainers:
|
||||||
|
- name: alexlebens
|
||||||
|
icon: https://raw.githubusercontent.com/kovidgoyal/calibre/master/resources/images/lt.png
|
||||||
|
appVersion: 7.5.1
|
17
charts/calibre-server/README.md
Normal file
17
charts/calibre-server/README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
## Introduction
|
||||||
|
|
||||||
|
[Calibre](https://calibre-ebook.com/)
|
||||||
|
|
||||||
|
calibre is an e-book manager. It can view, convert, edit and catalog e-books in all of the major e-book formats. It can also talk to e-book reader devices. It can go out to the internet and fetch metadata for your books. It can download newspapers and convert them into e-books for convenient reading.
|
||||||
|
|
||||||
|
This chart bootstraps a [Calibre](https://github.com/home-assistant) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Kubernetes
|
||||||
|
- Helm
|
||||||
|
- Traefik v2 / IngressRoute
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
See the [values files](values.yaml).
|
84
charts/calibre-server/templates/deployment.yaml
Normal file
84
charts/calibre-server/templates/deployment.yaml
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: calibre-server
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
replicas: {{ .Values.deployment.replicas }}
|
||||||
|
strategy:
|
||||||
|
type: {{ .Values.deployment.strategy }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: calibre-server
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
containers:
|
||||||
|
- name: {{ .Release.Name }}
|
||||||
|
image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.service.http.port }}
|
||||||
|
protocol: TCP
|
||||||
|
- name: content
|
||||||
|
containerPort: {{ .Values.service.content.port }}
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
{{- range $k,$v := .Values.deployment.env }}
|
||||||
|
- name: {{ $k }}
|
||||||
|
value: {{ $v | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.envFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /config
|
||||||
|
name: calibre-server-config
|
||||||
|
- mountPath: /books
|
||||||
|
name: calibre-server-books
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.deployment.resources | nindent 12 }}
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.service.http.port }}
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
timeoutSeconds: 1
|
||||||
|
periodSeconds: 10
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.service.http.port }}
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
timeoutSeconds: 1
|
||||||
|
periodSeconds: 10
|
||||||
|
startupProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.service.http.port }}
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 30
|
||||||
|
timeoutSeconds: 1
|
||||||
|
periodSeconds: 5
|
||||||
|
volumes:
|
||||||
|
- name: calibre-server-config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: calibre-server-config
|
||||||
|
- name: calibre-server-books
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.persistence.books.claimName }}
|
35
charts/calibre-server/templates/ingress-route.yaml
Normal file
35
charts/calibre-server/templates/ingress-route.yaml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{{- if .Values.ingressRoute.enabled }}
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: calibre-server
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: calibre-server
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- kind: Rule
|
||||||
|
match: "Host(`{{ .Values.ingressRoute.http.host }}`)"
|
||||||
|
middlewares:
|
||||||
|
- name: authentik
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
priority: 10
|
||||||
|
services:
|
||||||
|
- kind: Service
|
||||||
|
name: calibre-server
|
||||||
|
port: {{ .Values.service.http.port }}
|
||||||
|
- kind: Rule
|
||||||
|
match: "Host(`{{ .Values.ingressRoute.http.host }}`) && PathPrefix(`/outpost.goauthentik.io/`)"
|
||||||
|
priority: 15
|
||||||
|
services:
|
||||||
|
- kind: Service
|
||||||
|
name: {{ .Values.ingressRoute.authentik.outpost }}
|
||||||
|
port: {{ .Values.ingressRoute.authentik.port }}
|
||||||
|
{{- end }}
|
30
charts/calibre-server/templates/middleware.yaml
Normal file
30
charts/calibre-server/templates/middleware.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{{- if .Values.ingressRoute.enabled }}
|
||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: authentik
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: auth
|
||||||
|
app.kubernetes.io/part-of: calibre-server
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
forwardAuth:
|
||||||
|
address: "http://{{ .Values.ingressRoute.authentik.outpost }}.authentik:{{ .Values.ingressRoute.authentik.port }}/outpost.goauthentik.io/auth/traefik"
|
||||||
|
trustForwardHeader: true
|
||||||
|
authResponseHeaders:
|
||||||
|
- X-authentik-username
|
||||||
|
- X-authentik-groups
|
||||||
|
- X-authentik-email
|
||||||
|
- X-authentik-name
|
||||||
|
- X-authentik-uid
|
||||||
|
- X-authentik-jwt
|
||||||
|
- X-authentik-meta-jwks
|
||||||
|
- X-authentik-meta-outpost
|
||||||
|
- X-authentik-meta-provider
|
||||||
|
- X-authentik-meta-app
|
||||||
|
- X-authentik-meta-version
|
||||||
|
{{- end }}
|
20
charts/calibre-server/templates/persistant-volume-claim.yaml
Normal file
20
charts/calibre-server/templates/persistant-volume-claim.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: calibre-server-config
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.config.storageSize }}
|
||||||
|
storageClassName: {{ .Values.persistence.config.storageClassName }}
|
||||||
|
volumeMode: {{ .Values.persistence.config.volumeMode }}
|
12
charts/calibre-server/templates/service-account.yaml
Normal file
12
charts/calibre-server/templates/service-account.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: calibre-server
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: calibre-server
|
||||||
|
app.kubernetes.io/managed-by: helm
|
46
charts/calibre-server/templates/service.yaml
Normal file
46
charts/calibre-server/templates/service.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: calibre-server
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.http.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: calibre-server-content
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.content.port }}
|
||||||
|
targetPort: content
|
||||||
|
protocol: TCP
|
||||||
|
name: content
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: calibre-server
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
42
charts/calibre-server/values.yaml
Normal file
42
charts/calibre-server/values.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
deployment:
|
||||||
|
replicas: 1
|
||||||
|
strategy: Recreate
|
||||||
|
image:
|
||||||
|
repository: linuxserver/calibre
|
||||||
|
tag: v7.5.1-ls269
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
PGID: "1001"
|
||||||
|
PUID: "1001"
|
||||||
|
TZ: UTC
|
||||||
|
UMASK_SET: "022"
|
||||||
|
CUSTOM_USER: calibre
|
||||||
|
TITLE: Calibre Server
|
||||||
|
NO_DECOR: true
|
||||||
|
envFrom:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 256Mi
|
||||||
|
cpu: 50m
|
||||||
|
limits:
|
||||||
|
memory: 1Gi
|
||||||
|
cpu: 500m
|
||||||
|
service:
|
||||||
|
http:
|
||||||
|
port: 8080
|
||||||
|
content:
|
||||||
|
port: 8081
|
||||||
|
ingressRoute:
|
||||||
|
enabled: true
|
||||||
|
http:
|
||||||
|
host: server.calibre.alexlebens.net
|
||||||
|
authentik:
|
||||||
|
outpost: authentik-proxy-outpost
|
||||||
|
port: 9000
|
||||||
|
persistence:
|
||||||
|
config:
|
||||||
|
storageClassName: ceph-block
|
||||||
|
storageSize: 5Gi
|
||||||
|
volumeMode: Filesystem
|
||||||
|
books:
|
||||||
|
claimName: calibre-server-nfs-storage
|
12
charts/home-assistant/Chart.yaml
Normal file
12
charts/home-assistant/Chart.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: home-assistant
|
||||||
|
version: 0.0.12
|
||||||
|
description: Chart for Home Assistant
|
||||||
|
keywords:
|
||||||
|
- home-automation
|
||||||
|
sources:
|
||||||
|
- https://github.com/home-assistant
|
||||||
|
maintainers:
|
||||||
|
- name: alexlebens
|
||||||
|
icon: https://avatars.githubusercontent.com/u/13844975?s=200&v=4
|
||||||
|
appVersion: v2024.2.4
|
18
charts/home-assistant/README.md
Normal file
18
charts/home-assistant/README.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
## Introduction
|
||||||
|
|
||||||
|
[Home Assistant](https://www.home-assistant.io/)
|
||||||
|
|
||||||
|
Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.
|
||||||
|
|
||||||
|
This chart bootstraps a [Home-Assistant](https://github.com/home-assistant) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Kubernetes
|
||||||
|
- Helm
|
||||||
|
- Traefik v2 / IngressRoute
|
||||||
|
- Authentik / Auth
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
See the [values files](values.yaml).
|
99
charts/home-assistant/templates/deployment.yaml
Normal file
99
charts/home-assistant/templates/deployment.yaml
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
revisionHistoryLimit: 3
|
||||||
|
replicas: {{ .Values.deployment.replicas }}
|
||||||
|
strategy:
|
||||||
|
type: {{ .Values.deployment.strategy }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: home-assistant
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
containers:
|
||||||
|
- name: {{ .Release.Name }}
|
||||||
|
image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.service.http.port }}
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
{{- range $k,$v := .Values.deployment.env }}
|
||||||
|
- name: {{ $k }}
|
||||||
|
value: {{ $v | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.envFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /config
|
||||||
|
name: home-assistant-config
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.deployment.resources | nindent 12 }}
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.service.http.port }}
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
timeoutSeconds: 1
|
||||||
|
periodSeconds: 10
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.service.http.port }}
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 3
|
||||||
|
timeoutSeconds: 1
|
||||||
|
periodSeconds: 10
|
||||||
|
startupProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.service.http.port }}
|
||||||
|
initialDelaySeconds: 0
|
||||||
|
failureThreshold: 30
|
||||||
|
timeoutSeconds: 1
|
||||||
|
periodSeconds: 5
|
||||||
|
{{- if .Values.codeserver.enabled }}
|
||||||
|
- name: codeserver
|
||||||
|
image: "{{ .Values.codeserver.image.repository }}:{{ .Values.codeserver.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.codeserver.image.imagePullPolicy }}
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.codeserver.service.http.port }}
|
||||||
|
name: codeserver-http
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
{{- range $k,$v := .Values.codeserver.env }}
|
||||||
|
- name: {{ $k }}
|
||||||
|
value: {{ $v | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.codeserver.envFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.codeserver.securityContext | nindent 12 }}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /config/home-assistant
|
||||||
|
name: home-assistant-config
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: home-assistant-config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: home-assistant-config
|
62
charts/home-assistant/templates/ingress-route.yaml
Normal file
62
charts/home-assistant/templates/ingress-route.yaml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{{- if .Values.ingressRoute.enabled }}
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: home-assistant
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- kind: Rule
|
||||||
|
match: "Host(`{{ .Values.ingressRoute.host }}`)"
|
||||||
|
middlewares:
|
||||||
|
- name: authentik
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
priority: 10
|
||||||
|
services:
|
||||||
|
- kind: Service
|
||||||
|
name: home-assistant
|
||||||
|
port: {{ .Values.service.http.port }}
|
||||||
|
- kind: Rule
|
||||||
|
match: "Host(`{{ .Values.ingressRoute.host }}`) && PathPrefix(`/outpost.goauthentik.io/`)"
|
||||||
|
priority: 15
|
||||||
|
services:
|
||||||
|
- kind: Service
|
||||||
|
name: {{ .Values.ingressRoute.authentik.outpost }}
|
||||||
|
port: {{ .Values.ingressRoute.authentik.port }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
---
|
||||||
|
{{- if and .Values.codeserver.ingressRoute.enabled .Values.codeserver.enabled }}
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: home-assistant-codeserver
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: home-assistant
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- kind: Rule
|
||||||
|
match: "Host(`{{ .Values.codeserver.ingressRoute.host }}`)"
|
||||||
|
priority: 10
|
||||||
|
services:
|
||||||
|
- kind: Service
|
||||||
|
name: home-assistant-codeserver
|
||||||
|
port: {{ .Values.codeserver.service.http.port }}
|
||||||
|
{{- end }}
|
30
charts/home-assistant/templates/middleware.yaml
Normal file
30
charts/home-assistant/templates/middleware.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{{- if .Values.ingressRoute.enabled }}
|
||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: authentik
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: auth
|
||||||
|
app.kubernetes.io/part-of: home-assistant
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
forwardAuth:
|
||||||
|
address: "http://{{ .Values.ingressRoute.authentik.outpost }}.authentik:{{ .Values.ingressRoute.authentik.port }}/outpost.goauthentik.io/auth/traefik"
|
||||||
|
trustForwardHeader: true
|
||||||
|
authResponseHeaders:
|
||||||
|
- X-authentik-username
|
||||||
|
- X-authentik-groups
|
||||||
|
- X-authentik-email
|
||||||
|
- X-authentik-name
|
||||||
|
- X-authentik-uid
|
||||||
|
- X-authentik-jwt
|
||||||
|
- X-authentik-meta-jwks
|
||||||
|
- X-authentik-meta-outpost
|
||||||
|
- X-authentik-meta-provider
|
||||||
|
- X-authentik-meta-app
|
||||||
|
- X-authentik-meta-version
|
||||||
|
{{- end }}
|
20
charts/home-assistant/templates/persistant-volume-claim.yaml
Normal file
20
charts/home-assistant/templates/persistant-volume-claim.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: home-assistant-config
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.config.storageSize }}
|
||||||
|
storageClassName: {{ .Values.persistence.config.storageClassName }}
|
||||||
|
volumeMode: {{ .Values.persistence.config.volumeMode }}
|
19
charts/home-assistant/templates/prometheus-rule.yaml
Normal file
19
charts/home-assistant/templates/prometheus-rule.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PrometheusRule
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: home-assistant
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
groups:
|
||||||
|
- name: {{ .Release.Name }}
|
||||||
|
rules:
|
||||||
|
{{- toYaml .Values.metrics.prometheusRule.rules | nindent 8 }}
|
||||||
|
{{- end }}
|
12
charts/home-assistant/templates/service-account.yaml
Normal file
12
charts/home-assistant/templates/service-account.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: home-assistant
|
||||||
|
app.kubernetes.io/managed-by: helm
|
27
charts/home-assistant/templates/service-monitor.yaml
Normal file
27
charts/home-assistant/templates/service-monitor.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{{- if .Values.metrics.enabled }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: home-assistant
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
endpoints:
|
||||||
|
- port: http
|
||||||
|
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||||
|
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||||
|
path: /api/prometheus
|
||||||
|
bearerTokenSecret:
|
||||||
|
name: {{ .Values.metrics.serviceMonitor.bearerTokenSecret.name }}
|
||||||
|
key: {{ .Values.metrics.serviceMonitor.bearerTokenSecret.key }}
|
||||||
|
{{- end }}
|
48
charts/home-assistant/templates/service.yaml
Normal file
48
charts/home-assistant/templates/service.yaml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: home-assistant
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.http.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
|
||||||
|
---
|
||||||
|
{{- if .Values.codeserver.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: home-assistant-codeserver
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: web
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.codeserver.service.http.port }}
|
||||||
|
targetPort: codeserver-http
|
||||||
|
protocol: TCP
|
||||||
|
name: codeserver-http
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: home-assistant
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
74
charts/home-assistant/values.yaml
Normal file
74
charts/home-assistant/values.yaml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
deployment:
|
||||||
|
replicas: 1
|
||||||
|
strategy: Recreate
|
||||||
|
image:
|
||||||
|
repository: homeassistant/home-assistant
|
||||||
|
tag: 2024.2.4
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
TZ: US/Mountain
|
||||||
|
envFrom:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
|
cpu: 50m
|
||||||
|
limits:
|
||||||
|
memory: 1Gi
|
||||||
|
cpu: 500m
|
||||||
|
service:
|
||||||
|
http:
|
||||||
|
port: 8123
|
||||||
|
ingressRoute:
|
||||||
|
enabled: true
|
||||||
|
host: homeassistant.alexlebens.net
|
||||||
|
authentik:
|
||||||
|
outpost: authentik-proxy-outpost
|
||||||
|
port: 9000
|
||||||
|
metrics:
|
||||||
|
enabled: false
|
||||||
|
serviceMonitor:
|
||||||
|
interval: 1m
|
||||||
|
scrapeTimeout: 30s
|
||||||
|
## See https://www.home-assistant.io/docs/authentication/ for where to find
|
||||||
|
## long lived access token creation under your account profile, which is
|
||||||
|
## needed to monitor Home Assistant
|
||||||
|
bearerTokenSecret:
|
||||||
|
name: ""
|
||||||
|
key: ""
|
||||||
|
prometheusRule:
|
||||||
|
enabled: false
|
||||||
|
rules:
|
||||||
|
- alert: HomeAssistantAbsent
|
||||||
|
annotations:
|
||||||
|
description: Home Assistant has disappeared from Prometheus service discovery.
|
||||||
|
summary: Home Assistant is down.
|
||||||
|
expr: |
|
||||||
|
absent(up{job=~".*home-assistant.*"} == 1)
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: critical
|
||||||
|
persistence:
|
||||||
|
config:
|
||||||
|
storageClassName: ceph-block
|
||||||
|
storageSize: 1Gi
|
||||||
|
volumeMode: Filesystem
|
||||||
|
codeserver:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
repository: linuxserver/code-server
|
||||||
|
tag: 4.21.1
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
TZ: US/Mountain
|
||||||
|
PUID: 1000
|
||||||
|
PGID: 1000
|
||||||
|
DEFAULT_WORKSPACE: /config
|
||||||
|
envFrom:
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
service:
|
||||||
|
http:
|
||||||
|
port: 8443
|
||||||
|
ingressRoute:
|
||||||
|
enabled: true
|
||||||
|
host: codeserver.homeassistant.alexlebens.net
|
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: homepage
|
name: homepage
|
||||||
version: 0.0.1
|
version: 0.0.5
|
||||||
description: Chart for benphelps homepage
|
description: Chart for benphelps homepage
|
||||||
keywords:
|
keywords:
|
||||||
- dashboard
|
- dashboard
|
||||||
@@ -9,4 +9,4 @@ sources:
|
|||||||
maintainers:
|
maintainers:
|
||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
icon: https://github.com/benphelps/homepage/blob/de584eae8f12a0d257e554e9511ef19bd2a1232c/public/mstile-150x150.png
|
icon: https://github.com/benphelps/homepage/blob/de584eae8f12a0d257e554e9511ef19bd2a1232c/public/mstile-150x150.png
|
||||||
appVersion: 0.8.7
|
appVersion: v0.8.8
|
||||||
|
@@ -40,6 +40,10 @@ spec:
|
|||||||
- name: {{ $k }}
|
- name: {{ $k }}
|
||||||
value: {{ $v | quote }}
|
value: {{ $v | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.deployment.envFrom }}
|
||||||
|
envFrom:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: homepage-config
|
- name: homepage-config
|
||||||
subPath: bookmarks.yaml
|
subPath: bookmarks.yaml
|
||||||
|
@@ -2,17 +2,18 @@ deployment:
|
|||||||
replicas: 1
|
replicas: 1
|
||||||
strategy: Recreate
|
strategy: Recreate
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/benphelps/homepage
|
repository: ghcr.io/gethomepage/homepage
|
||||||
tag: v0.8.7
|
tag: v0.8.8
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
|
envFrom:
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: 50Mi
|
memory: 256Mi
|
||||||
cpu: 10m
|
cpu: 50m
|
||||||
limits:
|
limits:
|
||||||
memory: 200Mi
|
memory: 512Mi
|
||||||
cpu: 500m
|
cpu: 500m
|
||||||
service:
|
service:
|
||||||
http:
|
http:
|
||||||
port: 3000
|
port: 3000
|
||||||
|
13
charts/postgres-cluster/Chart.yaml
Normal file
13
charts/postgres-cluster/Chart.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: postgres-cluster
|
||||||
|
version: 0.1.0
|
||||||
|
description: Chart for cloudnative-pg cluster
|
||||||
|
keywords:
|
||||||
|
- database
|
||||||
|
- postgres
|
||||||
|
sources:
|
||||||
|
- https://github.com/cloudnative-pg/cloudnative-pg
|
||||||
|
maintainers:
|
||||||
|
- name: alexlebens
|
||||||
|
icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4
|
||||||
|
appVersion: v1.22.1
|
17
charts/postgres-cluster/README.md
Normal file
17
charts/postgres-cluster/README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
## Introduction
|
||||||
|
|
||||||
|
[CloudNative PG](https://github.com/cloudnative-pg/cloudnative-pg)
|
||||||
|
|
||||||
|
CloudNativePG is the Kubernetes operator that covers the full lifecycle of a highly available PostgreSQL database cluster with a primary/standby architecture, using native streaming replication.
|
||||||
|
|
||||||
|
This chart bootstraps a [CNPG](https://github.com/cloudnative-pg/cloudnative-pg) cluster on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Kubernetes
|
||||||
|
- Helm
|
||||||
|
- CloudNative PG Operator
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
See the [values files](values.yaml).
|
82
charts/postgres-cluster/templates/postgresql-cluster.yaml
Normal file
82
charts/postgres-cluster/templates/postgresql-cluster.yaml
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: "postgresql-{{ .Release.Name }}-cluster"
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: postgresql
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: database
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
imageName: "{{ .Values.cluster.imageRepo }}:{{ .Values.cluster.imageTag }}"
|
||||||
|
instances: {{ .Values.cluster.instances }}
|
||||||
|
replicationSlots:
|
||||||
|
highAvailability:
|
||||||
|
enabled: true
|
||||||
|
affinity:
|
||||||
|
enablePodAntiAffinity: true
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
postgresql:
|
||||||
|
parameters:
|
||||||
|
{{- toYaml .Values.cluster.parameters | nindent 6 }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.cluster.resources | nindent 4 }}
|
||||||
|
storage:
|
||||||
|
storageClass: {{ .Values.cluster.storage.data.storageClass }}
|
||||||
|
size: {{ .Values.cluster.storage.data.size }}
|
||||||
|
walStorage:
|
||||||
|
storageClass: {{ .Values.cluster.storage.wal.storageClass }}
|
||||||
|
size: {{ .Values.cluster.storage.wal.size }}
|
||||||
|
monitoring:
|
||||||
|
enablePodMonitor: true
|
||||||
|
|
||||||
|
{{- if .Values.bootstrap.initdbEnabled }}
|
||||||
|
bootstrap:
|
||||||
|
initdb:
|
||||||
|
{{- toYaml .Values.bootstrap.initdb | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.backup.recoveryEnabled }}
|
||||||
|
bootstrap:
|
||||||
|
recovery:
|
||||||
|
source: "postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backup.recoveryIndex }}"
|
||||||
|
externalClusters:
|
||||||
|
- name: "postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backup.recoveryIndex }}"
|
||||||
|
barmanObjectStore:
|
||||||
|
endpointURL: {{ .Values.backup.endpointURL }}
|
||||||
|
destinationPath: "s3://{{ .Values.backup.bucket }}/{{ .Values.cluster.name }}/postgresql/{{ .Release.Name }}-cluster"
|
||||||
|
s3Credentials:
|
||||||
|
accessKeyId:
|
||||||
|
name: "postgresql-{{ .Release.Name }}-cluster-backup-secret"
|
||||||
|
key: ACCESS_KEY_ID
|
||||||
|
secretAccessKey:
|
||||||
|
name: "postgresql-{{ .Release.Name }}-cluster-backup-secret"
|
||||||
|
key: ACCESS_SECRET_KEY
|
||||||
|
data:
|
||||||
|
compression: {{ .Values.backup.compression }}
|
||||||
|
wal:
|
||||||
|
compression: {{ .Values.backup.compression }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.backup.backupEnabled }}
|
||||||
|
backup:
|
||||||
|
retentionPolicy: "{{ .Values.backup.retentionPolicy }}"
|
||||||
|
barmanObjectStore:
|
||||||
|
destinationPath: "s3://{{ .Values.backup.bucket }}/{{ .Values.cluster.name }}/postgresql/{{ .Release.Name }}-cluster"
|
||||||
|
endpointURL: {{ .Values.backup.endpointURL }}
|
||||||
|
serverName: "postgresql-{{ .Release.Name }}-cluster-backup-index-{{ .Values.backup.backupIndex }}"
|
||||||
|
s3Credentials:
|
||||||
|
accessKeyId:
|
||||||
|
name: "postgresql-{{ .Release.Name }}-cluster-backup-secret"
|
||||||
|
key: ACCESS_KEY_ID
|
||||||
|
secretAccessKey:
|
||||||
|
name: "postgresql-{{ .Release.Name }}-cluster-backup-secret"
|
||||||
|
key: ACCESS_SECRET_KEY
|
||||||
|
data:
|
||||||
|
compression: {{ .Values.backup.compression }}
|
||||||
|
wal:
|
||||||
|
compression: {{ .Values.backup.compression }}
|
||||||
|
{{- end }}
|
17
charts/postgres-cluster/templates/scheduled-backup.yaml
Normal file
17
charts/postgres-cluster/templates/scheduled-backup.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: ScheduledBackup
|
||||||
|
metadata:
|
||||||
|
name: "postgresql-{{ .Release.Name }}-cluster-backup"
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: postgresql
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: database
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: helm
|
||||||
|
spec:
|
||||||
|
schedule: {{ .Values.backup.schedule }}
|
||||||
|
backupOwnerReference: self
|
||||||
|
cluster:
|
||||||
|
name: "postgresql-{{ .Release.Name }}-cluster"
|
39
charts/postgres-cluster/values.yaml
Normal file
39
charts/postgres-cluster/values.yaml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
cluster:
|
||||||
|
name: cl01tl
|
||||||
|
imageName: ghcr.io/cloudnative-pg/postgresql
|
||||||
|
imageTag: 16.0
|
||||||
|
instances: 2
|
||||||
|
parameters:
|
||||||
|
shared_buffers: 128MB
|
||||||
|
max_slot_wal_keep_size: 2000MB
|
||||||
|
hot_standby_feedback: "on"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
|
cpu: 100m
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
|
cpu: 1500m
|
||||||
|
hugepages-2Mi: 512Mi
|
||||||
|
storage:
|
||||||
|
data:
|
||||||
|
storageClass: ceph-block
|
||||||
|
size: 10Gi
|
||||||
|
wal:
|
||||||
|
storageClass: ceph-block
|
||||||
|
size: 2Gi
|
||||||
|
bootstrap:
|
||||||
|
initdbEnabled: false
|
||||||
|
initdb:
|
||||||
|
database: app
|
||||||
|
owner: app
|
||||||
|
backup:
|
||||||
|
backupEnabled: true
|
||||||
|
recoveryEnabled: false
|
||||||
|
schedule: "0 0 0 * * *"
|
||||||
|
retentionPolicy: 14d
|
||||||
|
backupIndex: 1
|
||||||
|
recoveryIndex: 1
|
||||||
|
endpointURL: https://nyc3.digitaloceanspaces.com
|
||||||
|
bucket: net-infra
|
||||||
|
compression: snappy
|
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"extends": [
|
|
||||||
"config:base",
|
|
||||||
"mergeConfidence:all-badges"
|
|
||||||
],
|
|
||||||
"timezone": "MST7MDT",
|
|
||||||
"schedule": "before 8am every weekday",
|
|
||||||
"ignoreTests": true,
|
|
||||||
"lockFileMaintenance": {
|
|
||||||
"enabled": true,
|
|
||||||
"automerge": true
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user