Publish new changes in catalog

This commit is contained in:
sonicaj
2023-08-30 11:24:37 +00:00
parent c04afa05c8
commit 0480e97a35
20 changed files with 850 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: file://../../../common
version: 1.1.0
digest: sha256:752ce76025f5b61094bd2b18ca11693eb9d26d0dde4eb2e63cd2330cbffe9e73
generated: "2023-08-29T19:19:05.323162098+03:00"

View File

@@ -0,0 +1,26 @@
name: planka
description: Planka is an Elegant open source project tracking
annotations:
title: Planka
type: application
version: 1.0.0
apiVersion: v2
appVersion: 1.12.0
kubeVersion: '>=1.16.0-0'
maintainers:
- name: truenas
url: https://www.truenas.com/
email: dev@ixsystems.com
dependencies:
- name: common
repository: file://../../../common
version: 1.1.0
home: https://github.com/plankanban/planka
icon: https://github.com/plankanban/planka/blob/master/client/public/logo512.png?raw=true
sources:
- https://github.com/truenas/charts/tree/master/library/ix-dev/community/planka
- https://github.com/plankanban/planka
keywords:
- project
- task
- kanban

View File

@@ -0,0 +1,8 @@
# Planka
[Planka](https://github.com/plankanban/planka) is an Elegant open source project tracking
> When application is installed, a container will be launched with **root** privileges.
> This is required in order to apply the correct permissions to the `Planka` directories.
> Afterward, the `Planka` container will run as a **non**-root user (`1000`).
> All mounted storage(s) will be `chown`ed only if the parent directory does not match the configured user.

View File

@@ -0,0 +1,8 @@
# Planka
[Planka](https://github.com/plankanban/planka) is an Elegant open source project tracking
> When application is installed, a container will be launched with **root** privileges.
> This is required in order to apply the correct permissions to the `Planka` directories.
> Afterward, the `Planka` container will run as a **non**-root user (`1000`).
> All mounted storage(s) will be `chown`ed only if the parent directory does not match the configured user.

Binary file not shown.

View File

@@ -0,0 +1,22 @@
plankaNetwork:
webPort: 31000
plankaConfig:
baseURL: http://localhost:31000
plankaStorage:
avatars:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/avatars
backgroundImages:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/bg-img
attachments:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/attachments
pgData:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/pgData
pgBackup:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/pgBackup

View File

@@ -0,0 +1,29 @@
plankaNetwork:
webPort: 31000
plankaConfig:
baseURL: http://localhost:31000
plankaStorage:
avatars:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/avatars
backgroundImages:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/bg-img
attachments:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/attachments
pgData:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/pgData
pgBackup:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/pgBackup
additionalStorages:
- type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/data1
mountPath: /data1
- type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/data2
mountPath: /data2

View File

@@ -0,0 +1,23 @@
plankaNetwork:
webPort: 30000
hostNetwork: true
plankaConfig:
baseURL: http://localhost:30000
plankaStorage:
avatars:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/avatars
backgroundImages:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/bg-img
attachments:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/attachments
pgData:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/pgData
pgBackup:
type: hostPath
hostPath: /mnt/{{ .Release.Namespace }}/pgBackup

View File

@@ -0,0 +1,58 @@
image:
repository: ghcr.io/plankanban/planka
pullPolicy: IfNotPresent
tag: 1.12.0
resources:
limits:
cpu: 4000m
memory: 8Gi
plankaConfig:
trustProxy: false
baseURL: http://localhost:30062
additionalEnvs: []
plankaNetwork:
webPort: 30062
hostNetwork: false
plankaStorage:
avatars:
type: ixVolume
datasetName: avatars
backgroundImages:
type: ixVolume
datasetName: bg-img
attachments:
type: ixVolume
datasetName: attachments
additionalStorages: []
pgData:
type: ixVolume
datasetName: pgData
pgBackup:
type: ixVolume
datasetName: pgBackup
notes:
custom: |
Default credentials:
- Username: `demo@demo.demo`
- Password: `demo`
## Database
You can connect to the database using the pgAdmin App from the catalog
<details>
<summary>Database Details</summary>
- Database: `planka`
- Username: `planka`
- Password: `{{ .Values.plankaDbPass }}`
- Host: `{{ .Values.plankaDbHost }}.{{ .Release.Namespace }}.svc.cluster.local`
- Port: `5432`
</details>
{{- $_ := unset .Values "plankaDbPass" }}
{{- $_ := unset .Values "plankaDbHost" }}

View File

@@ -0,0 +1,8 @@
runAsContext:
- userName: planka
groupName: planka
gid: 1000
uid: 1000
description: Planka can runs as a non-root user.
capabilities: []
hostMounts: []

View File

@@ -0,0 +1,377 @@
groups:
- name: Planka Configuration
description: Configure Planka
- name: Network Configuration
description: Configure Network for Planka
- name: Storage Configuration
description: Configure Storage for Planka
- name: Resources Configuration
description: Configure Resources for Planka
portals:
web_portal:
protocols:
- "$kubernetes-resource_configmap_portal_protocol"
host:
- "$kubernetes-resource_configmap_portal_host"
ports:
- "$kubernetes-resource_configmap_portal_port"
path: "$kubernetes-resource_configmap_portal_path"
questions:
- variable: plankaConfig
label: ""
group: Planka Configuration
schema:
type: dict
attrs:
- variable: baseURL
label: BaseURL
description: |
The URL that Planka will be accessible from.</br>
Example: </br>
http://server.ip:30062</br>
https://planka.example.com
schema:
type: uri
default: ""
required: true
- variable: trustProxy
label: Trust Proxy
description: Trust the reverse proxy when Planka is behind a reverse proxy.
schema:
type: boolean
default: false
- variable: additionalEnvs
label: Additional Environment Variables
description: Configure additional environment variables for Planka.
schema:
type: list
default: []
items:
- variable: env
label: Environment Variable
schema:
type: dict
attrs:
- variable: name
label: Name
schema:
type: string
required: true
- variable: value
label: Value
schema:
type: string
required: true
- variable: plankaNetwork
label: ""
group: Network Configuration
schema:
type: dict
attrs:
- variable: webPort
label: Web Port
description: The port for the Planka Web UI.
schema:
type: int
default: 30062
min: 9000
max: 65535
required: true
- variable: hostNetwork
label: Host Network
description: |
Bind to the host network. It's recommended to keep this disabled.</br>
schema:
type: boolean
default: false
- variable: plankaStorage
label: ""
group: Storage Configuration
schema:
type: dict
attrs:
- variable: avatars
label: Planka Avatars Storage
description: The path to store Planka Avatars.
schema:
type: dict
attrs:
- variable: type
label: Type
description: |
ixVolume: Is dataset created automatically by the system.</br>
Host Path: Is a path that already exists on the system.
schema:
type: string
required: true
default: "ixVolume"
enum:
- value: "hostPath"
description: Host Path (Path that already exists on the system)
- value: "ixVolume"
description: ixVolume (Dataset created automatically by the system)
- variable: datasetName
label: Dataset Name
schema:
type: string
show_if: [["type", "=", "ixVolume"]]
required: true
hidden: true
immutable: true
default: "avatars"
$ref:
- "normalize/ixVolume"
- variable: hostPath
label: Host Path
schema:
type: hostpath
show_if: [["type", "=", "hostPath"]]
immutable: true
required: true
- variable: backgroundImages
label: Planka Background Images Storage
description: The path to store Planka Background Images.
schema:
type: dict
attrs:
- variable: type
label: Type
description: |
ixVolume: Is dataset created automatically by the system.</br>
Host Path: Is a path that already exists on the system.
schema:
type: string
required: true
default: "ixVolume"
enum:
- value: "hostPath"
description: Host Path (Path that already exists on the system)
- value: "ixVolume"
description: ixVolume (Dataset created automatically by the system)
- variable: datasetName
label: Dataset Name
schema:
type: string
show_if: [["type", "=", "ixVolume"]]
required: true
hidden: true
immutable: true
default: "bg-img"
$ref:
- "normalize/ixVolume"
- variable: hostPath
label: Host Path
schema:
type: hostpath
show_if: [["type", "=", "hostPath"]]
immutable: true
required: true
- variable: attachments
label: Planka Attachments Storage
description: The path to store Planka Attachments.
schema:
type: dict
attrs:
- variable: type
label: Type
description: |
ixVolume: Is dataset created automatically by the system.</br>
Host Path: Is a path that already exists on the system.
schema:
type: string
required: true
default: "ixVolume"
enum:
- value: "hostPath"
description: Host Path (Path that already exists on the system)
- value: "ixVolume"
description: ixVolume (Dataset created automatically by the system)
- variable: datasetName
label: Dataset Name
schema:
type: string
show_if: [["type", "=", "ixVolume"]]
required: true
hidden: true
immutable: true
default: "attachments"
$ref:
- "normalize/ixVolume"
- variable: hostPath
label: Host Path
schema:
type: hostpath
show_if: [["type", "=", "hostPath"]]
immutable: true
required: true
- variable: pgData
label: Postgres Data Storage
description: The path to store Postgres Data.
schema:
type: dict
attrs:
- variable: type
label: Type
description: |
ixVolume: Is dataset created automatically by the system.</br>
Host Path: Is a path that already exists on the system.
schema:
type: string
required: true
default: "ixVolume"
enum:
- value: "hostPath"
description: Host Path (Path that already exists on the system)
- value: "ixVolume"
description: ixVolume (Dataset created automatically by the system)
- variable: datasetName
label: Dataset Name
schema:
type: string
show_if: [["type", "=", "ixVolume"]]
required: true
hidden: true
immutable: true
default: "pgData"
$ref:
- "normalize/ixVolume"
- variable: hostPath
label: Host Path
schema:
type: hostpath
show_if: [["type", "=", "hostPath"]]
immutable: true
required: true
- variable: pgBackup
label: Postgres Backup Storage
description: The path to store Postgres Backup.
schema:
type: dict
attrs:
- variable: type
label: Type
description: |
ixVolume: Is dataset created automatically by the system.</br>
Host Path: Is a path that already exists on the system.
schema:
type: string
required: true
default: "ixVolume"
enum:
- value: "hostPath"
description: Host Path (Path that already exists on the system)
- value: "ixVolume"
description: ixVolume (Dataset created automatically by the system)
- variable: datasetName
label: Dataset Name
schema:
type: string
show_if: [["type", "=", "ixVolume"]]
required: true
hidden: true
immutable: true
default: "pgBackup"
$ref:
- "normalize/ixVolume"
- variable: hostPath
label: Host Path
schema:
type: hostpath
show_if: [["type", "=", "hostPath"]]
immutable: true
required: true
- variable: additionalStorages
label: Additional Storage
description: Additional storage for Planka.
schema:
type: list
default: []
items:
- variable: storageEntry
label: Storage Entry
schema:
type: dict
attrs:
- variable: type
label: Type
description: |
ixVolume: Is dataset created automatically by the system.</br>
Host Path: Is a path that already exists on the system.
schema:
type: string
required: true
default: "ixVolume"
enum:
- value: "hostPath"
description: Host Path (Path that already exists on the system)
- value: "ixVolume"
description: ixVolume (Dataset created automatically by the system)
- variable: mountPath
label: Mount Path
description: The path inside the container to mount the storage.
schema:
type: path
required: true
- variable: hostPath
label: Host Path
description: The host path to use for storage.
schema:
type: hostpath
show_if: [["type", "=", "hostPath"]]
required: true
- variable: datasetName
label: Dataset Name
description: The name of the dataset to use for storage.
schema:
type: string
show_if: [["type", "=", "ixVolume"]]
required: true
immutable: true
default: "storage_entry"
$ref:
- "normalize/ixVolume"
- variable: resources
group: Resources Configuration
label: ""
schema:
type: dict
attrs:
- variable: limits
label: Limits
schema:
type: dict
attrs:
- variable: cpu
label: CPU
description: CPU limit for Planka.
schema:
type: string
max_length: 6
valid_chars: '^(0\.[1-9]|[1-9][0-9]*)(\.[0-9]|m?)$'
valid_chars_error: |
Valid CPU limit formats are</br>
- Plain Integer - eg. 1</br>
- Float - eg. 0.5</br>
- Milicpu - eg. 500m
default: "4000m"
required: true
- variable: memory
label: Memory
description: Memory limit for Planka.
schema:
type: string
max_length: 12
valid_chars: '^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$'
valid_chars_error: |
Valid Memory limit formats are</br>
- Suffixed with E/P/T/G/M/K - eg. 1G</br>
- Suffixed with Ei/Pi/Ti/Gi/Mi/Ki - eg. 1Gi</br>
- Plain Integer in bytes - eg. 1024</br>
- Exponent - eg. 134e6
default: "8Gi"
required: true

View File

@@ -0,0 +1 @@
{{ include "ix.v1.common.lib.chart.notes" $ }}

View File

@@ -0,0 +1,53 @@
{{- define "planka.configuration" -}}
{{- $fullname := (include "ix.v1.common.lib.chart.names.fullname" $) -}}
{{- $secretKey := randAlphaNum 32 -}}
{{- with (lookup "v1" "Secret" .Release.Namespace (printf "%s-planka" $fullname)) -}}
{{- $secretKey = ((index .data "SECRET_KEY") | b64dec) -}}
{{- end -}}
{{- $dbHost := (printf "%s-postgres" $fullname) -}}
{{- $dbUser := "planka" -}}
{{- $dbName := "planka" -}}
{{- $dbPass := (randAlphaNum 32) -}}
{{- with (lookup "v1" "Secret" .Release.Namespace (printf "%s-postgres-creds" $fullname)) -}}
{{- $dbPass = ((index .data "POSTGRES_PASSWORD") | b64dec) -}}
{{- end -}}
{{- $dbURL := (printf "%s:%s@%s:5432/%s?sslmode=disable" $dbUser $dbPass $dbHost $dbName) -}}
{{/* Temporary set dynamic db details on values,
so we can print them on the notes */}}
{{- $_ := set .Values "plankaDbPass" $dbPass -}}
{{- $_ := set .Values "plankaDbHost" $dbHost }}
secret:
planka:
enabled: true
data:
SECRET_KEY: {{ $secretKey }}
DATABASE_URL: {{ printf "postgresql://%s" $dbURL }}
postgres-creds:
enabled: true
data:
POSTGRES_USER: {{ $dbUser }}
POSTGRES_DB: {{ $dbName }}
POSTGRES_PASSWORD: {{ $dbPass }}
POSTGRES_HOST: {{ $dbHost }}
POSTGRES_URL: {{ printf "postgres://%s" $dbURL }}
{{- if and
(not (hasPrefix "http://" .Values.plankaConfig.baseURL))
(not (hasPrefix "https://" .Values.plankaConfig.baseURL)) -}}
{{- fail "Planka - Expected [Base URL] to start with [http://] or [https://]" -}}
{{- end }}
configmap:
planka:
enabled: true
data:
NODE_ENV: production
BASE_URL: {{ .Values.plankaConfig.baseURL }}
TRUST_PROXY: {{ ternary "1" "0" .Values.plankaConfig.trustProxy | quote }}
{{- end -}}

View File

@@ -0,0 +1,88 @@
{{- define "planka.persistence" -}}
persistence:
avatars:
enabled: true
type: {{ .Values.plankaStorage.avatars.type }}
datasetName: {{ .Values.plankaStorage.avatars.datasetName | default "" }}
hostPath: {{ .Values.plankaStorage.avatars.hostPath | default "" }}
targetSelector:
planka:
planka:
mountPath: /app/public/user-avatars
01-permissions:
mountPath: /mnt/directories/user-avatars
bg-img:
enabled: true
type: {{ .Values.plankaStorage.backgroundImages.type }}
datasetName: {{ .Values.plankaStorage.backgroundImages.datasetName | default "" }}
hostPath: {{ .Values.plankaStorage.backgroundImages.hostPath | default "" }}
targetSelector:
planka:
planka:
mountPath: /app/public/project-background-images
01-permissions:
mountPath: /mnt/directories/project-background-images
attachments:
enabled: true
type: {{ .Values.plankaStorage.attachments.type }}
datasetName: {{ .Values.plankaStorage.attachments.datasetName | default "" }}
hostPath: {{ .Values.plankaStorage.attachments.hostPath | default "" }}
targetSelector:
planka:
planka:
mountPath: /app/private/attachments
01-permissions:
mountPath: /mnt/directories/attachments
tmp:
enabled: true
type: emptyDir
targetSelector:
planka:
planka:
mountPath: /tmp
{{- range $idx, $storage := .Values.plankaStorage.additionalStorages }}
{{ printf "planka-%v" (int $idx) }}:
enabled: true
type: {{ $storage.type }}
datasetName: {{ $storage.datasetName | default "" }}
hostPath: {{ $storage.hostPath | default "" }}
targetSelector:
planka:
planka:
mountPath: {{ $storage.mountPath }}
01-permissions:
mountPath: /mnt/directories{{ $storage.mountPath }}
{{- end }}
{{/* Database */}}
postgresdata:
enabled: true
type: {{ .Values.plankaStorage.pgData.type }}
datasetName: {{ .Values.plankaStorage.pgData.datasetName | default "" }}
hostPath: {{ .Values.plankaStorage.pgData.hostPath | default "" }}
targetSelector:
# Postgres pod
postgres:
# Postgres container
postgres:
mountPath: /var/lib/postgresql/data
# Postgres - Permissions container
# Different than the 01-permissions
permissions:
mountPath: /mnt/directories/postgres_data
postgresbackup:
enabled: true
type: {{ .Values.plankaStorage.pgBackup.type }}
datasetName: {{ .Values.plankaStorage.pgBackup.datasetName | default "" }}
hostPath: {{ .Values.plankaStorage.pgBackup.hostPath | default "" }}
targetSelector:
# Postgres backup pod
postgresbackup:
# Postgres backup container
postgresbackup:
mountPath: /postgres_backup
# Postgres - Permissions container
# Different than the 01-permissions
permissions:
mountPath: /mnt/directories/postgres_backup
{{- end -}}

View File

@@ -0,0 +1,56 @@
{{- define "planka.workload" -}}
workload:
planka:
enabled: true
primary: true
type: Deployment
podSpec:
hostNetwork: {{ .Values.plankaNetwork.hostNetwork }}
containers:
planka:
enabled: true
primary: true
imageSelector: image
securityContext:
runAsUser: 1000
runAsGroup: 1000
readOnlyRootFilesystem: false
env:
PORT: {{ .Values.plankaNetwork.webPort }}
envFrom:
- secretRef:
name: planka
- configMapRef:
name: planka
{{ with .Values.plankaConfig.additionalEnvs }}
envList:
{{ range $env := . }}
- name: {{ $env.name }}
value: {{ $env.value }}
{{ end }}
{{ end }}
probes:
liveness:
enabled: true
type: http
port: {{ .Values.plankaNetwork.webPort }}
path: /
readiness:
enabled: true
type: http
port: {{ .Values.plankaNetwork.webPort }}
path: /
startup:
enabled: true
type: http
port: {{ .Values.plankaNetwork.webPort }}
path: /
initContainers:
{{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
"UID" 1000
"GID" 1000
"mode" "check"
"type" "init") | nindent 8 }}
{{- include "ix.v1.common.app.postgresWait" (dict "name" "postgres-wait"
"secretName" "postgres-creds") | nindent 8 }}
{{- end -}}

View File

@@ -0,0 +1,33 @@
{{- define "planka.portal" -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: portal
data:
{{- $protocol := "http" -}}
{{- if hasPrefix "https://" .Values.plankaConfig.baseURL -}}
{{- $protocol = "https" -}}
{{- end -}}
{{- $host := "$node_ip" -}}
{{- $port := .Values.plankaNetwork.webPort -}}
{{- with .Values.plankaConfig.baseURL -}} {{/* Trim protocol and trailing slash */}}
{{- $host = (. | trimPrefix "https://" | trimPrefix "http://" | trimSuffix "/") -}}
{{- $host = mustRegexReplaceAll "(.*):[0-9]+" $host "${1}" -}}
{{- $tempPort := . | trimPrefix $protocol | trimPrefix "://" | trimPrefix $host | trimPrefix ":" -}}
{{- if $tempPort -}}
{{- $port = $tempPort -}}
{{- end -}}
{{- if not $tempPort -}}
{{- if eq $protocol "https" -}}
{{- $port = "443" -}}
{{- else -}}
{{- $port = "80" -}}
{{- end -}}
{{- end -}}
{{- end }}
path: "/"
port: {{ $port | quote }}
protocol: {{ $protocol }}
host: {{ $host }}
{{- end -}}

View File

@@ -0,0 +1,6 @@
{{- define "postgres.workload" -}}
workload:
{{- include "ix.v1.common.app.postgres" (dict "secretName" "postgres-creds"
"resources" .Values.resources
"ixChartContext" .Values.ixChartContext) | nindent 2 }}
{{- end -}}

View File

@@ -0,0 +1,26 @@
{{- define "planka.service" -}}
service:
planka:
enabled: true
primary: true
type: NodePort
targetSelector: planka
ports:
webui:
enabled: true
primary: true
port: {{ .Values.plankaNetwork.webPort }}
nodePort: {{ .Values.plankaNetwork.webPort }}
targetSelector: planka
postgres:
enabled: true
type: ClusterIP
targetSelector: postgres
ports:
postgres:
enabled: true
primary: true
port: 5432
targetPort: 5432
targetSelector: postgres
{{- end -}}

View File

@@ -0,0 +1,13 @@
{{- include "ix.v1.common.loader.init" . -}}
{{/* Merge the templates with Values */}}
{{- $_ := mustMergeOverwrite .Values (include "planka.workload" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "planka.service" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "planka.persistence" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "planka.configuration" $ | fromYaml) -}}
{{- $_ := mustMergeOverwrite .Values (include "postgres.workload" $ | fromYaml) -}}
{{/* Create the configmap for portal manually*/}}
{{- include "planka.portal" $ -}}
{{- include "ix.v1.common.loader.apply" . -}}

View File

@@ -0,0 +1,9 @@
icon_url: https://github.com/plankanban/planka/blob/master/client/public/logo512.png?raw=true
categories:
- productivity
screenshots:
- https://raw.githubusercontent.com/plankanban/planka/master/demo.gif
tags:
- kanban
- project
- task