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
posta un anno fa293 visualizzazioni
2 Risposte
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
con risposta un anno fa
0

Try this

      ValueYaml: !Sub |
        service:
          extraService: |
            HTTP_PORT    2020
profile picture
ESPERTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande