From 57b7c8eaf86ba4f753696d8f04e2f1a3e62591c7 Mon Sep 17 00:00:00 2001 From: kjeld Schouten-Lebbing Date: Sun, 4 Jul 2021 21:45:50 +0200 Subject: [PATCH] add nextcloud HPB features to SCALE itself --- charts/develop/nextcloud/Chart.yaml | 2 +- charts/develop/nextcloud/SCALE/ix_values.yaml | 26 +++ charts/develop/nextcloud/SCALE/questions.yaml | 218 ++++++++++++++++++ 3 files changed, 245 insertions(+), 1 deletion(-) diff --git a/charts/develop/nextcloud/Chart.yaml b/charts/develop/nextcloud/Chart.yaml index ae5730b7fed..1c0999cd234 100644 --- a/charts/develop/nextcloud/Chart.yaml +++ b/charts/develop/nextcloud/Chart.yaml @@ -35,4 +35,4 @@ sources: - https://github.com/nextcloud/docker - https://github.com/nextcloud/helm type: application -version: 1.0.21 +version: 1.1.0 diff --git a/charts/develop/nextcloud/SCALE/ix_values.yaml b/charts/develop/nextcloud/SCALE/ix_values.yaml index 24e7828181a..46d365cadd9 100644 --- a/charts/develop/nextcloud/SCALE/ix_values.yaml +++ b/charts/develop/nextcloud/SCALE/ix_values.yaml @@ -56,6 +56,32 @@ initContainers: name: dbcreds key: plainhost +additionalContainers: +- name: hpb + image: nextcloud:21.0.2 + imagePullPolicy: IfNotPresent + command: + - "/bin/bash" + - "-c" + - "--" + args: + - 'while [ ! -f "/var/www/html/custom_apps/notify_push/bin/x86_64/notify_push" ]; do sleep 30; echo "notify_push not found, waiting"; done && /var/www/html/custom_apps/notify_push/bin/x86_64/notify_push /var/www/html/config/config.php' + env: + - name: PORT + value: "7867" + envFrom: + - configMapRef: + name: hpbconfig + ports: + - name: hpb + containerPort: 7867 + volumeMounts: + - mountPath: /var/www/html + name: data + securityContext: + runAsUser: 33 + runAsGroup: 33 + # -- Probe configuration # -- [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) # @default -- See below diff --git a/charts/develop/nextcloud/SCALE/questions.yaml b/charts/develop/nextcloud/SCALE/questions.yaml index 89361a13e28..018c14cd361 100644 --- a/charts/develop/nextcloud/SCALE/questions.yaml +++ b/charts/develop/nextcloud/SCALE/questions.yaml @@ -266,6 +266,104 @@ questions: max: 65535 default: 36091 required: true + - variable: hpb + label: "High Performance Backend Service" + description: "The service which runs the High Performance Backend" + schema: + type: dict + attrs: + - variable: enabled + label: "Enable the service" + schema: + type: boolean + default: true + hidden: true + - variable: type + label: "Service Type" + description: "ClusterIP's are only internally available, nodePorts expose the container to the host node System, Loadbalancer exposes the service using the system loadbalancer" + schema: + type: string + default: "NodePort" + enum: + - value: "NodePort" + description: "NodePort" + - value: "ClusterIP" + description: "ClusterIP" + - value: "LoadBalancer" + description: "LoadBalancer" + - variable: loadBalancerIP + label: "LoadBalancer IP" + description: "LoadBalancerIP" + schema: + show_if: [["type", "=", "LoadBalancer"]] + type: string + default: "" + - variable: externalIPs + label: "External IP's" + description: "External IP's" + schema: + show_if: [["type", "=", "LoadBalancer"]] + type: list + default: [] + items: + - variable: externalIP + label: "External IP" + schema: + type: string + - variable: ports + label: "Service's Port(s) Configuration" + schema: + type: dict + attrs: + - variable: hpb + label: "Main Service Port Configuration" + schema: + type: dict + attrs: + - variable: enabled + label: "Enable the port" + schema: + type: boolean + default: true + hidden: true + - 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: port + label: "Container Port" + schema: + type: int + default: 7867 + editable: false + hidden: true + - variable: targetport + label: "Target Port" + description: "This port exposes the container port on the service" + schema: + type: int + default: 7867 + editable: true + required: true + - variable: nodePort + label: "Node Port (Optional)" + description: "This port gets exposed to the node. Only considered when service type is NodePort" + schema: + type: int + min: 9000 + max: 65535 + default: 36092 + required: true - variable: persistence label: "Integrated Persistent Storage" @@ -778,6 +876,126 @@ questions: default: "" required: true + - variable: hpb + label: "High Performance Backend Ingress" + schema: + type: dict + attrs: + - variable: enabled + label: "Enable Ingress" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hosts + label: "Hosts" + schema: + type: list + default: [] + items: + - variable: hostEntry + label: "Host" + schema: + type: dict + attrs: + - variable: host + label: "HostName" + schema: + type: string + default: "" + required: true + - variable: paths + label: "Paths" + schema: + type: list + default: [] + items: + - variable: pathEntry + label: "Host" + schema: + type: dict + attrs: + - variable: path + label: "path" + schema: + type: string + required: true + default: "/push" + - variable: pathType + label: "pathType" + schema: + type: string + required: true + default: "Prefix" + - variable: service + label: "Service" + schema: + type: dict + hidden: true + attrs: + - variable: name + label: "service name" + schema: + type: string + hidden: true + default: "{{ ( printf "%v-%v" .Release.Name "nextcloud-hpb" ) | quote }}" + - variable: port + label: "serviceport" + schema: + type: int + hidden: true + default: 7867 + - variable: tls + label: "TLS-Settings" + schema: + type: list + default: [] + items: + - variable: tlsEntry + label: "Host" + schema: + type: dict + attrs: + - variable: hosts + label: "Certificate Hosts" + schema: + type: list + default: [] + items: + - variable: host + label: "Host" + schema: + type: string + default: "" + required: true + - variable: scaleCert + label: "Select TrueNAS SCALE Certificate" + schema: + type: int + $ref: + - "definitions/certificate" + - variable: entrypoint + label: "Traefik Entrypoint" + description: "Entrypoint used by Traefik when using Traefik as Ingress Provider" + schema: + type: string + default: "websecure" + required: true + - variable: middlewares + label: "Traefik Middlewares" + description: "Add previously created Traefik Middlewares to this Ingress" + schema: + type: list + default: [] + items: + - variable: name + label: "Name" + schema: + type: string + default: "" + required: true + - variable: podSecurityContext group: "Security and Permissions" label: "Pod Security Context"