From ba62609a3b3769a1155964dc1273496cb1a34edf Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Mon, 14 Mar 2022 21:18:12 +0200 Subject: [PATCH] feat(hammond): Add hammond (#2163) * feat(hammond): Add hammond * update chart.yaml * root * use correct digest * root * try other port * rootless * update questions --- charts/incubator/hammond/Chart.yaml | 26 ++ charts/incubator/hammond/questions.yaml | 351 ++++++++++++++++++ .../incubator/hammond/templates/_secrets.tpl | 20 + .../incubator/hammond/templates/common.yaml | 8 + charts/incubator/hammond/values.yaml | 25 ++ docs/_static/img/appicons/hammond.png | Bin 0 -> 5682 bytes docs/manual/default-ports.md | 1 + 7 files changed, 431 insertions(+) create mode 100644 charts/incubator/hammond/Chart.yaml create mode 100644 charts/incubator/hammond/questions.yaml create mode 100644 charts/incubator/hammond/templates/_secrets.tpl create mode 100644 charts/incubator/hammond/templates/common.yaml create mode 100644 charts/incubator/hammond/values.yaml create mode 100644 docs/_static/img/appicons/hammond.png diff --git a/charts/incubator/hammond/Chart.yaml b/charts/incubator/hammond/Chart.yaml new file mode 100644 index 00000000000..620afb0fe7d --- /dev/null +++ b/charts/incubator/hammond/Chart.yaml @@ -0,0 +1,26 @@ +apiVersion: v2 +appVersion: "10.6.2" +dependencies: +- name: common + repository: https://truecharts.org + version: 9.1.2 +description: A self-hosted vehicle expense tracking system with support for multiple users. +home: https://github.com/truecharts/apps/tree/master/charts/stable/hammond +icon: https://truecharts.org/_static/img/appicons/hammond.png +keywords: +- hammond +kubeVersion: '>=1.16.0-0' +maintainers: +- email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: hammond +sources: +- https://github.com/akhilrex/hammond +- https://hub.docker.com/r/akhilrex/hammond +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - productivity + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/hammond/questions.yaml b/charts/incubator/hammond/questions.yaml new file mode 100644 index 00000000000..de09ceb27fe --- /dev/null +++ b/charts/incubator/hammond/questions.yaml @@ -0,0 +1,351 @@ +# Include{groups} +portals: + open: + protocols: + - "$kubernetes-resource_configmap_portal_protocol" + host: + - "$kubernetes-resource_configmap_portal_host" + ports: + - "$kubernetes-resource_configmap_portal_port" +questions: + - variable: portal + group: "Container Image" + label: "Configure Portal Button" + schema: + type: dict + hidden: true + attrs: + - variable: enabled + label: "Enable" + description: "enable the portal button" + schema: + hidden: true + editable: false + type: boolean + default: true +# Include{global} + - variable: controller + group: "Controller" + label: "" + schema: + additional_attrs: true + type: dict + attrs: + - variable: advanced + label: "Show Advanced Controller Settings" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: type + description: "Please specify type of workload to deploy" + label: "(Advanced) Controller Type" + schema: + type: string + default: "deployment" + required: true + enum: + - value: "deployment" + description: "Deployment" + - value: "statefulset" + description: "Statefulset" + - value: "daemonset" + description: "Daemonset" + - variable: replicas + description: "Number of desired pod replicas" + label: "Desired Replicas" + schema: + type: int + default: 1 + required: true + - variable: strategy + description: "Please specify type of workload to deploy" + label: "(Advanced) Update Strategy" + schema: + type: string + default: "Recreate" + required: true + enum: + - value: "Recreate" + description: "Recreate: Kill existing pods before creating new ones" + - value: "RollingUpdate" + description: "RollingUpdate: Create new pods and then kill old ones" + - value: "OnDelete" + description: "(Legacy) OnDelete: ignore .spec.template changes" +# Include{controllerExpert} + +# Include{containerConfig} + + - variable: service + group: "Networking and Services" + label: "Configure Service(s)" + schema: + additional_attrs: true + type: dict + attrs: + - 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{serviceSelector} + - 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: 10186 + required: true + - variable: advanced + label: "Show Advanced settings" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: protocol + label: "Port Type" + schema: + type: string + default: "HTTP" + enum: + - value: HTTP + description: "HTTP" + - value: "HTTPS" + description: "HTTPS" + - value: TCP + description: "TCP" + - value: "UDP" + description: "UDP" + - variable: nodePort + label: "Node Port (Optional)" + description: "This port gets exposed to the node. Only considered when service type is NodePort, Simple or LoadBalancer" + schema: + type: int + min: 9000 + max: 65535 + - variable: targetPort + label: "Target Port" + description: "The internal(!) port on the container the Application runs on" + schema: + type: int + default: 3000 + + - variable: serviceexpert + group: "Networking and Services" + label: "Show Expert Config" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostNetwork + group: "Networking and Services" + label: "Host-Networking (Complicated)" + schema: + type: boolean + default: false + +# Include{serviceExpert} + +# Include{serviceList} + + - variable: persistence + label: "Integrated Persistent Storage" + description: "Integrated Persistent Storage" + group: "Storage and Persistence" + schema: + additional_attrs: true + type: dict + attrs: + - variable: config + label: "App Config Storage" + description: "Stores the Application Configuration." + schema: + additional_attrs: true + type: dict + attrs: + - variable: type + label: "Type of Storage" + description: "Sets the persistence type, Anything other than PVC could break rollback!" + schema: + type: string + default: "simplePVC" + enum: + - value: "simplePVC" + description: "PVC (simple)" + - value: "simpleHP" + description: "HostPath (simple)" + - value: "emptyDir" + description: "emptyDir" + - value: "pvc" + description: "pvc" + - value: "hostPath" + description: "hostPath" +# Include{persistenceBasic} + - variable: hostPath + label: "hostPath" + description: "Path inside the container the storage is mounted" + schema: + show_if: [["type", "=", "hostPath"]] + type: hostpath + - variable: medium + label: "EmptyDir Medium" + schema: + show_if: [["type", "=", "emptyDir"]] + type: string + default: "" + enum: + - value: "" + description: "Default" + - value: "Memory" + description: "Memory" +# Include{persistenceAdvanced} + - variable: assets + label: "App Assets Storage" + description: "Stores the Application Assets." + schema: + additional_attrs: true + type: dict + attrs: + - variable: type + label: "Type of Storage" + description: "Sets the persistence type, Anything other than PVC could break rollback!" + schema: + type: string + default: "simplePVC" + enum: + - value: "simplePVC" + description: "PVC (simple)" + - value: "simpleHP" + description: "HostPath (simple)" + - value: "emptyDir" + description: "emptyDir" + - value: "pvc" + description: "pvc" + - value: "hostPath" + description: "hostPath" +# Include{persistenceBasic} + - variable: hostPath + label: "hostPath" + description: "Path inside the container the storage is mounted" + schema: + show_if: [["type", "=", "hostPath"]] + type: hostpath + - variable: medium + label: "EmptyDir Medium" + schema: + show_if: [["type", "=", "emptyDir"]] + type: string + default: "" + enum: + - value: "" + description: "Default" + - value: "Memory" + description: "Memory" +# Include{persistenceAdvanced} + +# Include{persistenceList} + + - variable: ingress + label: "" + group: "Ingress" + schema: + additional_attrs: true + type: dict + attrs: + - variable: main + label: "Main Ingress" + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} + +# Include{ingressTLS} + +# Include{ingressTraefik} + +# Include{ingressExpert} + +# Include{ingressList} + +# Include{security} + + - variable: advancedSecurity + label: "Show Advanced Security Settings" + group: "Security and Permissions" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: securityContext + label: "Security Context" + schema: + additional_attrs: true + type: dict + attrs: + - 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} + + - variable: podSecurityContext + group: "Security and Permissions" + label: "Pod Security Context" + schema: + additional_attrs: true + type: dict + attrs: + - 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} diff --git a/charts/incubator/hammond/templates/_secrets.tpl b/charts/incubator/hammond/templates/_secrets.tpl new file mode 100644 index 00000000000..42fd44cbec0 --- /dev/null +++ b/charts/incubator/hammond/templates/_secrets.tpl @@ -0,0 +1,20 @@ +{{/* Define the secrets */}} +{{- define "hammond.secrets" -}} +--- + +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: hammond-secrets +{{- $hammondprevious := lookup "v1" "Secret" .Release.Namespace "hammond-secrets" }} +{{- $jwt_secret := "" }} +data: + {{- if $hammondprevious}} + JWT_SECRET: {{ index $hammondprevious.data "JWT_SECRET" }} + {{- else }} + {{- $jwt_secret := randAlphaNum 32 }} + JWT_SECRET: {{ $jwt_secret | b64enc }} + {{- end }} + +{{- end -}} diff --git a/charts/incubator/hammond/templates/common.yaml b/charts/incubator/hammond/templates/common.yaml new file mode 100644 index 00000000000..4ad90c0980d --- /dev/null +++ b/charts/incubator/hammond/templates/common.yaml @@ -0,0 +1,8 @@ +{{/* Make sure all variables are set properly */}} +{{- include "common.setup" . }} + +{{/* Render secrets for hammond */}} +{{- include "hammond.secrets" . }} + +{{/* Render the templates */}} +{{ include "common.postSetup" . }} diff --git a/charts/incubator/hammond/values.yaml b/charts/incubator/hammond/values.yaml new file mode 100644 index 00000000000..2999cb7077d --- /dev/null +++ b/charts/incubator/hammond/values.yaml @@ -0,0 +1,25 @@ +image: + repository: akhilrex/hammond + tag: 1.0.0@sha256:b5df7f1bd33e01645535f2d20f22731c9a0859c77b97ddcbf49f57635eb81646 + pullPolicy: IfNotPresent + +envValueFrom: + JWT_SECRET: + secretKeyRef: + name: hammond-secrets + key: JWT_SECRET + +service: + main: + ports: + main: + port: 10186 + targetPort: 3000 + +persistence: + config: + enabled: true + mountPath: "/config" + assets: + enabled: true + mountPath: "/assets" diff --git a/docs/_static/img/appicons/hammond.png b/docs/_static/img/appicons/hammond.png new file mode 100644 index 0000000000000000000000000000000000000000..83120a1a02fc0fdfb9de5a9c17c0c20cb9606b09 GIT binary patch literal 5682 zcmeHKXH-+|vYwqlK#-<@3IefEREi%GkeY~~qEb|fN>var3y zG}4ho!O90gX-XH6Pz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*uL*Ulfo3!ySIK5;Cn{yu~x4Rh~*_f0c7Pcgg^qLhV8ZVTgw5NMeuPdgU^UV=sr zd^5eE~DRjm##p8Mga(8{#`CYQsYKC?zh+kr5D*Lo(>H6MdI@bVNf|p&UuA`puDa4@WypL7A%TtEic>Tx~5e&)Bv}~LZ6UkIFHJ0T=lW61nJ8_&T z?|Y5vYr638I*~}p?X|q#nd?4u+gBVGH3XD3!Ycx)OE+grYN`V+#wvC`XVu2k#Vxm)jyV5U>{7J6#Z%aI z%n*%oQF3GZckMK(SK85r!!wubLLCMCGU#s&cdH(DJnS_cx@YusJEA(TU-828r|0R* zMNHvumH~3Kn410V`i82835(Pdth_I*>BxKSj?aG%le52a<+crBTnf1(1nKKfqdu~O zno`72wk>xiRCTpT!Ys?zMVqyQ(8*;l9yBiIN^uq<*N#LUC(aVzO8w|vZqnwKZLL>i zi|uIV7Ib$+yN54G)#y0e9hm3+4i|-sz1%$ZnEHd!SS3BR#JxvFZZG$YbBFSo%M6Y- z=j4W$k<~_wnN>|h`eLK=0%fAX`Cc3=A_J$Zut z>^|wxw}Awl%gp;aqWBfx*T+R%gr@||No$~ACshBDB%%wY4#w;keCl4MqA-;egRTbi zx(s#98qiY1M-chcy-P8qW=!Maq&eBl2>LDWqQP+OEGrE8k9!vxNC=7neh>mlPys98 z8FT?X==-0;{#VYp*u`BN+$fjM$kE2G#Wi$13Iw{iv38!(7$ouJSYtl+&+1KX6pq?b zRzb}^p&xm_#SOye!cKp3DiEzr9;0r$ao(m{Yc<5)dtj1u&Stl|Q$@noSH~K*?7hhP z*5DR@cQj2VX{`OCc--|-U82duoe|z*SKP`wJg$vyZu_Pjv-O#copkBgBg^~=#iYZn xj~O}QwqIFdZN8(M(`MUZ=cp$yo}V}72tT|%8r>!?xx7-lnW=?Ip|Q)={{aQyE{XsE literal 0 HcmV?d00001 diff --git a/docs/manual/default-ports.md b/docs/manual/default-ports.md index dd0d078e6e3..f367b0b20bf 100644 --- a/docs/manual/default-ports.md +++ b/docs/manual/default-ports.md @@ -341,6 +341,7 @@ These defaults can of course be changed, but as we guarantee "sane, working defa | nextpvr | main | main | 10183 | TCP | | | ispy-agent-dvr | main | main | 10184 | TCP | | | ispy-agent-dvr | turn | turn | 10185 | UDP | | +| hammond | main | main | 10186 | TCP | | | storj-node | main | main | 14002 | TCP | | | satisfactory | beacon | beacon | 15000 | UDP | | | satisfactory | query | query | 15777 | UDP | |