feat: add linkding
This commit is contained in:
parent
51cc4adf2f
commit
726a6b2132
8 changed files with 320 additions and 0 deletions
17
charts/linkding/Chart.yaml
Normal file
17
charts/linkding/Chart.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/chart.json
|
||||||
|
apiVersion: v2
|
||||||
|
type: application
|
||||||
|
name: linkding
|
||||||
|
description: A Helm chart for linkding
|
||||||
|
version: 2.0.0
|
||||||
|
# renovate: image=sissbruecker/linkding
|
||||||
|
appVersion: "1.30.0"
|
||||||
|
sources:
|
||||||
|
- https://code.252.no/tommy/helm-charts
|
||||||
|
- https://github.com/sissbruecker/linkding
|
||||||
|
keywords:
|
||||||
|
- linkding
|
||||||
|
- bookmarks
|
||||||
|
maintainers:
|
||||||
|
- name: Tommy Skaug
|
||||||
|
email: tommy@skaug.me
|
99
charts/linkding/README.md
Normal file
99
charts/linkding/README.md
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
# [`linkding`](https://charts.pascaliske.dev/charts/linkding/)
|
||||||
|
|
||||||
|
> A Helm chart for linkding
|
||||||
|
|
||||||
|
[![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/linkding/)[![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/linkding/)[![AppVersion: 1.22.1](https://img.shields.io/badge/AppVersion-1.22.1-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/linkding/)
|
||||||
|
|
||||||
|
* <https://github.com/pascaliske/helm-charts>
|
||||||
|
* <https://github.com/sissbruecker/linkding>
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- [`helm`](https://helm.sh) - Refer to their [docs](https://helm.sh/docs) to get started.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To use this chart add the repo as follows:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
helm repo add pascaliske https://charts.pascaliske.dev
|
||||||
|
```
|
||||||
|
|
||||||
|
If you had already added this repo earlier, run `helm repo update` to retrieve the latest versions of the packages.
|
||||||
|
|
||||||
|
To install this chart simply run the following command:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
helm install linkding pascaliske/linkding
|
||||||
|
```
|
||||||
|
|
||||||
|
To uninstall this chart simply run the following command:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
helm delete linkding
|
||||||
|
```
|
||||||
|
|
||||||
|
## Values
|
||||||
|
|
||||||
|
The following values can be used to adjust the helm chart.
|
||||||
|
|
||||||
|
| Key | Type | Default | Description |
|
||||||
|
|-----|------|---------|-------------|
|
||||||
|
| additionalContainers | object | `{}` | Specify any additional containers here as dictionary items - each should have it's own key. |
|
||||||
|
| affinity | object | `{}` | Pod-level affinity. More info [here](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling). |
|
||||||
|
| certificate.annotations | object | `{}` | Additional annotations for the certificate object. |
|
||||||
|
| certificate.create | bool | `false` | Create an Certificate object for the exposed chart. |
|
||||||
|
| certificate.dnsNames | list | `[]` | List of subject alternative names for the certificate. |
|
||||||
|
| certificate.issuerRef.kind | string | `"ClusterIssuer"` | Type of the referenced certificate issuer. Can be "Issuer" or "ClusterIssuer". |
|
||||||
|
| certificate.issuerRef.name | string | `""` | Name of the referenced certificate issuer. |
|
||||||
|
| certificate.labels | object | `{}` | Additional labels for the certificate object. |
|
||||||
|
| certificate.secretName | string | `""` | Name of the secret in which the certificate will be stored. Defaults to the first item in dnsNames. |
|
||||||
|
| controller.annotations | object | `{}` | Additional annotations for the controller object. |
|
||||||
|
| controller.enabled | bool | `true` | Create a workload for this chart. |
|
||||||
|
| controller.kind | string | `"Deployment"` | Type of the workload object. |
|
||||||
|
| controller.labels | object | `{}` | Additional labels for the controller object. |
|
||||||
|
| controller.replicas | int | `1` | The number of replicas. |
|
||||||
|
| env[0] | object | `{"name":"TZ","value":"UTC"}` | Timezone for the container. |
|
||||||
|
| fullnameOverride | string | `""` | |
|
||||||
|
| image.pullPolicy | string | `"IfNotPresent"` | The pull policy for the controller. |
|
||||||
|
| image.repository | string | `"sissbruecker/linkding"` | The repository to pull the image from. |
|
||||||
|
| image.tag | string | `.Chart.AppVersion` | The docker tag, if left empty chart's appVersion will be used. |
|
||||||
|
| ingressRoute.annotations | object | `{}` | Additional annotations for the ingress route object. |
|
||||||
|
| ingressRoute.create | bool | `false` | Create an IngressRoute object for exposing this chart. |
|
||||||
|
| ingressRoute.entryPoints | list | `[]` | List of [entry points](https://doc.traefik.io/traefik/routing/routers/#entrypoints) on which the ingress route will be available. |
|
||||||
|
| ingressRoute.labels | object | `{}` | Additional labels for the ingress route object. |
|
||||||
|
| ingressRoute.middlewares | list | `[]` | List of [middleware objects](https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/#kind-middleware) for the ingress route. |
|
||||||
|
| ingressRoute.rule | string | `""` | [Matching rule](https://doc.traefik.io/traefik/routing/routers/#rule) for the underlying router. |
|
||||||
|
| ingressRoute.tlsSecretName | string | `""` | Use an existing secret containing the TLS certificate. |
|
||||||
|
| nameOverride | string | `""` | |
|
||||||
|
| persistentVolumeClaim.accessMode | string | `"ReadWriteOnce"` | Access mode of the persistent volume claim object. |
|
||||||
|
| persistentVolumeClaim.annotations | object | `{}` | Additional annotations for the persistent volume claim object. |
|
||||||
|
| persistentVolumeClaim.create | bool | `true` | Create a new persistent volume claim object. |
|
||||||
|
| persistentVolumeClaim.existingPersistentVolumeClaim | string | `""` | Use an existing persistent volume claim object. |
|
||||||
|
| persistentVolumeClaim.labels | object | `{}` | Additional labels for the persistent volume claim object. |
|
||||||
|
| persistentVolumeClaim.mountPath | string | `"/etc/linkding/data"` | Mount path of the persistent volume claim object. |
|
||||||
|
| persistentVolumeClaim.size | string | `"1Gi"` | Storage request size for the persistent volume claim object. |
|
||||||
|
| persistentVolumeClaim.storageClassName | string | `""` | Storage class name for the persistent volume claim object. |
|
||||||
|
| persistentVolumeClaim.volumeMode | string | `"Filesystem"` | Volume mode of the persistent volume claim object. |
|
||||||
|
| ports.http.enabled | bool | `true` | Enable the port inside the `controller` and `Service` objects. |
|
||||||
|
| ports.http.nodePort | string | `nil` | The external port used if `.service.type` == `NodePort`. |
|
||||||
|
| ports.http.port | int | `9090` | The port used as internal port and cluster-wide port if `.service.type` == `ClusterIP`. |
|
||||||
|
| ports.http.protocol | string | `"TCP"` | The protocol used for the service. |
|
||||||
|
| resources | object | `{}` | Compute resources used by the container. More info [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). |
|
||||||
|
| securityContext | object | `{}` | Pod-level security attributes. More info [here](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context). |
|
||||||
|
| service.annotations | object | `{}` | Additional annotations for the service object. |
|
||||||
|
| service.enabled | bool | `true` | Create a service for exposing this chart. |
|
||||||
|
| service.labels | object | `{}` | Additional labels for the service object. |
|
||||||
|
| service.type | string | `"ClusterIP"` | The service type used. |
|
||||||
|
| serviceAccount.name | string | `""` | Specify the service account used for the controller. |
|
||||||
|
| tolerations | list | `[]` | Pod-level tolerations. More info [here](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling). |
|
||||||
|
|
||||||
|
## Maintainers
|
||||||
|
|
||||||
|
| Name | Email | Url |
|
||||||
|
| ---- | ------ | --- |
|
||||||
|
| pascaliske | <info@pascaliske.dev> | <https://pascaliske.dev> |
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT](../LICENSE.md) – © 2023 [Pascal Iske](https://pascaliske.dev)
|
69
charts/linkding/templates/_helpers.tpl
Normal file
69
charts/linkding/templates/_helpers.tpl
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "linkding.name" -}}
|
||||||
|
{{- .Values.nameOverride | default .Chart.Name | 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 "linkding.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := .Values.nameOverride | default .Chart.Name -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Get the correct image tag name
|
||||||
|
*/}}
|
||||||
|
{{- define "linkding.imageTag" -}}
|
||||||
|
{{- .Values.image.tag | default (printf "%s" .Chart.AppVersion) -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "linkding.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "linkding.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "linkding.chart" . }}
|
||||||
|
{{ include "linkding.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "linkding.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "linkding.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "linkding.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "linkding.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
20
charts/linkding/templates/db-init.yaml
Normal file
20
charts/linkding/templates/db-init.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: {{ include "linkding.fullname" . }}-db-init
|
||||||
|
labels:
|
||||||
|
{{- include "linkding.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": pre-install
|
||||||
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
containers:
|
||||||
|
- name: general-db-init
|
||||||
|
image: "{{ .Values.initContainers.dbInit.image.repository }}:{{ .Values.initContainers.dbInit.image.tag }}"
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: {{ .Values.postgres.secretName }}
|
||||||
|
backoffLimit: 3
|
45
charts/linkding/templates/deployment.yaml
Normal file
45
charts/linkding/templates/deployment.yaml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "linkding.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "linkding.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ include "linkding.fullname" . }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ include "linkding.fullname" . }}
|
||||||
|
spec:
|
||||||
|
serviceAccountName: {{ include "linkding.fullname" . }}
|
||||||
|
containers:
|
||||||
|
- name: {{ include "linkding.fullname" . }}
|
||||||
|
image: {{ .Values.image.repository }}:{{ include "linkding.imageTag" . }}
|
||||||
|
env:
|
||||||
|
{{- range $i, $val := .Values.env }}
|
||||||
|
{{- if $val.value }}
|
||||||
|
- name: {{ $val.name | quote }}
|
||||||
|
value: {{ $val.value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
- name: LD_SERVER_PORT
|
||||||
|
value: "80"
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: {{ .Values.envFromSecret }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 10 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http
|
||||||
|
volumeMounts:
|
||||||
|
- name: {{ include "linkding.fullname" . }}-data
|
||||||
|
mountPath: "/data"
|
||||||
|
readOnly: false
|
||||||
|
volumes:
|
||||||
|
- name: {{ include "linkding.fullname" . }}-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.persistence.existingClaim }}
|
16
charts/linkding/templates/service.yaml
Normal file
16
charts/linkding/templates/service.yaml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "linkding.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "linkding.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: "ClusterIP"
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: {{ include "linkding.fullname" . }}
|
6
charts/linkding/templates/serviceaccount.yaml
Normal file
6
charts/linkding/templates/serviceaccount.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "linkding.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "linkding.labels" . | nindent 4 }}
|
48
charts/linkding/values.yaml
Normal file
48
charts/linkding/values.yaml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
image:
|
||||||
|
repository: sissbruecker/linkding
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
initContainers:
|
||||||
|
dbInit:
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/onedr0p/postgres-init
|
||||||
|
tag: "16"
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: linkding-secret
|
||||||
|
|
||||||
|
env:
|
||||||
|
- name: TZ
|
||||||
|
value: Europe/Oslo
|
||||||
|
|
||||||
|
envFromSecret: linkding-env-secret
|
||||||
|
postgres:
|
||||||
|
secretName: linkding-secret
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
existingClaim: linkding
|
||||||
|
|
||||||
|
securityContext: {}
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
# nodeAffinity:
|
||||||
|
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
# nodeSelectorTerms:
|
||||||
|
# - matchExpressions:
|
||||||
|
# - key: kubernetes.io/hostname
|
||||||
|
# operator: In
|
||||||
|
# values:
|
||||||
|
# - my-node-xyz
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
# - key: node-role.kubernetes.io/control-plane
|
||||||
|
# operator: Exists
|
||||||
|
# effect: NoSchedule
|
Loading…
Reference in a new issue