From 5a2ed9e9266e8bc216194bcbafef8b6240a04863 Mon Sep 17 00:00:00 2001 From: Varun Nuthalapati Date: Sat, 18 Apr 2026 11:00:39 -0700 Subject: [PATCH] fix(helm): add cloudwatch region and logGroup fields to flyte-binary chart The flyte-binary chart only supported cloudwatch-template-uri for CloudWatch log configuration, requiring users to embed the region and log group directly in a URL template string. When users deployed the eks example files without replacing the and placeholders, these literal strings appeared URL-encoded in the Flyte UI CloudWatch links. Add dedicated cloudwatch.region and cloudwatch.logGroup fields to the chart, mirroring the configuration surface already available in flyte-core. When these fields are set, the chart emits cloudwatch-region and cloudwatch-log-group config keys. The existing templateUri field is preserved for full backward compatibility and takes precedence when set. Update eks-production.yaml and eks-starter.yaml to use the new fields. Closes #7065 Signed-off-by: Varun Nuthalapati --- charts/flyte-binary/eks-production.yaml | 6 +++--- charts/flyte-binary/eks-starter.yaml | 6 +++--- charts/flyte-binary/templates/_helpers.tpl | 7 ++++++- charts/flyte-binary/values.yaml | 9 +++++++++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/charts/flyte-binary/eks-production.yaml b/charts/flyte-binary/eks-production.yaml index 8fae658dadb..30f347e30d4 100644 --- a/charts/flyte-binary/eks-production.yaml +++ b/charts/flyte-binary/eks-production.yaml @@ -13,15 +13,15 @@ configuration: s3: region: "" authType: "iam" - #For logging to work, you need to setup an agent. + #For logging to work, you need to setup an agent. # Learn more: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-EKS-logs.html logging: level: 5 plugins: cloudwatch: enabled: true - templateUri: |- - https://console.aws.amazon.com/cloudwatch/home?region=#logEventViewer:group=/aws/eks//cluster;stream=var.log.containers.{{ .podName }}_{{ .namespace }}_{{ .containerName }}-{{ .containerId }}.log + region: "" # replace with your AWS region, e.g. us-east-1 + logGroup: "/aws/eks//cluster" # replace with your cluster name # To configure auth, refer to https://docs.flyte.org/en/latest/deployment/configuration/auth_setup.html auth: enabled: false diff --git a/charts/flyte-binary/eks-starter.yaml b/charts/flyte-binary/eks-starter.yaml index 8c0e47dd2eb..c1cae1b9b85 100644 --- a/charts/flyte-binary/eks-starter.yaml +++ b/charts/flyte-binary/eks-starter.yaml @@ -13,15 +13,15 @@ configuration: s3: region: "" authType: "iam" - #For logging to work, you need to setup an agent. + #For logging to work, you need to setup an agent. # Learn more: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-EKS-logs.html logging: level: 5 plugins: cloudwatch: enabled: true - templateUri: |- - https://console.aws.amazon.com/cloudwatch/home?region=#logEventViewer:group=/aws/eks//cluster;stream=var.log.containers.{{ .podName }}_{{ .namespace }}_{{ .containerName }}-{{ .containerId }}.log + region: "" # replace with your AWS region, e.g. us-east-1 + logGroup: "/aws/eks//cluster" # replace with your cluster name # To configure auth, refer to https://docs.flyte.org/en/latest/deployment/configuration/auth_setup.html auth: enabled: false diff --git a/charts/flyte-binary/templates/_helpers.tpl b/charts/flyte-binary/templates/_helpers.tpl index d8db977f429..ef843513a20 100644 --- a/charts/flyte-binary/templates/_helpers.tpl +++ b/charts/flyte-binary/templates/_helpers.tpl @@ -115,7 +115,12 @@ kubernetes-template-uri: {{ required "Template URI required for Kubernetes loggi {{- end }} cloudwatch-enabled: {{ .cloudwatch.enabled }} {{- if .cloudwatch.enabled }} -cloudwatch-template-uri: {{ required "Template URI required for CloudWatch logging plugin" .cloudwatch.templateUri }} +{{- if .cloudwatch.templateUri }} +cloudwatch-template-uri: {{ .cloudwatch.templateUri }} +{{- else }} +cloudwatch-region: {{ required "Either cloudwatch.templateUri or cloudwatch.region is required when CloudWatch logging is enabled" .cloudwatch.region }} +cloudwatch-log-group: {{ required "cloudwatch.logGroup is required when cloudwatch.region is set" .cloudwatch.logGroup }} +{{- end }} {{- end }} stackdriver-enabled: {{ .stackdriver.enabled }} {{- if .stackdriver.enabled }} diff --git a/charts/flyte-binary/values.yaml b/charts/flyte-binary/values.yaml index 8d8bc43e173..ccf6b1f0bbb 100644 --- a/charts/flyte-binary/values.yaml +++ b/charts/flyte-binary/values.yaml @@ -112,7 +112,16 @@ configuration: # cloudwatch Configure logging plugin to have logs visible in CloudWatch cloudwatch: enabled: false + # templateUri Provide a fully custom CloudWatch URL template. Supports Go template variables + # such as {{ .podName }}, {{ .namespace }}, {{ .containerName }}, {{ .containerId }}. + # When set, takes precedence over region and logGroup. templateUri: "" + # region AWS region where CloudWatch logs are stored (e.g. us-east-1). + # Used to construct the CloudWatch URL when templateUri is not set. + region: "" + # logGroup CloudWatch log group name (e.g. /aws/eks/my-cluster/cluster). + # Used to construct the CloudWatch URL when templateUri is not set. + logGroup: "" # stackdriver Configure logging plugin to have logs visible in StackDriver stackdriver: enabled: false