diff --git a/charts/incubator/gravity/.helmignore b/charts/incubator/gravity/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/gravity/.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/gravity/CHANGELOG.md b/charts/incubator/gravity/CHANGELOG.md new file mode 100644 index 00000000000..825c32f0d03 --- /dev/null +++ b/charts/incubator/gravity/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/charts/incubator/gravity/Chart.yaml b/charts/incubator/gravity/Chart.yaml new file mode 100644 index 00000000000..a6506bbe5b1 --- /dev/null +++ b/charts/incubator/gravity/Chart.yaml @@ -0,0 +1,30 @@ +apiVersion: v2 +appVersion: "0.6.8" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 12.14.6 +deprecated: false +description: Fully-replicated DNS and DHCP Server with ad-blocking powered by etcd. +home: https://truecharts.org/charts/incubator/gravity +icon: https://truecharts.org/img/hotlink-ok/chart-icons/gravity.png +keywords: + - gravity + - dns + - networking +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: gravity +sources: + - https://github.com/truecharts/charts/tree/master/charts/incubator/gravity + - https://github.com/BeryJu/gravity +type: application +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - dns + - networking + truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/gravity/README.md b/charts/incubator/gravity/README.md new file mode 100644 index 00000000000..7e59600739c --- /dev/null +++ b/charts/incubator/gravity/README.md @@ -0,0 +1 @@ +# README diff --git a/charts/incubator/gravity/logo.png b/charts/incubator/gravity/logo.png new file mode 100644 index 00000000000..fc3bfe5cace Binary files /dev/null and b/charts/incubator/gravity/logo.png differ diff --git a/charts/incubator/gravity/questions.yaml b/charts/incubator/gravity/questions.yaml new file mode 100644 index 00000000000..4ef0d367d7c --- /dev/null +++ b/charts/incubator/gravity/questions.yaml @@ -0,0 +1,171 @@ +# Include{groups} +portals: + open: +# Include{portalLink} +questions: +# Include{global} +# Include{workload} +# Include{workloadDeployment} + +# Include{replicas1} +# Include{podSpec} +# Include{containerMain} + + - variable: env + group: App Configuration + label: Image Environment + schema: + additional_attrs: true + type: dict + attrs: + - variable: INSTANCE_IP + label: "Instance IP" + description: "This instance reachable IP" + schema: + type: string + $ref: + - definitions/nodeIP + - variable: ADMIN_PASSWORD + label: "Admin password" + description: "Optionally set a default password for the admin user." + schema: + type: string + private: true + default: "" + - variable: INSTANCE_IDENTIFIER + label: "Instance identifier" + description: "Unique identifier of an instance." + schema: + type: string + default: "" + - variable: BOOTSTRAP_ROLES + label: "BootStrap Roles" + description: "Configure which roles this instance should bootstrap." + schema: + type: string + default: "dns;api;etcd;discovery;backup;monitoring;tsdb" + - variable: INSTANCE_LISTEN + label: "Instance Listen" + description: "Override the default instance will listen on" + schema: + type: string + default: "" + +# Include{containerBasic} +# Include{containerAdvanced} + +# 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: 8008 + required: true + - variable: dns + label: DNS Service + description: The DNS service. + schema: + additional_attrs: true + type: dict + attrs: +# Include{serviceSelectorLoadBalancer} +# Include{serviceSelectorExtras} + - variable: dns-tcp + label: DNS 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: 53 + required: true + - variable: dns-udp + label: DNS 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: 53 + required: true +# Include{serviceExpertRoot} +# 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{persistenceList} +# Include{ingressRoot} + - variable: main + label: "Main Ingress" + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} +# Include{ingressTLS} +# Include{ingressTraefik} +# Include{ingressAdvanced} +# Include{ingressList} +# Include{securityContextRoot} + + - 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 +# Include{securityContextContainer} +# Include{securityContextAdvanced} +# Include{securityContextPod} + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 + +# Include{resources} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/gravity/templates/NOTES.txt b/charts/incubator/gravity/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/gravity/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/gravity/templates/_secrets.tpl b/charts/incubator/gravity/templates/_secrets.tpl new file mode 100644 index 00000000000..78f4bbe04d8 --- /dev/null +++ b/charts/incubator/gravity/templates/_secrets.tpl @@ -0,0 +1,14 @@ +{{/* Define the secrets */}} +{{- define "gravity.secret" -}} +{{- $secretName := (printf "%s-gravity-secret" (include "tc.v1.common.lib.chart.names.fullname" $)) -}} + +{{- $token := randAlphaNum 32 -}} +{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) -}} + {{- $token = index .data "ADMIN_TOKEN" | b64dec -}} +{{- end }} + +gravity-secret: + enabled: true + data: + ADMIN_TOKEN: {{ $token }} +{{- end -}} diff --git a/charts/incubator/gravity/templates/common.yaml b/charts/incubator/gravity/templates/common.yaml new file mode 100644 index 00000000000..7dc652a1911 --- /dev/null +++ b/charts/incubator/gravity/templates/common.yaml @@ -0,0 +1,11 @@ +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . }} + +{{- $secret := include "gravity.secret" . | fromYaml -}} +{{- if $secret -}} + {{ $secret := (mustMergeOverwrite .Values.secret $secret) }} + {{- $_ := set .Values "secret" $secret -}} +{{- end -}} + +{{/* Render the templates */}} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/gravity/values.yaml b/charts/incubator/gravity/values.yaml new file mode 100644 index 00000000000..b705bfadb28 --- /dev/null +++ b/charts/incubator/gravity/values.yaml @@ -0,0 +1,54 @@ +image: + repository: tccr.io/truecharts/gravity + pullPolicy: IfNotPresent + tag: v0.6.8@sha256:290b9e12ffbd412e02803fc11c61de1731b69dd761e4c1af39b7b0d863bc5261 + +securityContext: + container: + runAsUser: 0 + runAsGroup: 0 + +service: + main: + ports: + main: + protocol: http + targetPort: 8008 + port: 8008 + dns: + enabled: true + ports: + dns-tcp: + enabled: true + targetPort: 53 + port: 53 + dns-udp: + enabled: true + protocol: udp + targetPort: 53 + port: 53 + +workload: + main: + podSpec: + containers: + main: + env: + INSTANCE_IP: "127.0.0.1" + ADMIN_PASSWORD: "password" + INSTANCE_IDENTIFIER: "truecharts-dns-gravity" + BOOTSTRAP_ROLES: "dns;api;etcd;discovery;backup;monitoring;tsdb" + ADMIN_TOKEN: + secretKeyRef: + name: gravity-secret + key: ADMIN_TOKEN + INSTANCE_LISTEN: "0.0.0.0" + +persistence: + data: + enabled: true + mountPath: "/data" + +portal: + open: + enabled: true