feat(pydio-cells): Add db and use official image (#1908)

* feat(pydio-cells): Add db and use official image

* whoops

* try mounting

* unique how?

* aha

* try again

* chagne port

* bind not binds

* add healtheck endpoint

* try another host for healthcheck and update questiosn

* try with healtch service

* try this

* add missing quote and tpl port

* update image

* typo

* check output

* linr

* remove init

* yml

* fix host

* try password

* revert to mariadbPassword

* try tpl

* enable maridb

* eof

* Let's try!
This commit is contained in:
Stavros Kois 2022-02-22 11:15:25 +02:00 committed by GitHub
parent d72d2ddc67
commit dfb4e63f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 212 additions and 28 deletions

View File

@ -1,7 +1,7 @@
apiVersion: v2
kubeVersion: ">=1.16.0-0"
name: pydio-cells
version: 0.0.24
version: 1.0.0
appVersion: "3.0.4"
description: Pydio-cells is the nextgen file sharing platform for organizations.
type: application
@ -16,7 +16,10 @@ dependencies:
- name: common
repository: https://truecharts.org
version: 8.16.0
# condition:
- condition: mariadb.enabled
name: mariadb
repository: https://truecharts.org/
version: 1.0.71
maintainers:
- email: info@truecharts.org
name: TrueCharts

View File

@ -84,14 +84,41 @@ questions:
type: dict
attrs:
# Include{fixedEnv}
- variable: EXTERNALURL
label: "EXTERNALURL"
description: "EXTERNALURL"
- variable: CELLS_EXTERNAL
label: "Cells External URL"
description: "https://cells.mydomain.com"
schema:
type: string
default: ""
- variable: pydioinstall
group: "Container Configuration"
label: "Pydio Cells Initial Configuration"
schema:
additional_attrs: true
type: dict
attrs:
- variable: title
label: "Cells Frontend Title (First install only)"
description: "Cells Frontend title"
schema:
type: string
required: true
default: "My Pydio Cells"
- variable: username
label: "Cells Admin Username (First install only)"
description: "Cells Admin Username"
schema:
type: string
required: true
default: ""
- variable: title
label: "Cells Admin Password (First install only)"
description: "Cells Admin Password"
schema:
type: string
required: true
default: ""
# Include{containerConfig}
- variable: service
group: "Networking and Services"
label: "Configure Service(s)"
@ -158,7 +185,7 @@ questions:
description: "The internal(!) port on the container the Application runs on"
schema:
type: int
default: 8080
default: 10150
- variable: gprc
label: "gprc Service"
description: "The gprc service."
@ -247,9 +274,95 @@ questions:
additional_attrs: true
type: dict
attrs:
- variable: config
label: "App Config Storage"
description: "Stores the Application Configuration."
- variable: data
label: "Data Storage"
description: "Stores the Data"
schema:
additional_attrs: true
type: dict
attrs:
- variable: type
label: "Type of Storage"
description: "Sets the persistence type, Anything other than PVC could break rollback!"
schema:
type: string
default: "simplePVC"
enum:
- value: "simplePVC"
description: "PVC (simple)"
- value: "simpleHP"
description: "HostPath (simple)"
- value: "emptyDir"
description: "emptyDir"
- value: "pvc"
description: "pvc"
- value: "hostPath"
description: "hostPath"
# Include{persistenceBasic}
- variable: hostPath
label: "hostPath"
description: "Path inside the container the storage is mounted"
schema:
show_if: [["type", "=", "hostPath"]]
type: hostpath
- variable: medium
label: "EmptyDir Medium"
schema:
show_if: [["type", "=", "emptyDir"]]
type: string
default: ""
enum:
- value: ""
description: "Default"
- value: "Memory"
description: "Memory"
# Include{persistenceAdvanced}
- variable: logs
label: "Logs Storage"
description: "Stores the Logs"
schema:
additional_attrs: true
type: dict
attrs:
- variable: type
label: "Type of Storage"
description: "Sets the persistence type, Anything other than PVC could break rollback!"
schema:
type: string
default: "simplePVC"
enum:
- value: "simplePVC"
description: "PVC (simple)"
- value: "simpleHP"
description: "HostPath (simple)"
- value: "emptyDir"
description: "emptyDir"
- value: "pvc"
description: "pvc"
- value: "hostPath"
description: "hostPath"
# Include{persistenceBasic}
- variable: hostPath
label: "hostPath"
description: "Path inside the container the storage is mounted"
schema:
show_if: [["type", "=", "hostPath"]]
type: hostpath
- variable: medium
label: "EmptyDir Medium"
schema:
show_if: [["type", "=", "emptyDir"]]
type: string
default: ""
enum:
- value: ""
description: "Default"
- value: "Memory"
description: "Memory"
# Include{persistenceAdvanced}
- variable: services
label: "Services Storage"
description: "Stores the Services"
schema:
additional_attrs: true
type: dict
@ -348,7 +461,7 @@ questions:
label: "runAsNonRoot"
schema:
type: boolean
default: false
default: true
# Include{securityContextAdvanced}
- variable: podSecurityContext
@ -363,13 +476,13 @@ questions:
description: "The UserID of the user running the application"
schema:
type: int
default: 0
default: 568
- variable: runAsGroup
label: "runAsGroup"
description: The groupID this App of the user running the application"
schema:
type: int
default: 0
default: 568
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."

View File

@ -0,0 +1,21 @@
{{- define "pydiocells.configmap" -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-install
labels:
{{- include "common.labels" . | nindent 4 }}
data:
pydiocells-install: |-
frontendapplicationtitle: {{ .Values.pydioinstall.title }}
frontendLogin: {{ .Values.pydioinstall.username }}
frontendPassword: {{ .Values.pydioinstall.password }}
frontendRepeatPassword: {{ .Values.pydioinstall.password }}
dbConnectionType: tcp
dbTCPHostname: {{ printf "%v-%v" .Release.Name "mariadb" }}
dbTCPPort: 3306
dbTCPName: {{ .Values.mariadb.mariadbDatabase }}
dbTCPUser: {{ .Values.mariadb.mariadbUsername }}
dbTCPPassword: {{ .Values.mariadb.mariadbPassword }}
{{- end -}}

View File

@ -1 +1,20 @@
{{ include "common.all" . }}
{{- include "common.setup" . }}
{{/* Append the hardcoded settings */}}
{{- define "pydiocells.harcodedValues" -}}
persistence:
pydiocells-install:
enabled: "true"
mountPath: "/cells/install.yml"
subPath: "pydiocells-install"
type: "custom"
volumeSpec:
configMap:
name: {{ printf "%v-install" (include "common.names.fullname" .) }}
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "pydiocells.harcodedValues" . | fromYaml) -}}
{{- include "pydiocells.configmap" . }}
{{/* Render the templates */}}
{{ include "common.postSetup" . }}

View File

@ -1,24 +1,39 @@
image:
repository: tccr.io/truecharts/pydio-cells
pullPolicy: IfNotPresent
tag: v3.0.4
securityContext:
runAsNonRoot: false
podSecurityContext:
runAsUser: 0
runAsGroup: 0
tag: v3.0.4@sha256:81c6f8675ffc243af9ffab5a43da0ed50f33f0c153c352aad027127c3c0318ad
env:
PUID: 568
EXTERNALURL: ""
CELLS_EXTERNAL: ""
CELLS_GRPC_EXTERNAL: "{{ .Values.service.gprc.ports.gprc.targetPort }}"
CELLS_HEALTHCHECK: "{{ .Values.service.main.ports.main.targetPort }}"
CELLS_BIND: "0.0.0.0:{{ .Values.service.main.ports.main.targetPort }}"
CELLS_WORKING_DIR: "/cells"
CELLS_DATA_DIR: "/cells/data"
CELLS_LOG_DIR: "/cells/logs"
CELLS_SERVICES_DIR: "/cells/services"
CELLS_INSTALL_YAML: "/cells/install.yml"
pydioinstall:
username: "admin"
password: "supersecret"
title: "Pydio Cells"
probes:
liveness:
path: "/healthcheck"
readiness:
path: "/healthcheck"
startup:
path: "/healthcheck"
service:
main:
ports:
main:
targetPort: 8080
targetPort: 10150
port: 10150
gprc:
enabled: true
@ -29,8 +44,21 @@ service:
port: 33060
persistence:
config:
cells:
enabled: true
mountPath: "/config"
varrun:
mountPath: "/cells"
data:
enabled: true
mountPath: "/cells/data"
logs:
enabled: true
mountPath: "/cells/logs"
services:
enabled: true
mountPath: "/cells/services"
mariadb:
enabled: true
mariadbUsername: pydiocells
mariadbDatabase: pydiocells
existingSecret: "mariadbcreds"