diff --git a/charts/incubator/webnut/.helmignore b/charts/incubator/webnut/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/webnut/.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/webnut/Chart.yaml b/charts/incubator/webnut/Chart.yaml new file mode 100644 index 00000000000..0b87f7759d9 --- /dev/null +++ b/charts/incubator/webnut/Chart.yaml @@ -0,0 +1,31 @@ +apiVersion: v2 +appVersion: "latest" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 10.7.7 +deprecated: false +description: webNUT (UPS network monitoring web ui). +home: https://truecharts.org/docs/charts/incubator/webnut +icon: https://truecharts.org/img/hotlink-ok/chart-icons/webnut.png +keywords: + - webnut + - ups + - monitoring +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: webnut +sources: + - https://github.com/truecharts/charts/tree/master/charts/incubator/webnut + - https://hub.docker.com/r/edgd1er/webnut + - https://github.com/rshipp/webNUT +type: application +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - monitoring + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/webnut/README.md b/charts/incubator/webnut/README.md new file mode 100644 index 00000000000..e69de29bb2d diff --git a/charts/incubator/webnut/docs/img/nut-scanner.png b/charts/incubator/webnut/docs/img/nut-scanner.png new file mode 100644 index 00000000000..fc9a197a6a5 Binary files /dev/null and b/charts/incubator/webnut/docs/img/nut-scanner.png differ diff --git a/charts/incubator/webnut/docs/img/ups-other.png b/charts/incubator/webnut/docs/img/ups-other.png new file mode 100644 index 00000000000..c0fb6422e02 Binary files /dev/null and b/charts/incubator/webnut/docs/img/ups-other.png differ diff --git a/charts/incubator/webnut/docs/img/ups-server.png b/charts/incubator/webnut/docs/img/ups-server.png new file mode 100644 index 00000000000..29ae35dfe8e Binary files /dev/null and b/charts/incubator/webnut/docs/img/ups-server.png differ diff --git a/charts/incubator/webnut/docs/img/ups-shutdown.png b/charts/incubator/webnut/docs/img/ups-shutdown.png new file mode 100644 index 00000000000..5bceb463e2d Binary files /dev/null and b/charts/incubator/webnut/docs/img/ups-shutdown.png differ diff --git a/charts/incubator/webnut/docs/installation_notes.md b/charts/incubator/webnut/docs/installation_notes.md new file mode 100644 index 00000000000..265d15d51cc --- /dev/null +++ b/charts/incubator/webnut/docs/installation_notes.md @@ -0,0 +1,62 @@ +# Installation Notes + +:::info + +This chart requires ingress without it you will NOT be able to access the webGUI. + +::: + +## Prerequisite + +In order to get started, plug in your UPS via USB to the `server` node and before modifying the `UPS service` section. + +Go to your system shell on your node and run the following command to get the basic info for your UPS. + +```terminal +nut-scanner -U +``` + +![nut-scanner](./img/nut-scanner.png) + +My UPS uses the `usbhid-ups` driver from `driver = "usbhid-ups"`. + +For me though _my_ UPS is _not_ listed in the list, however NUT states you can use others devices of similar models from the same manufacturer as long as its uses the same driver. + +![ups-server](./img/ups-server.png) + +You can change the `Monitor User` to whatever you want, I kept it default for simplicity. + +I highly recommend securing the `Monitor Password` with a lengthy password. Special characters do work, but only tested a few. + +The `UPS Mode` should be set to `Master` which means its the server and _not_ the client. + +The `port or hosthame` can be just left at `auto`. + +![ups-shutdown](./img/ups-shutdown.png) + +Please set an actual shutdown command, all this will do is echo `shutdown` in the console. + +![ups-other](./img/ups-other.png) + +For `Auxiliary Parameters` this is what I used: + +```text +LISTEN 127.0.0.1 3493 +LISTEN 0.0.0.0 3493 +``` + +## WebNUT Installation + +- Set `UPS User` to the username defined for the `Monitor User`. +- Set `UPS Password` to the password defined for the `Monitor Password`. +- Set `UPS Host` to the local IP of your server. +- Set `UPS Port` to `3493` which is typically the default port. + +In order to access the webGUI, you will **need** to add `ingress` otherwise it will refuse to connect. + +:::info + +You can also reach us using Discord for real-time feedback and support +If you found a bug in our chart, open a Github issue but generally it's advised to contact us on Discord first in most cases. + +::: diff --git a/charts/incubator/webnut/icon.png b/charts/incubator/webnut/icon.png new file mode 100644 index 00000000000..a52cbab2f4e Binary files /dev/null and b/charts/incubator/webnut/icon.png differ diff --git a/charts/incubator/webnut/questions.yaml b/charts/incubator/webnut/questions.yaml new file mode 100644 index 00000000000..2f82034695c --- /dev/null +++ b/charts/incubator/webnut/questions.yaml @@ -0,0 +1,156 @@ +# 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: UPS_USER + label: UPS User + description: Set the NUT user. + schema: + type: string + default: "" + required: true + - variable: UPS_PASSWORD + label: UPS Password + description: Set the NUT password. + schema: + type: string + default: "" + private: true + required: true + - variable: env + group: Container Configuration + label: Image Environment + schema: + additional_attrs: true + type: dict + attrs: + - variable: UPS_HOST + label: UPS Host + description: Host IP. + schema: + type: string + default: "" + required: true + - variable: UPS_PORT + label: UPS Port + description: UPS PORT. + schema: + type: int + default: 3493 + required: true +# 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: 10585 + required: true +# Include{advancedPortHTTP} + - variable: targetPort + label: Target Port + description: The internal(!) port on the container the Application runs on + schema: + type: int + default: 6543 +# Include{serviceExpertRoot} + default: false +# Include{serviceExpert} +# Include{serviceList} +# 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: false + - 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: 0 + - variable: runAsGroup + label: runAsGroup + description: The groupID this App of the user running the application + schema: + type: int + default: 0 + - 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/webnut/templates/common.yaml b/charts/incubator/webnut/templates/common.yaml new file mode 100644 index 00000000000..c1a366e1cf0 --- /dev/null +++ b/charts/incubator/webnut/templates/common.yaml @@ -0,0 +1 @@ +{{ include "tc.common.loader.all" . }} diff --git a/charts/incubator/webnut/values.yaml b/charts/incubator/webnut/values.yaml new file mode 100644 index 00000000000..d9f470ba1c1 --- /dev/null +++ b/charts/incubator/webnut/values.yaml @@ -0,0 +1,31 @@ +image: + repository: tccr.io/truecharts/webnut + pullPolicy: IfNotPresent + tag: latest@sha256:5f57d70353cff11272786cc77d389991457a8e0b49a31701be5d921357f5078e + +securityContext: + runAsNonRoot: false + readOnlyRootFilesystem: false + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +secretEnv: + UPS_USER: monuser + UPS_PASSWORD: secret + +env: + UPS_HOST: "127.0.0.1" + UPS_PORT: 3493 + +service: + main: + ports: + main: + port: 10585 + protocol: HTTP + targetPort: 6543 + +portal: + enabled: true