diff --git a/charts/incubator/servas/.helmignore b/charts/incubator/servas/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/servas/.helmignore @@ -0,0 +1,30 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl +# docs folder +/docs +# icon +icon.png diff --git a/charts/incubator/servas/CHANGELOG.md b/charts/incubator/servas/CHANGELOG.md new file mode 100644 index 00000000000..825c32f0d03 --- /dev/null +++ b/charts/incubator/servas/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/charts/incubator/servas/Chart.yaml b/charts/incubator/servas/Chart.yaml new file mode 100644 index 00000000000..358cda31a03 --- /dev/null +++ b/charts/incubator/servas/Chart.yaml @@ -0,0 +1,32 @@ +apiVersion: v2 +appVersion: "0.0.5" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 12.9.2 + - condition: mariadb.enabled + name: mariadb + repository: https://deps.truecharts.org/ + version: 7.0.29 +deprecated: false +description: A self-hosted bookmark management tool. +home: https://truecharts.org/charts/incubator/servas +icon: https://truecharts.org/img/hotlink-ok/chart-icons/servas.png +keywords: + - servas + - bookmarks +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: servas +sources: + - https://github.com/truecharts/charts/tree/master/charts/incubator/servas + - https://github.com/beromir/Servas +type: application +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - bookmarks + truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/servas/README.md b/charts/incubator/servas/README.md new file mode 100644 index 00000000000..7e59600739c --- /dev/null +++ b/charts/incubator/servas/README.md @@ -0,0 +1 @@ +# README diff --git a/charts/incubator/servas/icon.png b/charts/incubator/servas/icon.png new file mode 100644 index 00000000000..6d901d5cd16 Binary files /dev/null and b/charts/incubator/servas/icon.png differ diff --git a/charts/incubator/servas/questions.yaml b/charts/incubator/servas/questions.yaml new file mode 100644 index 00000000000..fbd101ea7c3 --- /dev/null +++ b/charts/incubator/servas/questions.yaml @@ -0,0 +1,129 @@ +# Include{groups} +portals: + open: +# Include{portalLink} +questions: +# Include{global} +# Include{workload} +# Include{workloadDeployment} + +# Include{replicas1} +# Include{podSpec} +# Include{containerMain} + + - variable: env + label: Image Environment + schema: + additional_attrs: true + type: dict + attrs: + - variable: APP_NAME + label: App Name + description: Web Name + schema: + type: string + default: "Servas" + - variable: APP_DEBUG + label: App Debug + schema: + type: string + default: "true" + enum: + - value: "true" + description: "True" + - value: "false" + description: "False" + - variable: APP_URL + label: App Url + description: "set as http://ip:port or https://mydomain.tld" + schema: + type: string + default: "" + - variable: SERVAS_ENABLE_REGISTRATION + label: Servas Enable Registration + schema: + type: string + default: "true" + enum: + - value: "true" + description: "True" + - value: "false" + description: "False" + +# Include{containerBasic} +# Include{containerAdvanced} + +# Include{containerConfig} +# Include{podOptions} +# Include{serviceRoot} +# Include{serviceMain} +# Include{serviceSelectorLoadBalancer} +# Include{serviceSelectorExtras} + - variable: main + label: "Main Service Port Configuration" + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: "Port" + description: "This port exposes the container port on the service" + schema: + type: int + default: 11080 + required: true +# Include{serviceExpertRoot} +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceRoot} + - variable: nginx + label: "App Nginx Storage" + description: "Stores the Application Nginx." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} +# Include{persistenceList} +# Include{ingressRoot} + - variable: main + label: "Main Ingress" + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} +# Include{ingressTLS} +# Include{ingressTraefik} +# Include{ingressList} +# Include{securityContextRoot} + + - variable: runAsUser + label: "runAsUser" + description: "The UserID of the user running the application" + schema: + type: int + default: 0 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID this App of the user running the application" + schema: + type: int + default: 0 +# Include{securityContextContainer} +# Include{securityContextAdvanced} +# Include{securityContextPod} + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 + +# Include{resources} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/servas/templates/NOTES.txt b/charts/incubator/servas/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/servas/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/servas/templates/_secrets.tpl b/charts/incubator/servas/templates/_secrets.tpl new file mode 100644 index 00000000000..50371087ec3 --- /dev/null +++ b/charts/incubator/servas/templates/_secrets.tpl @@ -0,0 +1,11 @@ +{{/* Define the secrets */}} +{{- define "servas.secrets" -}} +{{- $secretName := (printf "%s-servas-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) -}} +{{- $key := randAlphaNum 32 -}} +{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) -}} + {{- $key = index .data "APP_KEY" | b64dec -}} +{{- end }} +enabled: true +data: + APP_KEY: {{ $key }} +{{- end -}} diff --git a/charts/incubator/servas/templates/common.yaml b/charts/incubator/servas/templates/common.yaml new file mode 100644 index 00000000000..31d108371d4 --- /dev/null +++ b/charts/incubator/servas/templates/common.yaml @@ -0,0 +1,11 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . }} + +{{/* Render secrets for servas */}} +{{- $secrets := include "servas.secrets" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "secrets" $secrets -}} +{{- end -}} + +{{/* Render the templates */}} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/servas/values.yaml b/charts/incubator/servas/values.yaml new file mode 100644 index 00000000000..bebf3fa9123 --- /dev/null +++ b/charts/incubator/servas/values.yaml @@ -0,0 +1,74 @@ +image: + repository: tccr.io/truecharts/servas + pullPolicy: IfNotPresent + tag: v0.0.5@sha256:a319facfecb2582b501fb67f1e68dd3a00e6b5d0e0a8842cf58b9aefaf2b2b23 + +securityContext: + container: + runAsNonRoot: false + readOnlyRootFilesystem: false + runAsUser: 0 + runAsGroup: 0 + fsGroup: 568 + +workload: + main: + podSpec: + containers: + main: + probes: + liveness: + path: "/" + type: http + readiness: + path: "/" + type: http + startup: + path: "/" + type: http + env: + APP_NAME: Servas + APP_KEY: + secretKeyRef: + name: secrets + key: APP_KEY + APP_ENV: production + APP_DEBUG: true + # APP_URL: "http://localhost:{{ .Values.service.main.ports.main.port }}" + SERVAS_ENABLE_REGISTRATION: true + DB_CONNECTION: mysql + DB_HOST: + secretKeyRef: + expandObjectName: false + name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}' + key: plainhost + DB_PORT: 3306 + DB_DATABASE: "{{ .Values.mariadb.mariadbDatabase }}" + DB_USERNAME: "{{ .Values.mariadb.mariadbUsername }}" + DB_PASSWORD: + secretKeyRef: + expandObjectName: false + name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}' + key: mariadb-password + +service: + main: + ports: + main: + protocol: http + targetPort: 80 + port: 11080 + +persistence: + nginx: + enabled: true + mountPath: /var/run/nginx + +portal: + open: + enabled: true + +mariadb: + enabled: true + mariadbUsername: servas + mariadbDatabase: servas