From 787d0bc567c1f28c325c79a06cc51edf593ad497 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 18 Sep 2022 20:37:03 +0300 Subject: [PATCH] feat(flatnotes): add flatnotes (#3804) * feat(flatnotes): add flatnotes * rofs false * Update charts/incubator/flatnotes/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * root * user 1000 Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/incubator/flatnotes/.helmignore | 30 ++++ charts/incubator/flatnotes/Chart.yaml | 26 +++ charts/incubator/flatnotes/README.md | 0 charts/incubator/flatnotes/icon.png | Bin 0 -> 6904 bytes charts/incubator/flatnotes/questions.yaml | 151 ++++++++++++++++++ .../flatnotes/templates/_secrets.tpl | 19 +++ .../incubator/flatnotes/templates/common.yaml | 8 + charts/incubator/flatnotes/values.yaml | 36 +++++ cspell.config.yaml | 1 + 9 files changed, 271 insertions(+) create mode 100644 charts/incubator/flatnotes/.helmignore create mode 100644 charts/incubator/flatnotes/Chart.yaml create mode 100644 charts/incubator/flatnotes/README.md create mode 100644 charts/incubator/flatnotes/icon.png create mode 100644 charts/incubator/flatnotes/questions.yaml create mode 100644 charts/incubator/flatnotes/templates/_secrets.tpl create mode 100644 charts/incubator/flatnotes/templates/common.yaml create mode 100644 charts/incubator/flatnotes/values.yaml diff --git a/charts/incubator/flatnotes/.helmignore b/charts/incubator/flatnotes/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/flatnotes/.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/flatnotes/Chart.yaml b/charts/incubator/flatnotes/Chart.yaml new file mode 100644 index 00000000000..98a957e287e --- /dev/null +++ b/charts/incubator/flatnotes/Chart.yaml @@ -0,0 +1,26 @@ +apiVersion: v2 +appVersion: "1.12.0" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 10.5.10 +description: A database-less note taking web app that utilizes a flat folder of markdown files for storage. +home: https://truecharts.org/docs/charts/stable/flatnotes +icon: https://truecharts.org/img/hotlink-ok/chart-icons/flatnotes.png +keywords: + - notes +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: flatnotes +sources: + - https://hub.docker.com/r/dullage/flatnotes + - https://github.com/Dullage/flatnotes +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - productivity + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/flatnotes/README.md b/charts/incubator/flatnotes/README.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/charts/incubator/flatnotes/icon.png b/charts/incubator/flatnotes/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d8e8400325f57bc5b648ba570e5dcc7b39cf816f GIT binary patch literal 6904 zcmeHLc{H0_*MHEI-YB=1TijB;uMlHmC@NKS&^Cr>4K)wFW=e{nsG)VMmlkb;lo)Rt zuCXm@COW95#!}SW5=2ZThN6=1zW=^tWo4c7?7h!#?`NOi*=HwS z!d*D{!!JKT5OffG@th?D@uPS@q5WXykxBd{_}k}w+Wa&GJx_&yzX}86W9}C%%^@gK z0fORwhoBuW6~~02P<04mxj_)-5d=wG&u+M^4<79Q&Gf=Kh|BxtHy4q>j35DPZY($} zBp`fHudBIU1A?S7vFA=(-xygM_kZBxeO2}=ci6eSBE!Rxs7BvXc`NCDlkb{)p^~qr zuU8-a&Hj^@Ox{1~j8h_Yo-i8`T|axW6(MisF4}7rdElW~{yZW_+(%tN=gpfp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pv!F=BfrBJ-%R7Q`#QY^+egN2eCeBFiSBdtPd!FD1*N-RT zgnGkyo7CBni01}{P*(1-7#uW>usVA+BZ4^3Z?SXZVjB690=}ftZ4+Ae6*5FuI@!;=t+Si<{ca5NUO@bYkwq z+r@41Va@~K;m=JyjzCdjnJcNGJJ|<6|zb)w_ZM}d-k>D#_QWxb*IqkgapuU z8RPX^>`n!{&I<`EwB5O*i&-s4SW(@fHZw2faI(ltVB7Bcz`?x99BVIUw;RzYKTg=K1#-NW)s=yr zaYT8aMqG-&{6;%i`74;T-dG-`kwI6mPcJTI_h#sHK&&h1Fj)i@utjPOGCWM@C5_tk zGd~z}D+odf@xZ#xN@GCOc@~9emeI|xT1Wp_P66%B=EtBb2p-!Whlefz6N1lLSuFR% zj6QRlc}SSN(}U*_SUZn-jlKN$O9PFD?1DZGNtBlpv*NA=XBX@^oqCDy)XQ2^X; zkAeyoSQwk-x@}R*0UGFSs-yGha{iovjn&jqR$PUZlVah-`WHvb8AAmrl^mE)heuW6 z%%GvF%4!4YNafIl^Y9?0u3sdQN+v=_ou!=D-y*o$VV~}} zd^E9%MLoWUvTysYrHnmlXfUAv{QM6IjHf1j zi+EFsmdTEoom(qr5d1Rm$yjIu#p%+bbPQLz7c;f0${IiiuY zh+Vr$ykIqu`s8Rmx+7!4W^bejWUA1=b*BG+_RQ$snivf&jJB?dx;jQ(-A-u#q5q~3fcNnAiuj)ulx$kc zfr4$MwH?9oYWT71!FVsMe_J0Atwj5ai literal 0 HcmV?d00001 diff --git a/charts/incubator/flatnotes/questions.yaml b/charts/incubator/flatnotes/questions.yaml new file mode 100644 index 00000000000..ed894dd80df --- /dev/null +++ b/charts/incubator/flatnotes/questions.yaml @@ -0,0 +1,151 @@ +# Include{groups} +portals: + open: +# Include{portalLink} +questions: +# Include{global} +# Include{controller} +# Include{controllerDeployment} +# Include{replicas} +# Include{replica1} +# Include{strategy} +# Include{recreate} +# Include{controllerExpert} +# Include{controllerExpertExtraArgs} + - variable: secretEnv + group: Container Configuration + label: Image Secrets + schema: + additional_attrs: true + type: dict + attrs: + - variable: FLATNOTES_USERNAME + label: Username + schema: + type: string + required: true + default: "" + - variable: FLATNOTES_PASSWORD + label: Password + schema: + type: string + private: true + required: true + default: "" + - variable: env + group: Container Configuration + label: Image Environment + schema: + additional_attrs: true + type: dict + attrs: + - variable: FLATNOTES_SESSION_EXPIRY_DAYS + label: Session Expiry Days + schema: + type: int + default: 30 +# Include{containerConfig} +# Include{serviceRoot} + - variable: main + label: Main Service + description: The Primary service on which the healthcheck runs, often the webUI + schema: + additional_attrs: true + type: dict + attrs: +# Include{serviceSelectorSimple} +# 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: 10350 + required: true +# Include{advancedPortHTTP} + - variable: targetPort + label: Target Port + description: The internal(!) port on the container the Application runs on + schema: + type: int + default: 80 +# Include{serviceExpertRoot} + default: false +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceRoot} + - variable: data + label: App Data Storage + description: Stores the Application Data. + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} +# Include{persistenceAdvanced} +# Include{persistenceList} +# Include{ingressRoot} + - variable: main + label: Main Ingress + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} +# Include{ingressTLS} +# Include{ingressTraefik} +# Include{ingressExpert} +# Include{ingressList} +# Include{security} +# Include{securityContextAdvancedRoot} + - variable: privileged + label: Privileged mode + schema: + type: boolean + default: false + - variable: readOnlyRootFilesystem + label: ReadOnly Root Filesystem + schema: + type: boolean + default: true + - variable: allowPrivilegeEscalation + label: Allow Privilege Escalation + schema: + type: boolean + default: false + - variable: runAsNonRoot + label: runAsNonRoot + schema: + type: boolean + default: true +# Include{securityContextAdvanced} +# Include{podSecurityContextRoot} + - variable: runAsUser + label: runAsUser + description: The UserID of the user running the application + schema: + type: int + default: 1000 + - variable: runAsGroup + label: runAsGroup + description: The groupID this App of the user running the application + schema: + type: int + default: 1000 + - variable: fsGroup + label: fsGroup + description: The group that should own ALL storage. + schema: + type: int + default: 568 +# Include{podSecurityContextAdvanced} +# Include{resources} +# Include{advanced} +# Include{addons} +# Include{documentation} diff --git a/charts/incubator/flatnotes/templates/_secrets.tpl b/charts/incubator/flatnotes/templates/_secrets.tpl new file mode 100644 index 00000000000..9c6d5d4b4bb --- /dev/null +++ b/charts/incubator/flatnotes/templates/_secrets.tpl @@ -0,0 +1,19 @@ +{{/* Define the secrets */}} +{{- define "flatnotes.secrets" -}} + +{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) }} +--- + +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ $secretName }} +data: + {{- with (lookup "v1" "Secret" .Release.Namespace $secretName) }} + FLATNOTES_SECRET_KEY: {{ index .data "FLATNOTES_SECRET_KEY" }} + {{- else }} + FLATNOTES_SECRET_KEY: {{ randAlphaNum 32 | b64enc }} + {{- end }} + +{{- end -}} diff --git a/charts/incubator/flatnotes/templates/common.yaml b/charts/incubator/flatnotes/templates/common.yaml new file mode 100644 index 00000000000..06553f3e407 --- /dev/null +++ b/charts/incubator/flatnotes/templates/common.yaml @@ -0,0 +1,8 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.common.loader.init" . }} + +{{/* Render secrets for flatnotes */}} +{{- include "flatnotes.secrets" . }} + +{{/* Render the templates */}} +{{ include "tc.common.loader.apply" . }} diff --git a/charts/incubator/flatnotes/values.yaml b/charts/incubator/flatnotes/values.yaml new file mode 100644 index 00000000000..b2041992c1e --- /dev/null +++ b/charts/incubator/flatnotes/values.yaml @@ -0,0 +1,36 @@ +image: + repository: tccr.io/truecharts/flatnotes + tag: v1.0.4@sha256:9136a8f68d557a35ca1f3abd26fefcad8f213659ce2f1dfaeef665a044847d89 + pullPolicy: IfNotPresent + +podSecurityContext: + runAsUser: 1000 + runAsGroup: 1000 + +secretEnv: + FLATNOTES_USERNAME: "user" + FLATNOTES_PASSWORD: "pass" + +env: + FLATNOTES_SECRET_KEY: + secretKeyRef: + name: '{{ (include "tc.common.names.fullname" .) }}-secret' + key: FLATNOTES_SECRET_KEY + # User Defined + FLATNOTES_SESSION_EXPIRY_DAYS: 30 + +service: + main: + ports: + main: + port: 10350 + protocol: HTTP + targetPort: 80 + +persistence: + data: + enabled: true + mountPath: "/app/data" + +portal: + enabled: true diff --git a/cspell.config.yaml b/cspell.config.yaml index a0414118771..93b63c92ffd 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -54,6 +54,7 @@ words: - entrypoints - eptgmk - fireshare + - flatnotes - flushtables - forcegc - fullname