From 0d9a71a86e2aec0da51338fe8fbb0a6922f10fa9 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 29 May 2022 18:37:22 +0300 Subject: [PATCH] feat(commento-plusplus): Add commento-plusplus (#2780) * feat(commento-plusplus): Add commento-plusplus * nossl pg * nossl pg * add mroe envs * dont pre-set them --- charts/incubator/commento-plusplus/Chart.yaml | 30 ++ .../commento-plusplus/questions.yaml | 335 ++++++++++++++++++ .../commento-plusplus/templates/common.yaml | 1 + .../incubator/commento-plusplus/values.yaml | 31 ++ 4 files changed, 397 insertions(+) create mode 100644 charts/incubator/commento-plusplus/Chart.yaml create mode 100644 charts/incubator/commento-plusplus/questions.yaml create mode 100644 charts/incubator/commento-plusplus/templates/common.yaml create mode 100644 charts/incubator/commento-plusplus/values.yaml diff --git a/charts/incubator/commento-plusplus/Chart.yaml b/charts/incubator/commento-plusplus/Chart.yaml new file mode 100644 index 00000000000..bf15e2496dc --- /dev/null +++ b/charts/incubator/commento-plusplus/Chart.yaml @@ -0,0 +1,30 @@ +apiVersion: v2 +appVersion: "10.6.2" +dependencies: +- name: common + repository: https://library-charts.truecharts.org + version: 9.3.19 +- condition: postgresql.enabled + name: postgresql + repository: https://charts.truecharts.org/ + version: 7.0.79 +description: Commento++ is a free, open source, fast & lightweight comments box that you can embed in your static website instead of Disqus. +home: https://github.com/truecharts/apps/tree/master/charts/stable/commento-plusplus +icon: https://truecharts.org/_static/img/appicons/commento-plusplus.png +keywords: +- commento +kubeVersion: '>=1.16.0-0' +maintainers: +- email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: commento-plusplus +sources: +- https://github.com/souramoo/commentoplusplus +- https://hub.docker.com/r/caroga/commentoplusplus +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - media + truecharts.org/SCALE-support: "true" + truecharts.org/grade: U diff --git a/charts/incubator/commento-plusplus/questions.yaml b/charts/incubator/commento-plusplus/questions.yaml new file mode 100644 index 00000000000..a231f1371cb --- /dev/null +++ b/charts/incubator/commento-plusplus/questions.yaml @@ -0,0 +1,335 @@ +# 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} + - variable: env + group: "Container Configuration" + label: "Image Environment" + schema: + additional_attrs: true + type: dict + attrs: + - variable: COMMENTO_ORIGIN + label: "COMMENTO_ORIGIN" + description: "This should be set to the subdomain or the IP address hosting Commento. All API requests will go to this server. This may include subdirectories if Commento is hosted behind a reverse proxy, for example. Include the protocol in the value to use HTTP/HTTPS." + schema: + type: string + default: "" + - variable: COMMENTO_FORBID_NEW_OWNERS + label: "COMMENTO_FORBID_NEW_OWNERS" + description: "Used to disable new dashboard registrations. Useful if you are the only person using Commento on your server. Does not impact the creation of accounts for your readers." + schema: + type: boolean + default: false + - variable: COMMENTO_GZIP_STATIC + label: "COMMENTO_GZIP_STATIC" + schema: + type: boolean + default: true + - variable: COMMENTO_ENABLE_WILDCARDS + label: "COMMENTO_ENABLE_WILDCARDS" + description: "Allows use of wildcards in domain names in the admin dashboard. (e.g. if you share your commento instance with more than one admin/allow new registrations)" + schema: + type: boolean + default: true + - variable: COMMENTO_ENABLE_LOGGING + label: "COMMENTO_ENABLE_LOGGING" + description: "Should we log every page view? This will allow you to see stats but will fill up your free postgres database quite quickly." + schema: + type: boolean + default: false + - variable: smpt_config + label: "Enable SMTP" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: SMTP_SKIP_HOST_VERIFY + label: "SMTP_SKIP_HOST_VERIFY" + description: "Allows skipping of host verification for SMTP email sending." + schema: + type: boolean + default: false + - variable: COMMENTO_SMTP_USERNAME + label: "COMMENTO_SMTP_USERNAME" + description: "SMTP credentials and configuration the server should use to send emails." + schema: + type: string + default: "" + - variable: COMMENTO_SMTP_PASSWORD + label: "COMMENTO_SMTP_PASSWORD" + description: "SMTP credentials and configuration the server should use to send emails." + schema: + type: string + private: true + default: "" + - variable: COMMENTO_SMTP_HOST + label: "COMMENTO_SMTP_HOST" + description: "SMTP credentials and configuration the server should use to send emails." + schema: + type: string + default: "" + - variable: COMMENTO_SMTP_FROM_ADDRESS + label: "COMMENTO_SMTP_FROM_ADDRESS" + description: "SMTP credentials and configuration the server should use to send emails." + schema: + type: string + default: "" + - variable: COMMENTO_SMTP_PORT + label: "COMMENTO_SMTP_PORT" + description: "SMTP credentials and configuration the server should use to send emails." + schema: + type: int + default: 587 +# 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: 10240 + 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: 10240 + + - 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} + +# 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/commento-plusplus/templates/common.yaml b/charts/incubator/commento-plusplus/templates/common.yaml new file mode 100644 index 00000000000..a6613c2ce21 --- /dev/null +++ b/charts/incubator/commento-plusplus/templates/common.yaml @@ -0,0 +1 @@ +{{ include "common.all" . }} diff --git a/charts/incubator/commento-plusplus/values.yaml b/charts/incubator/commento-plusplus/values.yaml new file mode 100644 index 00000000000..e1f90c25ec7 --- /dev/null +++ b/charts/incubator/commento-plusplus/values.yaml @@ -0,0 +1,31 @@ +image: + repository: caroga/commentoplusplus + tag: v1.8.7@sha256:ccbc099c69700a6f973e5fd583520f8ff3293c5742d179cf3517eec49ee84f4b + pullPolicy: IfNotPresent + +env: + COMMENTO_PORT: "{{ .Values.service.main.ports.main.port }}" + # User Defined + COMMENTO_FORBID_NEW_OWNERS: false + COMMENTO_GZIP_STATIC: true + COMMENTO_ORIGIN: "http://localhost:8080" + COMMENTO_ENABLE_WILDCARDS: true + COMMENTO_ENABLE_LOGGING: false + +envValueFrom: + COMMENTO_POSTGRES: + secretKeyRef: + name: dbcreds + key: urlnossl + +service: + main: + ports: + main: + port: 10240 + +postgresql: + enabled: true + existingSecret: "dbcreds" + postgresqlUsername: comment-plusplus + postgresqlDatabase: comment-plusplus