From 3699e4a8218a1b7cbdc9872353bb52a99d032e2c Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Mon, 3 Oct 2022 01:11:21 +0300 Subject: [PATCH] feat(microbin): add microbin (#3993) * feat(microbin): add microbin * update version * hmm * again * whoops * few quotes * hmm * helm quote * ... * hmm * .. * no mess * wrong docs? * finally --- charts/incubator/microbin/.helmignore | 30 +++ charts/incubator/microbin/Chart.yaml | 26 ++ charts/incubator/microbin/README.md | 0 charts/incubator/microbin/icon.png | Bin 0 -> 1191 bytes charts/incubator/microbin/questions.yaml | 223 ++++++++++++++++++ charts/incubator/microbin/templates/_args.tpl | 58 +++++ .../incubator/microbin/templates/common.yaml | 10 + charts/incubator/microbin/values.yaml | 35 +++ cspell.config.yaml | 1 + 9 files changed, 383 insertions(+) create mode 100644 charts/incubator/microbin/.helmignore create mode 100644 charts/incubator/microbin/Chart.yaml create mode 100644 charts/incubator/microbin/README.md create mode 100644 charts/incubator/microbin/icon.png create mode 100644 charts/incubator/microbin/questions.yaml create mode 100644 charts/incubator/microbin/templates/_args.tpl create mode 100644 charts/incubator/microbin/templates/common.yaml create mode 100644 charts/incubator/microbin/values.yaml diff --git a/charts/incubator/microbin/.helmignore b/charts/incubator/microbin/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/microbin/.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/microbin/Chart.yaml b/charts/incubator/microbin/Chart.yaml new file mode 100644 index 00000000000..ca899cafa99 --- /dev/null +++ b/charts/incubator/microbin/Chart.yaml @@ -0,0 +1,26 @@ +apiVersion: v2 +appVersion: "10.6.2" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 10.6.4 +description: MicroBin is a super tiny, feature rich, configurable, self-contained and self-hosted paste bin web application. +home: https://truecharts.org/docs/charts/stable/airsonic +icon: https://truecharts.org/img/hotlink-ok/chart-icons/airsonic.png +keywords: + - microbin +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: microbin +sources: + - https://github.com/truecharts/charts/tree/master/charts/stable/airsonic + - https://github.com/szabodanika/microbin +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - utility + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/microbin/README.md b/charts/incubator/microbin/README.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/charts/incubator/microbin/icon.png b/charts/incubator/microbin/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..bf2c66905993fd041100c6d2f01bc8742e49ae3a GIT binary patch literal 1191 zcmV;Y1X%ltP)2?C)r~6 z&6)e1cfap^_s#v@1|}rk13YEYK8^^vu^dP`2y8bfKWBoxB@at>kOU;1Gsks!E)i$1 zdHwN33=5KW01GBjF;@u!;BH|B|lR?^t+RS`cPQS~fr84h|@1nAMB*95# zex{rrYKoV%8@R&^)N7}Q`k8lwh@Lw=)EA#|`aexh28~R(t;~1f^z$@udT1~6eKb2r zX5MxBF1EQwP7gK2OS+4GI=w4?jnhND%)3Fla{9(aR~_+gkY6L>lF7-Su?e>!z6+;c z0Ct+RROV;W>0zB_o+&szOb{>WPG;2UVRGg(PJhzmWYDOlA7a|#mm}h`$*~}54%lzf z#?Hn`;@!$_*}Oi3y})fIr<2ULdH`X7mlB**=3S?Eo0t{`Q~ouRHrDB(Lj1t#cbI|p zNZMj@9J~TNXmU=Db9$)GeC9d*9B?qfn+Qo;fp-(s(ye#e;sM@B@=75ofDeE@33}nib?5)$B$q-T@dGQ0!4n&kRLm!z-F(@mo|E9u_kU`NNWNz(fb#vw`fX98bn81%HH zOjBVPf4`*f8jfK_#SUQwUT7F}h%1ubmQ=gDt3vcqNqM7&=1;>{(0&zfBswg4{=e!4`Z*_Ew_>^9do zR6a$XmiSN1>ofQkIB#+)#h0!53wY1Sb^$*EyA6(mW#BR36tKA_XBF65R@%at%&TYv zIl|9I#P8%v&pNmayhtIsu5hTR>4z9M?XwRo-vf@B+)20u9Eylzz@sL2Vr4f@e5x4` z5r0#B);?|W%kUHMWJG*3_}vvhv1K;R%o7pkfG2=2&3laEDsTii5D}xDpQ&g5I!OA; ztfHPCbB|jjy(#H8<33j;eJJUnl5w3f$2GC0zs~I?oyY5YZ!bG?CTSD!Jn#bWIB*|u z`{3n^6ieg>;B(;9vNo5b%@phZrkZ1#==9@)%$x7-nc6r1FUHvI^+w>@HQ#!7rtNQ8 zIk;AQANz8xq4Ui52~9KK#qpEYu*Q6*>GbOX|7KqPA>OV|Rkw!GY41L7Ti5Fy){5`r zsp?kIMEp!;enai?Fyi)-mhrxywymSX#jRluQeVvL>Qr^B7*6{QH|61f@xTV$<{&SA zCNdvjJH04s`t@&kD*oBVhI4u-8kMUQ-H^IiX=yB-;~%WH2pGtqz>xp|002ovPDHLk FV1jKKNv!|? literal 0 HcmV?d00001 diff --git a/charts/incubator/microbin/questions.yaml b/charts/incubator/microbin/questions.yaml new file mode 100644 index 00000000000..0acbab898c5 --- /dev/null +++ b/charts/incubator/microbin/questions.yaml @@ -0,0 +1,223 @@ +# 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: microbin + group: Container Configuration + label: Microbin Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: username + label: Username + description: Require username for HTTP Basic Authentication when visiting the service. + schema: + type: string + default: "" + - variable: password + label: Password + description: Require password for HTTP Basic Authentication when visiting the service. + schema: + type: string + private: true + default: "" + - variable: title + label: Title + description: Replaces the default title in the navigation bar with your own. + schema: + type: string + default: "" + - variable: editable + label: Editable + description: Enables editable pastas. + schema: + type: boolean + default: true + - variable: syntax_highlight + label: Syntax Highlight + description: Enables syntax highlighting support. + schema: + type: boolean + default: true + - variable: hide_logo + label: Hide Logo + description: Hides the MicroBin logo from the navigation bar on every page. + schema: + type: boolean + default: false + - variable: hide_header + label: Hide Header + description: Hides the navigation bar on every page. + schema: + type: boolean + default: false + - variable: hide_footer + label: Hide Footer + description: Hides the footer on every page. + schema: + type: boolean + default: false + show_subquestions_if: false + subquestions: + - variable: footer + label: Footer + description: Replaces the default footer text with your own. + schema: + type: string + default: "" + - variable: no_listing + label: No Listing + description: Disables the /pastalist endpoint, essentially making all pastas private. + schema: + type: boolean + default: false + - variable: private + label: Private + description: Enables private pastas. With the URL to your pasta, it will still be accessible. + schema: + type: boolean + default: true + - variable: pure_html + label: Pure HTML + description: Disables main CSS styling, just uses a few in-line stylings for the layout. + schema: + type: boolean + default: false + - variable: read_only + label: Read Only + description: Disables adding/editing/removing pastas entirely. + schema: + type: boolean + default: false + - variable: wide + label: Wide + description: Changes the maximum width of the UI from 720 pixels to 1080 pixels. + schema: + type: boolean + default: true + - variable: threads + label: Threads + description: Number of workers MicroBin is allowed to have. + schema: + type: int + default: 1 +# 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{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: 10302 + required: true +# Include{advancedPortHTTP} + - variable: targetPort + label: Target Port + description: The internal(!) port on the container the Application runs on + schema: + type: int + default: 10302 +# 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: 568 + - variable: runAsGroup + label: runAsGroup + description: The groupID this App of the user running the application + schema: + type: int + default: 568 + - 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{codeserver} +# Include{promtail} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/microbin/templates/_args.tpl b/charts/incubator/microbin/templates/_args.tpl new file mode 100644 index 00000000000..47a735fc75f --- /dev/null +++ b/charts/incubator/microbin/templates/_args.tpl @@ -0,0 +1,58 @@ +{{- define "microbin.args" -}} +{{ $v := .Values.microbin }} +args: + - --port + - {{ .Values.service.main.ports.main.port | quote }} + {{- if $v.editable }} + - --editable + {{- end }} + {{- if $v.hide_logo }} + - --hide-logo + {{- end }} + {{- if $v.hide_header }} + - --hide-header + {{- end }} + {{- if not $v.hide_footer }} + {{- with $v.footer }} + - --footer-text + - {{ . | quote }} + {{- end }} + {{- else }} + - --hide-footer + {{- end }} + {{- if $v.no_listing }} + - --no-listing + {{- end }} + {{- if $v.syntax_highlight }} + - --highlightsyntax + {{- end }} + {{- if $v.private }} + - --private + {{- end }} + {{- if $v.pure_html }} + - --pure-html + {{- end }} + {{- if $v.read_only }} + - --readonly + {{- end }} + {{- with $v.title }} + - --title + - {{ . | quote }} + {{- end }} + {{- if $v.wide }} + - --wide + {{- end }} + {{- with $v.threads }} + - --threads + - {{ . | quote }} + {{- end }} + {{- if $v.username }} + - --auth-username + - {{ $v.username | quote }} + {{- if $v.password }} + - --auth-password + - {{ $v.password | quote }} + {{- end }} + {{- end }} + +{{- end -}} diff --git a/charts/incubator/microbin/templates/common.yaml b/charts/incubator/microbin/templates/common.yaml new file mode 100644 index 00000000000..c38e984a8be --- /dev/null +++ b/charts/incubator/microbin/templates/common.yaml @@ -0,0 +1,10 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.common.loader.init" . }} + +{{- $newArgs := (include "microbin.args" . | fromYaml) }} +{{- $_ := set .Values "newArgs" $newArgs -}} +{{- $args := concat .Values.args .Values.newArgs.args }} +{{- $_ := set .Values "args" $args -}} + +{{/* Render the templates */}} +{{ include "tc.common.loader.apply" . }} diff --git a/charts/incubator/microbin/values.yaml b/charts/incubator/microbin/values.yaml new file mode 100644 index 00000000000..c8f21caeba0 --- /dev/null +++ b/charts/incubator/microbin/values.yaml @@ -0,0 +1,35 @@ +image: + repository: tccr.io/truecharts/microbin + tag: v1.1.1@sha256:0af550df5ac615d1c3db0d39b3c91eb440d616e1de15a5a49115e8f81ded9e07 + pullPolicy: IfNotPresent + +microbin: + username: user + password: pass + title: Microbin + editable: true + syntax_highlight: true + hide_logo: false + hide_header: false + hide_footer: false + footer: TrueCharts + no_listing: false + private: true + pure_html: false + read_only: true + wide: true + threads: 1 + +service: + main: + ports: + main: + port: 10302 + +persistence: + data: + enabled: true + mountPath: "/app/pasta_data" + +portal: + enabled: true diff --git a/cspell.config.yaml b/cspell.config.yaml index 083945f34a7..35d66f5206f 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -141,6 +141,7 @@ words: - mergerfs - meshroom - metallb + - microbin - Midarr - middlewares - middlewaretcps