mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-23 23:49:12 +00:00
[lazylibrarian] Added chart (#326)
This commit is contained in:
parent
b247d19865
commit
8c201defc6
23
charts/lazylibrarian/.helmignore
Normal file
23
charts/lazylibrarian/.helmignore
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
16
charts/lazylibrarian/Chart.yaml
Normal file
16
charts/lazylibrarian/Chart.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: lazylibrarian
|
||||||
|
description: A Helm chart for deploying LazyLibrarian
|
||||||
|
version: 1.0.0
|
||||||
|
appVersion: 581cdfb3-ls23
|
||||||
|
keywords:
|
||||||
|
- lazylibrarian
|
||||||
|
- ebooks
|
||||||
|
home: https://github.com/billimek/charts/lazylibrarian
|
||||||
|
icon: https://lazylibrarian.gitlab.io/logo.svg
|
||||||
|
sources:
|
||||||
|
- https://gitlab.com/LazyLibrarian/LazyLibrarian.git
|
||||||
|
- https://lazylibrarian.gitlab.io
|
||||||
|
maintainers:
|
||||||
|
- name: billimek
|
||||||
|
email: jeff@billimek.com
|
101
charts/lazylibrarian/README.md
Normal file
101
charts/lazylibrarian/README.md
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
# LazyLibrarian helm chart
|
||||||
|
|
||||||
|
This is a helm chart for [LazyLibrarian](https://gitlab.com/LazyLibrarian/LazyLibrarian.git) based on the [container image provided by LinuxServer.io](https://hub.docker.com/r/linuxserver/lazylibrarian/).
|
||||||
|
|
||||||
|
## TL;DR
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ helm repo add billimek https://billimek.com/billimek-charts/
|
||||||
|
$ helm install billimek/lazylibrarian
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installing the Chart
|
||||||
|
|
||||||
|
To install the chart with the release name `my-release`:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
helm install my-release billimek/lazylibrarian
|
||||||
|
```
|
||||||
|
|
||||||
|
## Uninstalling the Chart
|
||||||
|
|
||||||
|
To uninstall/delete the `my-release` deployment:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
helm delete my-release --purge
|
||||||
|
```
|
||||||
|
|
||||||
|
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The following tables lists the configurable parameters of the LazyLibrarian chart and their default values.
|
||||||
|
|
||||||
|
| Parameter | Description | Default |
|
||||||
|
| ------------------------------------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
|
||||||
|
| `image.repository` | Image repository | `linuxserver/lazylibrarian` |
|
||||||
|
| `image.tag` | Image tag. Possible values listed [here](https://hub.docker.com/r/linuxserver/lazylibrarian/tags/). | `581cdfb3-ls23` |
|
||||||
|
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
|
||||||
|
| `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` |
|
||||||
|
| `timezone` | Timezone the instance should run as, e.g. 'America/New_York' | `UTC` |
|
||||||
|
| `puid` | process userID the instance should run as | `1001` |
|
||||||
|
| `pgid` | process groupID the instance should run as | `1001` |
|
||||||
|
| `dockerMods.calibre.enabled` | Enable optional calibre conversion feature. refer [here](https://github.com/linuxserver/docker-lazylibrarian#application-setup) | `false` |
|
||||||
|
| `dockerMods.calibre.image.repository` | DockerMod image repository | `linuxserver/calibre-web` |
|
||||||
|
| `dockerMods.calibre.image.tag` | DockerMod image tag. Can be found [here](https://hub.docker.com/r/linuxserver/calibre-web/tags/) | `calibre` |
|
||||||
|
| `dockerMods.ffmpeg.enabled` | Enable optional ffmpeg conversion feature. refer [here](https://github.com/linuxserver/docker-lazylibrarian#application-setup) | `false` |
|
||||||
|
| `dockerMods.ffmpeg.image.repository` | DockerMod image repository | `linuxserver/mods` |
|
||||||
|
| `dockerMods.ffmpeg.image.tag` | DockerMod image tag. | `lazylibrarian-ffmpeg` |
|
||||||
|
| `probes.liveness.enabled` | Enables liveness probe for the main container | `true` |
|
||||||
|
| `probes.liveness.initialDelaySeconds` | Specify liveness `initialDelaySeconds` parameter for the main container | `60` |
|
||||||
|
| `probes.liveness.failureThreshold` | Specify liveness `failureThreshold` parameter for the main container | `5` |
|
||||||
|
| `probes.liveness.timeoutSeconds` | Specify liveness `timeoutSeconds` parameter for the main container | `10` |
|
||||||
|
| `probes.readiness.enabled` | Enables readiness probe for the main container | `true` |
|
||||||
|
| `probes.readiness.initialDelaySeconds` | Specify readiness `initialDelaySeconds` parameter for the main container | `60` |
|
||||||
|
| `probes.readiness.failureThreshold` | Specify readiness `failureThreshold` parameter for the main container | `5` |
|
||||||
|
| `probes.readiness.timeoutSeconds` | Specify readiness `timeoutSeconds` parameter for the main container | `10` |
|
||||||
|
| `probes.startup.enabled` | Enables startup probe for the main container | `false` |
|
||||||
|
| `probes.startup.failureThreshold` | Specify startup `failureThreshold` parameter for the main container | `30` |
|
||||||
|
| `probes.startup.timeoutSeconds` | Specify startup `periodSeconds` parameter for the main container | `10` |
|
||||||
|
| `service.type` | Kubernetes service type for the GUI | `ClusterIP` |
|
||||||
|
| `service.port` | Kubernetes port where the GUI is exposed | `5299` |
|
||||||
|
| `service.annotations` | Service annotations for the GUI | `{}` |
|
||||||
|
| `service.labels` | Custom labels | `{}` |
|
||||||
|
| `service.loadBalancerIP` | Loadbalancer IP for the GUI | `{}` |
|
||||||
|
| `service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None |
|
||||||
|
| `ingress.enabled` | Enables Ingress | `false` |
|
||||||
|
| `ingress.annotations` | Ingress annotations | `{}` |
|
||||||
|
| `ingress.labels` | Custom labels | `{}` |
|
||||||
|
| `ingress.path` | Ingress path | `/` |
|
||||||
|
| `ingress.hosts` | Ingress accepted hostnames | `chart-example.local` |
|
||||||
|
| `ingress.tls` | Ingress TLS configuration | `[]` |
|
||||||
|
| `persistence.enabled` | Use persistent volume to store configuration data | `true` |
|
||||||
|
| `persistence.size` | Size of persistent volume claim | `1Gi` |
|
||||||
|
| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` |
|
||||||
|
| `persistence.storageClass` | Type of persistent volume claim | `-` |
|
||||||
|
| `persistence.subPath` | Mount a sub directory if set | `nil ` |
|
||||||
|
| `persistence.accessMode` | Persistence access mode | `ReadWriteOnce` |
|
||||||
|
| `persistence.extraVolumes` | Optionally add multiple additional volumes | `[]` |
|
||||||
|
| `resources` | CPU/Memory resource requests/limits | `{}` |
|
||||||
|
| `nodeSelector` | Node labels for pod assignment | `{}` |
|
||||||
|
| `tolerations` | Toleration labels for pod assignment | `[]` |
|
||||||
|
| `affinity` | Affinity settings for pod assignment | `{}` |
|
||||||
|
| `podAnnotations` | Key-value pairs to add as pod annotations | `{}` |
|
||||||
|
|
||||||
|
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm install my-release \
|
||||||
|
--set timezone="Europe/Amsterdam" \
|
||||||
|
billimek/lazylibrarian
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
||||||
|
|
||||||
|
```console
|
||||||
|
helm install my-release -f values.yaml billimek/lazylibrarian
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Read through the [values.yaml](https://github.com/billimek/charts/lazylibrarian/values.yaml) file. It has several commented out suggested values.
|
21
charts/lazylibrarian/templates/NOTES.txt
Normal file
21
charts/lazylibrarian/templates/NOTES.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
|
{{- range $host := .Values.ingress.hosts }}
|
||||||
|
{{- range .paths }}
|
||||||
|
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "lazylibrarian.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "lazylibrarian.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "lazylibrarian.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "lazylibrarian.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:{{ .Values.service.port }}
|
||||||
|
{{- end }}
|
107
charts/lazylibrarian/templates/_helpers.tpl
Normal file
107
charts/lazylibrarian/templates/_helpers.tpl
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "lazylibrarian.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "lazylibrarian.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "lazylibrarian.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "lazylibrarian.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "lazylibrarian.chart" . }}
|
||||||
|
{{ include "lazylibrarian.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "lazylibrarian.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "lazylibrarian.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "lazylibrarian.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "lazylibrarian.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Determine the addons to be installed
|
||||||
|
*/}}
|
||||||
|
{{- define "lazylibrarian.enabledAddons" -}}
|
||||||
|
{{- $enabledAddons := list -}}
|
||||||
|
{{- if .Values.dockerMods.calibre.enabled }}
|
||||||
|
{{- $enabledAddons = printf "%s:%s" .Values.dockerMods.calibre.image.repository .Values.dockerMods.calibre.image.tag | append $enabledAddons -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.dockerMods.ffmpeg.enabled }}
|
||||||
|
{{- $enabledAddons = printf "%s:%s" .Values.dockerMods.ffmpeg.image.repository .Values.dockerMods.ffmpeg.image.tag | append $enabledAddons -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- join "|" $enabledAddons | quote -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Get the additional volumes
|
||||||
|
*/}}
|
||||||
|
{{- define "lazylibrarian.extraVolumes" -}}
|
||||||
|
{{- if .Values.persistence.extraVolumes }}
|
||||||
|
{{- $extraVolumes := .Values.persistence.extraVolumes -}}
|
||||||
|
{{- range $extraVolumes }}
|
||||||
|
{{- $_ := unset . "mountPath" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- toYaml $extraVolumes }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Get the additional volumeMounts
|
||||||
|
*/}}
|
||||||
|
{{- define "lazylibrarian.extraVolumeMounts" -}}
|
||||||
|
{{- if .Values.persistence.extraVolumes }}
|
||||||
|
{{- $extraVolumeMounts := list -}}
|
||||||
|
{{- range .Values.persistence.extraVolumes }}
|
||||||
|
{{- if .mountPath }}
|
||||||
|
{{- $extraVolumeMounts = dict "name" .name "mountPath" .mountPath | append $extraVolumeMounts -}}
|
||||||
|
{{- else }}
|
||||||
|
{{- $extraVolumeMounts = dict "name" .name "mountPath" (printf "/mnt/%s" .name) | append $extraVolumeMounts -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- toYaml $extraVolumeMounts }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
15
charts/lazylibrarian/templates/hpa.yaml
Normal file
15
charts/lazylibrarian/templates/hpa.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{{- if .Values.autoscaling.enabled }}
|
||||||
|
apiVersion: autoscaling/v2beta1
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: {{ include "lazylibrarian.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "lazylibrarian.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
name: {{ include "lazylibrarian.fullname" . }}
|
||||||
|
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||||
|
{{- end }}
|
41
charts/lazylibrarian/templates/ingress.yaml
Normal file
41
charts/lazylibrarian/templates/ingress.yaml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $fullName := include "lazylibrarian.fullname" . -}}
|
||||||
|
{{- $svcPort := .Values.service.port -}}
|
||||||
|
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
{{- else -}}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
{{- end }}
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ $fullName }}
|
||||||
|
labels:
|
||||||
|
{{- include "lazylibrarian.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
{{- range .hosts }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ .host | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- range .paths }}
|
||||||
|
- path: {{ . }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $fullName }}
|
||||||
|
servicePort: {{ $svcPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
32
charts/lazylibrarian/templates/service.yaml
Normal file
32
charts/lazylibrarian/templates/service.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "lazylibrarian.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "lazylibrarian.labels" . | nindent 4 }}
|
||||||
|
{{- if .Values.service.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml .Values.service.annotations | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if .Values.service.loadBalancerIP }}
|
||||||
|
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.service.load }}
|
||||||
|
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.service.loadBalancerSourceRanges }}
|
||||||
|
loadBalancerSourceRanges:
|
||||||
|
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.service.externalTrafficPolicy }}
|
||||||
|
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
{{- include "lazylibrarian.selectorLabels" . | nindent 4 }}
|
12
charts/lazylibrarian/templates/serviceaccount.yaml
Normal file
12
charts/lazylibrarian/templates/serviceaccount.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "lazylibrarian.serviceAccountName" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "lazylibrarian.labels" . | nindent 4 }}
|
||||||
|
{{- with .Values.serviceAccount.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
132
charts/lazylibrarian/templates/statefulset.yaml
Normal file
132
charts/lazylibrarian/templates/statefulset.yaml
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ include "lazylibrarian.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "lazylibrarian.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
{{- if not .Values.autoscaling.enabled }}
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "lazylibrarian.selectorLabels" . | nindent 6 }}
|
||||||
|
serviceName: {{ include "lazylibrarian.name" . }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "lazylibrarian.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "lazylibrarian.serviceAccountName" . }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.service.port }}
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: {{ .Values.timezone }}
|
||||||
|
- name: PUID
|
||||||
|
value: {{ .Values.puid | quote }}
|
||||||
|
- name: PGID
|
||||||
|
value: {{ .Values.pgid | quote }}
|
||||||
|
- name: DOCKER_MODS
|
||||||
|
value: {{ include "lazylibrarian.enabledAddons" . }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /config
|
||||||
|
{{- include "lazylibrarian.extraVolumeMounts" . | nindent 12 }}
|
||||||
|
{{- if .Values.probes.liveness.enabled }}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: http
|
||||||
|
scheme: {{ .Values.probes.liveness.scheme }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||||
|
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.probes.readiness.enabled }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: http
|
||||||
|
scheme: {{ .Values.probes.readiness.scheme }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||||
|
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.probes.startup.enabled }}
|
||||||
|
startupProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: http
|
||||||
|
scheme: {{ .Values.probes.startup.scheme }}
|
||||||
|
failureThreshold: {{ .Values.probes.startup.failureThreshold }}
|
||||||
|
periodSeconds: {{ .Values.probes.startup.periodSeconds }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
{{- if not .Values.persistence.enabled }}
|
||||||
|
- name: config
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
|
||||||
|
- name: config
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.persistence.existingClaim }}
|
||||||
|
{{- end }}
|
||||||
|
{{- include "lazylibrarian.extraVolumes" . | nindent 8 }}
|
||||||
|
|
||||||
|
volumeClaimTemplates:
|
||||||
|
{{- if and .Values.persistence.enabled ( not .Values.persistence.existingClaim ) }}
|
||||||
|
- metadata:
|
||||||
|
name: config
|
||||||
|
labels:
|
||||||
|
{{- include "lazylibrarian.labels" . | nindent 10 }}
|
||||||
|
{{- if .Values.persistence.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml .Values.persistence.annotations | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
accessModes: [ {{ .Values.persistence.accessMode | quote }} ]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.size | quote }}
|
||||||
|
{{- if .Values.persistence.storageClass }}
|
||||||
|
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||||
|
storageClassName: ""
|
||||||
|
{{- else }}
|
||||||
|
storageClassName: {{ .Values.persistence.storageClass | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
153
charts/lazylibrarian/values.yaml
Normal file
153
charts/lazylibrarian/values.yaml
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
# Default values for lazylibrarian.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
autoscaling:
|
||||||
|
enabled: false
|
||||||
|
minReplicas: 1
|
||||||
|
maxReplicas: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: linuxserver/lazylibrarian
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
|
tag: 581cdfb3-ls23
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
timezone: UTC
|
||||||
|
puid: 1001
|
||||||
|
pgid: 1001
|
||||||
|
|
||||||
|
# Linuxserver.io additional layers.
|
||||||
|
# Enables additional features for the image, at the cost of increased size and
|
||||||
|
# possible incompatabilities with certain architectures. Disabled by default.
|
||||||
|
#
|
||||||
|
# To enable, set enabled to true, and follow the guide at: https://github.com/linuxserver/docker-lazylibrarian#application-setup
|
||||||
|
# to configure the application.
|
||||||
|
dockerMods:
|
||||||
|
# Enable the Calibre Docker Mod to allow Calibredb import
|
||||||
|
calibre:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
repository: linuxserver/calibre-web
|
||||||
|
tag: calibre
|
||||||
|
# Enable the FFMpeg Docker Mod. This allows using the audiobook conversion features of LazyLibrarian.
|
||||||
|
ffmpeg:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
repository: linuxserver/mods
|
||||||
|
tag: lazylibrarian-ffmpeg
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: ""
|
||||||
|
|
||||||
|
podAnnotations: {}
|
||||||
|
|
||||||
|
podSecurityContext: {}
|
||||||
|
# fsGroup: 2000
|
||||||
|
|
||||||
|
securityContext: {}
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
enabled: false
|
||||||
|
annotations: {}
|
||||||
|
## lazylibrarian data Persistent Volume Storage Class
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
|
||||||
|
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||||
|
## the existingClaim variable
|
||||||
|
##
|
||||||
|
# existingClaim: lazylibrarian-config
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 1Gi
|
||||||
|
|
||||||
|
# Any extra volumes to define for the pod
|
||||||
|
# Volumes will be mounted to the folder specified under mountPath
|
||||||
|
# If no mountPath is set it will be mounted to /mnt/<name>
|
||||||
|
extraVolumes: []
|
||||||
|
# - name: example-name
|
||||||
|
# hostPath:
|
||||||
|
# path: /path/on/host
|
||||||
|
# type: DirectoryOrCreate
|
||||||
|
# mountPath: "/mnt/test"
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 5299
|
||||||
|
# externalTrafficPolicy: Local
|
||||||
|
# loadBalancerIP: ""
|
||||||
|
# loadBalancerSourceRanges: []
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: false
|
||||||
|
annotations: {}
|
||||||
|
# kubernetes.io/ingress.class: nginx
|
||||||
|
# kubernetes.io/tls-acme: "true"
|
||||||
|
hosts:
|
||||||
|
- host: chart-example.local
|
||||||
|
paths: []
|
||||||
|
tls: []
|
||||||
|
# - secretName: chart-example-tls
|
||||||
|
# hosts:
|
||||||
|
# - chart-example.local
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: true
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
failureThreshold: 5
|
||||||
|
timeoutSeconds: 10
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
failureThreshold: 5
|
||||||
|
timeoutSeconds: 10
|
||||||
|
startup:
|
||||||
|
enabled: false
|
||||||
|
scheme: HTTP
|
||||||
|
failureThreshold: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
Loading…
Reference in New Issue
Block a user