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