Adding or passing custom value to Helm chart addon on EKS cluster Via Cloud Formation

0

Team I Building a cloudformation stack in which we are creating AWS-EKS cluster and post creation of EKS cluster by using "Custom::Helm" resource type we are deploying Fluentbit in the cluster.

AWSTemplateFormatVersion: "2010-09-09"
Parameters:
  pEKSClusterName:
    Description: Name of the EKS Cluster
    Type: String
    Default: EKSCluster
  VPCID:
    Description: VPC ID
    Type: AWS::EC2::VPC::Id
    AllowedPattern: ".+"   
Resources: 
  fluentbitagent:
    Type: "AWSQS::Kubernetes::Helm"
    Properties:
      TimeOut: 10
      ClusterID: !Ref pEKSClusterName
      Name: fluent-bit
      Namespace: aws-cloudwatch
      Repository: https://aws.github.io/eks-charts
      Chart: eks/aws-for-fluent-bit
      Values:
        image.repository: !FindInMap [RegionMap, !Ref "AWS::Region", cwrepo]
      ValueYaml:
        !Sub
        - |
          clusterName: ${ClusterName}
          serviceAccount:
            create: false
            name: aws-logs
          region: ${AWS::Region}
          vpcId: ${VPCID}
        - ClusterName: !Ref pEKSClusterName
          VPCID: !Ref VPCID          
Mappings:
  RegionMap:
    us-east-1:
      cwrepo: public.ecr.aws/aws-observability/aws-for-fluent-bit

I wanted to pass custom value to helm values for Fluentbit, for example i wanted to pass FluentBitHttpPort='2020', TIA:-)

AWS
已提問 1 年前檢視次數 300 次
2 個答案
0

You can pass custom values to the Helm chart by adding them to the "Values" property in the "fluentbitagent" resource. For example, you can add the following line under the "Values" property:

Values: ... FluentBitHttpPort: 2020

This will pass the value "2020" for the "FluentBitHttpPort" parameter in the Helm chart. Make sure the parameter is defined in the chart's values.yaml file, otherwise it will not take effect.

profile picture
已回答 1 年前
0

Try this

      ValueYaml: !Sub |
        service:
          extraService: |
            HTTP_PORT    2020
profile picture
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南