fix(owncloud-ocis): fix portal, add auto generated tokens, add some gui options (#2113)

* fix(owncloud-ocis): fix portal, add auto generated tokens, add some gui options

* pretty logs

* proxy tls

* rename storage to data
This commit is contained in:
Stavros Kois
2022-03-08 00:11:35 +02:00
committed by GitHub
parent 99841ef741
commit d0a7e99af8
5 changed files with 112 additions and 16 deletions

View File

@@ -25,7 +25,7 @@ name: owncloud-ocis
sources:
- https://hub.docker.com/r/owncloud/ocis
- https://owncloud.dev/ocis/
version: 5.0.2
version: 6.0.0
annotations:
truecharts.org/catagories: |
- media

View File

@@ -74,6 +74,55 @@ questions:
- value: "OnDelete"
description: "(Legacy) OnDelete: ignore .spec.template changes"
# Include{controllerExpert}
- variable: env
group: "Container Configuration"
label: "Image Environment"
schema:
additional_attrs: true
type: dict
attrs:
- variable: OCIS_INSECURE
label: "OCIS_INSECURE"
description: "Set to true if you are using self signed certs"
schema:
type: boolean
default: false
- variable: PROXY_TLS
label: "PROXY_TLS"
description: "Set to true if you are traefik"
schema:
type: boolean
default: true
- variable: ACCOUNTS_DEMO_USERS_AND_GROUPS
label: "ACCOUNTS_DEMO_USERS_AND_GROUPS"
description: "Set to false to skip the generation of demo users in the first place"
schema:
type: boolean
default: false
- variable: OCIS_LOG_PRETTY
label: "OCIS_LOG_PRETTY"
description: "OCIS_LOG_PRETTY"
schema:
type: boolean
default: true
- variable: OCIS_LOG_COLOR
label: "OCIS_LOG_COLOR"
description: "OCIS_LOG_COLOR"
schema:
type: boolean
default: true
- variable: PROXY_HTTP_ADDR
label: "PROXY_HTTP_ADDR"
description: "PROXY_HTTP_ADDR"
schema:
type: string
default: "0.0.0.0:9200"
- variable: OCIS_URL
label: "OCIS_URL"
description: "OCIS_URL"
schema:
type: string
default: "https://localhost:9200"
# Include{containerConfig}
- variable: service
@@ -115,7 +164,7 @@ questions:
label: "Port Type"
schema:
type: string
default: "HTTP"
default: "HTTPS"
enum:
- value: HTTP
description: "HTTP"
@@ -166,7 +215,7 @@ questions:
additional_attrs: true
type: dict
attrs:
- variable: config
- variable: data
label: "App Config Storage"
description: "Stores the Application Configuration."
schema:

View File

@@ -0,0 +1,28 @@
{{/* Define the secrets */}}
{{- define "ocis.secrets" -}}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: ocis-secrets
{{- $ocisprevious := lookup "v1" "Secret" .Release.Namespace "ocis-secrets" }}
{{- $ocis_jwt_secret := "" }}
{{- $storage_transfer_secret := "" }}
{{- $ocis_machine_auth_api_Key := "" }}
data:
{{- if $ocisprevious}}
OCIS_JWT_SECRET: {{ index $ocisprevious.data "OCIS_JWT_SECRET" }}
STORAGE_TRANSFER_SECRET: {{ index $ocisprevious.data "STORAGE_TRANSFER_SECRET" }}
OCIS_MACHINE_AUTH_API_KEY: {{ index $ocisprevious.data "OCIS_MACHINE_AUTH_API_KEY" }}
{{- else }}
{{- $ocis_jwt_secret := randAlphaNum 32 }}
{{- $storage_transfer_secret := randAlphaNum 32 }}
{{- $ocis_machine_auth_api_Key := randAlphaNum 32 }}
OCIS_JWT_SECRET: {{ $ocis_jwt_secret | b64enc }}
STORAGE_TRANSFER_SECRET: {{ $storage_transfer_secret | b64enc }}
OCIS_MACHINE_AUTH_API_KEY: {{ $ocis_machine_auth_api_Key | b64enc }}
{{- end }}
{{- end -}}

View File

@@ -1 +1,8 @@
{{ include "common.all" . }}
{{/* Make sure all variables are set properly */}}
{{- include "common.setup" . }}
{{/* Render secrets for fireflyiii */}}
{{- include "ocis.secrets" . }}
{{/* Render the templates */}}
{{ include "common.postSetup" . }}

View File

@@ -1,31 +1,43 @@
image:
# -- image repository
repository: tccr.io/truecharts/ocis
# -- image tag
tag: v1.17.0@sha256:3721e88225a3caa157c3308cc630a3adf4ebc546a1786b9e28bf66b8fb2c3a64
# -- image pull policy
pullPolicy: IfNotPresent
securityContext:
readOnlyRootFilesystem: false
# -- environment variables. See more environment variables in the [owncloud-ocis documentation](https://owncloud.dev/ocis/configuration/#environment-variables).
# @default -- See below
env:
# -- Set the container timezone
OCIS_INSECURE: true
ACCOUNTS_DEMO_USERS_AND_GROUPS: false
OCIS_LOG_PRETTY: true
OCIS_LOG_COLOR: true
PROXY_TLS: false
PROXY_HTTP_ADDR: "0.0.0.0:{{ .Values.service.main.ports.main.port }}"
OCIS_URL: "https://localhost:{{ .Values.service.main.ports.main.port }}"
envValueFrom:
OCIS_JWT_SECRET:
secretKeyRef:
name: ocis-secrets
key: OCIS_JWT_SECRET
STORAGE_TRANSFER_SECRET:
secretKeyRef:
name: ocis-secrets
key: STORAGE_TRANSFER_SECRET
OCIS_MACHINE_AUTH_API_KEY:
secretKeyRef:
name: ocis-secrets
key: OCIS_MACHINE_AUTH_API_KEY
# -- Configures service settings for the chart.
# @default -- See values.yaml
service:
main:
ports:
main:
protocol: HTTPS
port: 9200
targetPort: 9200
# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence:
config:
data:
enabled: true
mountPath: "/config"
mountPath: "/var/lib/ocis"