From 67f70ee798ea7c53928ec48bb9fda834b5f7fd36 Mon Sep 17 00:00:00 2001 From: Jake Neyer Date: Thu, 8 Feb 2024 08:53:36 -0800 Subject: [PATCH] add support for v2 execution logging in kubernetes deployments (#110) --- helm/charts/polytomic/Chart.yaml | 2 +- helm/charts/polytomic/README.md | 3 ++- helm/charts/polytomic/templates/_helpers.tpl | 6 ++++-- helm/charts/polytomic/values.yaml | 2 ++ terraform/modules/gke-helm/main.tf | 2 ++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/helm/charts/polytomic/Chart.yaml b/helm/charts/polytomic/Chart.yaml index e4e166d..20cc7d0 100644 --- a/helm/charts/polytomic/Chart.yaml +++ b/helm/charts/polytomic/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.15 +version: 0.0.16 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/helm/charts/polytomic/README.md b/helm/charts/polytomic/README.md index c2aeb42..075a981 100644 --- a/helm/charts/polytomic/README.md +++ b/helm/charts/polytomic/README.md @@ -2,7 +2,7 @@ Polytomic helm chart for kubernetes -![Version: 0.0.15](https://img.shields.io/badge/Version-0.0.15-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) +![Version: 0.0.16](https://img.shields.io/badge/Version-0.0.16-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) ## Installing the Chart @@ -110,6 +110,7 @@ helm install helm/charts/polytomic polytomic | polytomic.hubspot_client_secret | string | `""` | | | polytomic.intercom_client_id | string | `""` | | | polytomic.intercom_client_secret | string | `""` | | +| polytomic.internal_execution_logs | bool | `false` | | | polytomic.linkedinads_client_id | string | `""` | | | polytomic.linkedinads_client_secret | string | `""` | | | polytomic.log_level | string | `"info"` | | diff --git a/helm/charts/polytomic/templates/_helpers.tpl b/helm/charts/polytomic/templates/_helpers.tpl index f6a5e1f..aa47e5e 100644 --- a/helm/charts/polytomic/templates/_helpers.tpl +++ b/helm/charts/polytomic/templates/_helpers.tpl @@ -124,8 +124,8 @@ POLYTOMIC_URL: {{ .Values.polytomic.auth.url | quote }} AUTH_METHODS: {{ join "," .Values.polytomic.auth.methods | quote }} GOOGLE_CLIENT_ID: {{ .Values.polytomic.auth.google_client_id | quote }} GOOGLE_CLIENT_SECRET: {{ .Values.polytomic.auth.google_client_secret | quote }} -EXECUTION_LOG_BUCKET: {{ .Values.polytomic.s3.log_bucket | quote }} -EXECUTION_LOG_REGION: {{ .Values.polytomic.s3.region| quote }} +EXECUTION_LOG_BUCKET: {{ .Values.polytomic.s3.record_log_bucket | quote }} +EXECUTION_LOG_REGION: {{ if .Values.polytomic.s3.gcs }}"gcs"{{- else }}{{ .Values.polytomic.s3.region | quote }}{{- end}} DEFAULT_OPERATIONAL_BUCKET: {{ .Values.polytomic.s3.operational_bucket }}{{- if .Values.polytomic.s3.region }}?region={{ .Values.polytomic.s3.region }}{{- end}} RECORD_LOG_BUCKET: {{ .Values.polytomic.s3.record_log_bucket | quote }} RECORD_LOG_REGION: {{ .Values.polytomic.s3.region | quote }} @@ -215,6 +215,8 @@ ZENDESK_CLIENT_ID: {{ .Values.polytomic.zendesk_client_id | quote }} ZENDESK_CLIENT_SECRET: {{ .Values.polytomic.zendesk_client_secret | quote }} hubspot_scopes_v2: "true" VERNEUIL_CONFIG: "{\"replication_spooling_dir\":\"/tmp/verneuil\",\"replication_targets\":[{\"s3\":{\"region\":\"{{ .Values.polytomic.s3.region }}\",\"chunk_bucket\":\"{{ .Values.polytomic.s3.operational_bucket }}/chunks\",\"manifest_bucket\":\"{{ .Values.polytomic.s3.operational_bucket }}/manifests\",\"create_buckets_on_demand\":false,\"domain_addressing\":false}}]}" +EXECUTION_LOGS_V2: {{ .Values.polytomic.internal_execution_logs | quote }} +INTERNAL_EXECUTION_LOGS: {{ .Values.polytomic.internal_execution_logs | quote }} {{- if .Values.polytomic.s3.gcs }} POLYTOMIC_USE_GCS: "true" diff --git a/helm/charts/polytomic/values.yaml b/helm/charts/polytomic/values.yaml index 365567b..6f4aee7 100644 --- a/helm/charts/polytomic/values.yaml +++ b/helm/charts/polytomic/values.yaml @@ -146,6 +146,8 @@ polytomic: size: 20Mi storage_class: "" + internal_execution_logs: false + # Integrations airtable_client_secret: "" asana_client_id: "" diff --git a/terraform/modules/gke-helm/main.tf b/terraform/modules/gke-helm/main.tf index 0c49c2d..a5dbafb 100644 --- a/terraform/modules/gke-helm/main.tf +++ b/terraform/modules/gke-helm/main.tf @@ -69,6 +69,8 @@ polytomic: jobs: image: ${var.polytomic_image} + internal_execution_logs: true + redis: enabled: false