diff --git a/retool/helm/retool/Chart.lock b/retool/helm/retool/Chart.lock index 5b255a42a..e70780948 100644 --- a/retool/helm/retool/Chart.lock +++ b/retool/helm/retool/Chart.lock @@ -4,6 +4,6 @@ dependencies: version: 0.1.5 - name: retool repository: https://charts.retool.com - version: 5.0.10 -digest: sha256:8254af8ff85a722613df60d3917966ebbc323578d31d97778544b005c5b15d71 -generated: "2023-08-29T12:22:50.026082-04:00" + version: 6.0.0 +digest: sha256:e9f0184bb0773073c0f1c8c6fb87edfd187534312cdd22e59bbc4bb99e869fda +generated: "2023-09-12T10:07:27.403885-04:00" diff --git a/retool/helm/retool/Chart.yaml b/retool/helm/retool/Chart.yaml index 20677c980..4620b2d20 100644 --- a/retool/helm/retool/Chart.yaml +++ b/retool/helm/retool/Chart.yaml @@ -2,12 +2,12 @@ apiVersion: v2 name: retool description: helm chart for retool type: application -version: 0.1.4 +version: 0.1.5 appVersion: "v3.4.14" dependencies: - name: postgres version: 0.1.5 repository: https://pluralsh.github.io/module-library - name: retool - version: 5.0.10 + version: 6.0.0 repository: https://charts.retool.com diff --git a/retool/helm/retool/charts/retool-5.0.10.tgz b/retool/helm/retool/charts/retool-5.0.10.tgz deleted file mode 100644 index d7608bb94..000000000 Binary files a/retool/helm/retool/charts/retool-5.0.10.tgz and /dev/null differ diff --git a/retool/helm/retool/charts/retool-6.0.0.tgz b/retool/helm/retool/charts/retool-6.0.0.tgz new file mode 100644 index 000000000..d256d07b9 Binary files /dev/null and b/retool/helm/retool/charts/retool-6.0.0.tgz differ diff --git a/retool/helm/retool/deps.yaml b/retool/helm/retool/deps.yaml index bf68745c0..ff75eab2a 100644 --- a/retool/helm/retool/deps.yaml +++ b/retool/helm/retool/deps.yaml @@ -10,18 +10,18 @@ spec: name: bootstrap repo: bootstrap version: '>= 0.5.1' - - type: helm name: ingress-nginx repo: ingress-nginx version: ">= 0.1.2" - - - type: helm name: postgres repo: postgres version: ">= 0.1.6" - + - type: helm + name: temporal + repo: temporal + version: ">= 0.0.1" - type: terraform name: aws repo: retool diff --git a/retool/helm/retool/templates/_helpers.tpl b/retool/helm/retool/templates/_helpers.tpl index 79baf74ff..c20481260 100644 --- a/retool/helm/retool/templates/_helpers.tpl +++ b/retool/helm/retool/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "retool.name" -}} +{{- define "retool-plural.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} @@ -10,7 +10,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "retool.fullname" -}} +{{- define "retool-plural.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "retool.chart" -}} +{{- define "retool-plural.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "retool.labels" -}} -helm.sh/chart: {{ include "retool.chart" . }} -{{ include "retool.selectorLabels" . }} +{{- define "retool-plural.labels" -}} +helm.sh/chart: {{ include "retool-plural.chart" . }} +{{ include "retool-plural.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "retool.selectorLabels" -}} -app.kubernetes.io/name: {{ include "retool.name" . }} +{{- define "retool-plural.selectorLabels" -}} +app.kubernetes.io/name: {{ include "retool-plural.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Create the name of the service account to use */}} -{{- define "retool.serviceAccountName" -}} +{{- define "retool-plural.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "retool.fullname" .) .Values.serviceAccount.name }} +{{- default (include "retool-plural.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} diff --git a/retool/helm/retool/templates/temporal-deployment.yaml b/retool/helm/retool/templates/temporal-deployment.yaml new file mode 100644 index 000000000..e795aedea --- /dev/null +++ b/retool/helm/retool/templates/temporal-deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: temporal-admintools + labels: + {{ include "retool-plural.labels" . | nindent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + app: tctl + {{ include "retool-plural.labels" . | nindent 6 }} + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: tctl + {{ include "retool-plural.labels" . | nindent 8 }} + spec: + containers: + - env: + - name: TEMPORAL_CLI_ADDRESS + value: "{{ .Values.retool.workflows.temporal.host }}.svc.cluster.local:{{ .Values.retool.workflows.temporal.port }}" + - name: TEMPORAL_ADDRESS + value: "{{ .Values.retool.workflows.temporal.host }}.svc.cluster.local:{{ .Values.retool.workflows.temporal.port }}" + image: temporalio/admin-tools:1.21.5 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - ls + - / + failureThreshold: 3 + initialDelaySeconds: 5 + periodSeconds: 5 + successThreshold: 1 + timeoutSeconds: 1 + name: admin-tools + resources: {} + terminationGracePeriodSeconds: 30 \ No newline at end of file diff --git a/retool/helm/retool/templates/temporal-job.yaml b/retool/helm/retool/templates/temporal-job.yaml new file mode 100644 index 000000000..1c32654da --- /dev/null +++ b/retool/helm/retool/templates/temporal-job.yaml @@ -0,0 +1,28 @@ +{{ if .Values.setupTemporal }} +apiVersion: batch/v1 +kind: Job +metadata: + name: temporal-setup + labels: + {{ include "retool-plural.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install,pre-upgrade +spec: + template: + spec: + containers: + - name: create-namespace + image: temporalio/admin-tools:1.21.5 + imagePullPolicy: Always + command: + - /bin/sh + - -c + - "until tctl cluster health &> /dev/null; do echo 'waiting for cluster' && sleep 1; done && tctl --namespace {{ .Values.retool.workflows.temporal.namespace }} namespace describe || tctl --namespace {{ .Values.retool.workflows.temporal.namespace }} namespace register" + env: + - name: TEMPORAL_CLI_ADDRESS + value: "{{ .Values.retool.workflows.temporal.host }}.svc.cluster.local:{{ .Values.retool.workflows.temporal.port }}" + - name: TEMPORAL_ADDRESS + value: "{{ .Values.retool.workflows.temporal.host }}.svc.cluster.local:{{ .Values.retool.workflows.temporal.port }}" + restartPolicy: Never + backoffLimit: 5 +{{ end }} \ No newline at end of file diff --git a/retool/helm/retool/values.yaml b/retool/helm/retool/values.yaml index d6c8afb52..b77bb50e6 100644 --- a/retool/helm/retool/values.yaml +++ b/retool/helm/retool/values.yaml @@ -10,12 +10,21 @@ postgres: ownerChart: retool infix: -postgres +setupTemporal: true + retool: replicaCount: 2 image: repository: tryretool/backend tag: 3.4.14 + + workflows: + temporal: + enabled: true + port: 7233 + namespace: retool + host: temporal-frontend.temporal postgresql: enabled: false diff --git a/retool/helm/retool/values.yaml.tpl b/retool/helm/retool/values.yaml.tpl index 6ac5d0d88..d611549a1 100644 --- a/retool/helm/retool/values.yaml.tpl +++ b/retool/helm/retool/values.yaml.tpl @@ -5,6 +5,9 @@ global: url: {{ .Values.hostname }} retool: + workflows: + temporal: + host: temporal-frontend.{{ namespace "temporal" }} config: licenseKey: {{ .Values.licenseKey }} encryptionKey: {{ dedupe . "retool.retool.config.encryptionKey" (randAlphaNum 26) }}