From f06aa3a175688ec52dd0e941d18849679fbdbf13 Mon Sep 17 00:00:00 2001 From: alexlebens Date: Sun, 21 Apr 2024 03:59:25 -0600 Subject: [PATCH] add lazy-librarian --- charts/lazy-librarian/Chart.yaml | 18 ++ charts/lazy-librarian/README.md | 85 ++++++++ charts/lazy-librarian/values.yaml | 323 ++++++++++++++++++++++++++++++ 3 files changed, 426 insertions(+) create mode 100644 charts/lazy-librarian/Chart.yaml create mode 100644 charts/lazy-librarian/README.md create mode 100644 charts/lazy-librarian/values.yaml diff --git a/charts/lazy-librarian/Chart.yaml b/charts/lazy-librarian/Chart.yaml new file mode 100644 index 0000000..ed95c0e --- /dev/null +++ b/charts/lazy-librarian/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v2 +name: lazy-librarian +version: 0.1.0 +description: A Helm chart for deploying LazyLibrarian +keywords: + - lazylibrarian + - ebooks +sources: + - https://gitlab.com/LazyLibrarian/LazyLibrarian.git + - https://lazylibrarian.gitlab.io +maintainers: + - name: alexlebens +dependencies: + - name: common + repository: https://bjw-s.github.io/helm-charts/ + version: 3.1.0 +icon: https://lazylibrarian.gitlab.io/logo.svg +appVersion: version-1152df82 diff --git a/charts/lazy-librarian/README.md b/charts/lazy-librarian/README.md new file mode 100644 index 0000000..63305b6 --- /dev/null +++ b/charts/lazy-librarian/README.md @@ -0,0 +1,85 @@ +# lazylibrarian + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: version-b3a081ec](https://img.shields.io/badge/AppVersion-version--b3a081ec-informational?style=flat-square) + +A Helm chart for deploying LazyLibrarian + +**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/alexlebens/helm-charts/issues/new/choose)** + +## Source Code + +* +* + +## Requirements + +Kubernetes: `>=1.16.0-0` + +## Dependencies + +| Repository | Name | Version | +|------------|------|---------| +| https://github.com/bjw-s/helm-charts | common | 3.1.0 | + +## TL;DR + +```console +helm repo add alexlebens-helm-charts http://alexlebens.github.io/helm-charts +helm repo update +helm install lazy-librarian alexlebens-helm-charts/lazy-librarian +``` + +## Installing the Chart + +To install the chart with the release name `lazy-librarian` + +```console +helm install lazy-librarian alexlebens-helm-charts/lazy-librarian +``` + +## Uninstalling the Chart + +To uninstall the `lazy-librarian` deployment + +```console +helm uninstall lazy-librarian +``` + +The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. + +## Configuration + +Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. +Other values may be used from the [values.yaml](https://github.com/alexlebens/helm-charts/blob/main/charts/lazy-librarian/values.yaml) from the [common library](https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml). + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +```console +helm install lazy-librarian \ + --set env.TZ="US/Mountain" \ + alexlebens-helm-charts/lazy-librarian +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. + +```console +helm install lazy-librarian alexlebens-helm-charts/lazy-librarian -f values.yaml +``` + +## Values + +**Important**: When deploying an application Helm chart you can add more values from the common library chart [here](https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml) + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| env | object | See below | environment variables. | +| env.PGID | string | `"1001"` | Specify the group ID the application will run as | +| env.PUID | string | `"1001"` | Specify the user ID the application will run as | +| env.TZ | string | `"UTC"` | Set the container timezone | +| env.DOCKER_MODS | string | `"linuxserver/mods:universal-calibre|linuxserver/mods:lazylibrarian-ffmpeg"` | Add linuxserver docker mods | +| image.pullPolicy | string | `"IfNotPresent"` | image pull policy | +| image.repository | string | `"linuxserver/lazylibrarian"` | image repository | +| image.tag | string | `"version-b3a081ec"` | image tag | +| ingress.main | object | See values.yaml | Enable and configure ingress settings for the chart under this key. | +| persistence | object | See values.yaml | Configure persistence settings for the chart under this key. | +| service | object | See values.yaml | Configures service settings for the chart. | diff --git a/charts/lazy-librarian/values.yaml b/charts/lazy-librarian/values.yaml new file mode 100644 index 0000000..8cb8c7b --- /dev/null +++ b/charts/lazy-librarian/values.yaml @@ -0,0 +1,323 @@ +common: + global: + # -- Set an override for the prefix of the fullname + nameOverride: + # -- Set the entire name definition + fullnameOverride: + # -- Set additional global labels. Helm templates can be used. + labels: {} + # -- Set additional global annotations. Helm templates can be used. + annotations: {} + + defaultPodOptions: + # -- Defines affinity constraint rules. + # [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) + affinity: {} + # -- Set annotations on the Pod. Pod-specific values will be merged with this. + annotations: {} + # -- Specifies whether a service account token should be automatically mounted. + automountServiceAccountToken: true + # -- Configuring the ndots option may resolve nslookup issues on some Kubernetes setups. + dnsConfig: {} + # -- Defaults to "ClusterFirst" if hostNetwork is false and "ClusterFirstWithHostNet" if hostNetwork is true. + dnsPolicy: "" + # -- Enable/disable the generation of environment variables for services. + # [[ref]](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service) + enableServiceLinks: false + # -- Allows specifying explicit hostname setting + hostname: "" + # -- Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames. + # [[ref]](https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/) + hostAliases: [] + # -- Use the host's ipc namespace + hostIPC: false + # -- When using hostNetwork make sure you set dnsPolicy to `ClusterFirstWithHostNet` + hostNetwork: false + # -- Use the host's pid namespace + hostPID: false + # -- Set image pull secrets + imagePullSecrets: [] + # -- Set labels on the Pod. Pod-specific values will be merged with this. + labels: {} + # -- Node selection constraint + # [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) + nodeSelector: {} + # -- Custom priority class for different treatment by the scheduler + priorityClassName: "" + # -- Set Container restart policy. + # @default -- `Always`. When `controller.type` is `cronjob` it defaults to `Never`. + restartPolicy: "" + # -- Allow specifying a runtimeClassName other than the default one (ie: nvidia) + runtimeClassName: "" + # -- Allows specifying a custom scheduler name + schedulerName: "" + # -- Configure the Security Context for the Pod + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + fsGroup: 1000 + fsGroupChangePolicy: "OnRootMismatch" + # -- Duration in seconds the pod needs to terminate gracefully + # -- [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle)] + terminationGracePeriodSeconds: + # -- Specify taint tolerations + # [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) + tolerations: [] + # -- Defines topologySpreadConstraint rules. + # [[ref]](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) + topologySpreadConstraints: [] + + controllers: + main: + # -- enable the controller. + enabled: true + # -- Set the controller type. + # Valid options are deployment, daemonset, statefulset, cronjob or job + type: deployment + # -- Set annotations on the deployment/statefulset/daemonset/cronjob/job + annotations: {} + # -- Set labels on the deployment/statefulset/daemonset/cronjob/job + labels: {} + # -- Number of desired pods. When using a HorizontalPodAutoscaler, set this to `null`. + replicas: 1 + # -- Set the controller upgrade strategy + # For Deployments, valid values are Recreate (default) and RollingUpdate. + # For StatefulSets, valid values are OnDelete and RollingUpdate (default). + # DaemonSets/CronJobs/Jobs ignore this. + strategy: Recreate + # -- ReplicaSet revision history limit + revisionHistoryLimit: 3 + + # -- Container + containers: + main: + # -- Override the container name + nameOverride: + # -- Specify if this container depends on any other containers + # This is used to determine the order in which the containers are rendered. + dependsOn: [] + # -- Image + image: + # -- image repository + repository: lscr.io/linuxserver/lazylibrarian + # -- image tag + tag: version-b3a081ec + # -- image pull policy + pullPolicy: IfNotPresent + # -- Override the command(s) for the default container + command: [] + # -- Override the args for the default container + args: [] + # -- Override the working directory for the default container + workingDir: + # -- Environment variables. Template enabled. + env: + PUID: 1000 + PGID: 1000 + TZ: US/Mountain + DOCKER_MODS: linuxserver/mods:universal-calibre|linuxserver/mods:lazylibrarian-ffmpeg + # -- Secrets and/or ConfigMaps that will be loaded as environment variables. + envFrom: [] + # -- Set the resource requests / limits for the container. + 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: 500m + memory: 512Mi + requests: + cpu: 10m + memory: 256Mi + + serviceAccount: + # -- Specifies whether a service account should be created + create: true + # -- Annotations to add to the service account + annotations: {} + # -- Labels to add to the service account + labels: {} + # -- The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + + service: + main: + # -- Enables or disables the service + enabled: true + # -- Override the name suffix that is used for this service + nameOverride: "" + # -- Configure which controller this service should target + controller: main + # -- Make this the primary service for this controller (used in probes, notes, etc...). + # If there is more than 1 service targeting the controller, make sure that only 1 service is + # marked as primary. + primary: true + # -- Set the service type + type: ClusterIP + # -- Specify the externalTrafficPolicy for the service. Options: Cluster, Local + # -- [[ref](https://kubernetes.io/docs/tutorials/services/source-ip/)] + externalTrafficPolicy: + # -- Specify the ip policy. Options: SingleStack, PreferDualStack, RequireDualStack + ipFamilyPolicy: + # -- The ip families that should be used. Options: IPv4, IPv6 + ipFamilies: [] + # -- Provide additional annotations which may be required. + annotations: {} + # -- Provide additional labels which may be required. + labels: {} + # -- Allow adding additional match labels + extraSelectorLabels: {} + # -- Configure the Service port information here. + # Additional ports can be added by adding a dictionary key similar to the 'http' service. + # @default -- See below + ports: + http: + # -- Enables or disables the port + enabled: true + # -- Make this the primary port (used in probes, notes, etc...) + # If there is more than 1 service, make sure that only 1 port is marked as primary. + primary: true + # -- The port number + port: 5299 + # -- Port protocol. + # Support values are `HTTP`, `HTTPS`, `TCP` and `UDP`. + # HTTP and HTTPS spawn a TCP service and get used for internal URL and name generation + protocol: HTTP + # -- Specify a service targetPort if you wish to differ the service port from the application port. + # If `targetPort` is specified, this port number is used in the container definition instead of + # the `port` value. Therefore named ports are not supported for this field. + targetPort: + # -- Specify the nodePort value for the LoadBalancer and NodePort service types. + # [[ref]](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) + nodePort: + # -- Specify the appProtocol value for the Service. + # [[ref]](https://kubernetes.io/docs/concepts/services-networking/service/#application-protocol) + appProtocol: + + ingress: + # -- An example is shown below + main: + # -- Enables or disables the ingress + enabled: true + # -- Override the name suffix that is used for this ingress. + nameOverride: + # -- Provide additional annotations which may be required. + annotations: {} + # -- Provide additional labels which may be required. + labels: {} + # -- Set the ingressClass that is used for this ingress. + className: + # -- Configure the defaultBackend for this ingress. This will disable any other rules for the ingress. + defaultBackend: + ## Configure the hosts for the ingress + hosts: + - # -- Host address. Helm template can be passed. + host: chart-example.local + ## Configure the paths for the host + paths: + - # -- Path. Helm template can be passed. + path: / + pathType: Prefix + service: + # -- The service name to reference. + name: main + # -- The service port number reference for this path + port: 5299 + # -- Configure TLS for the ingress. Both secretName and hosts can process a Helm template. + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + + persistence: + config: + # -- Enables or disables the persistence item. Defaults to true + enabled: false + # -- Sets the persistence type + # Valid options are persistentVolumeClaim, emptyDir, nfs, hostPath, secret, configMap or custom + type: persistentVolumeClaim + # -- Storage Class for the config volume. + # If set to `-`, dynamic provisioning is disabled. + # If set to something else, the given storageClass is used. + # If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. + storageClass: + # -- If you want to reuse an existing claim, the name of the existing PVC can be passed here. + existingClaim: + # -- AccessMode for the persistent volume. + # Make sure to select an access mode that is supported by your storage provider! + # [[ref]](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) + accessMode: ReadWriteOnce + # -- The amount of storage that is requested for the persistent volume. + size: 1Gi + # -- Set to true to retain the PVC upon `helm uninstall` + retain: false + # -- Configure mounts to all controllers and containers. By default the persistence item + # will be mounted to `/`. + # Example: + # globalMounts: + # - path: /config + # readOnly: false + globalMounts: + - path: /config + + downloads: + # -- Enables or disables the persistence item. Defaults to true + enabled: false + # -- Sets the persistence type + # Valid options are persistentVolumeClaim, emptyDir, nfs, hostPath, secret, configMap or custom + type: persistentVolumeClaim + # -- Storage Class for the config volume. + # If set to `-`, dynamic provisioning is disabled. + # If set to something else, the given storageClass is used. + # If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. + storageClass: + # -- If you want to reuse an existing claim, the name of the existing PVC can be passed here. + existingClaim: + # -- AccessMode for the persistent volume. + # Make sure to select an access mode that is supported by your storage provider! + # [[ref]](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) + accessMode: ReadWriteOnce + # -- The amount of storage that is requested for the persistent volume. + size: 1Gi + # -- Set to true to retain the PVC upon `helm uninstall` + retain: false + # -- Configure mounts to all controllers and containers. By default the persistence item + # will be mounted to `/`. + # Example: + # globalMounts: + # - path: /config + # readOnly: false + globalMounts: + - path: /downloads + + books: + # -- Enables or disables the persistence item. Defaults to true + enabled: false + # -- Sets the persistence type + # Valid options are persistentVolumeClaim, emptyDir, nfs, hostPath, secret, configMap or custom + type: persistentVolumeClaim + # -- Storage Class for the config volume. + # If set to `-`, dynamic provisioning is disabled. + # If set to something else, the given storageClass is used. + # If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. + storageClass: + # -- If you want to reuse an existing claim, the name of the existing PVC can be passed here. + existingClaim: + # -- AccessMode for the persistent volume. + # Make sure to select an access mode that is supported by your storage provider! + # [[ref]](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) + accessMode: ReadWriteOnce + # -- The amount of storage that is requested for the persistent volume. + size: 1Gi + # -- Set to true to retain the PVC upon `helm uninstall` + retain: false + # -- Configure mounts to all controllers and containers. By default the persistence item + # will be mounted to `/`. + # Example: + # globalMounts: + # - path: /config + # readOnly: false + globalMounts: + - path: /books