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年前293ビュー
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ