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 00000000000..d8e8400325f Binary files /dev/null and b/charts/incubator/flatnotes/icon.png differ 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