How to configure service.annotations in official helm chart

Hi, I am planning to add a source IP firewall rule to my sonarqube load balancer service. According to the values.yaml file, under service under annotations I can set loadBalancerSourceRanges to any CIDR block or range or IP. My question is, what’s the syntax for defining this loadBalancerSourceRanges if I want to use it in kubernetes yaml or terraform??

I tried

set {
name = “service.annotations”
value = <<EOF
{
loadBalancerSourceRanges:
- 0.0.0.0/0
}
EOF
}

in terraform but that didn’t seem to work

Hi @zacktzeng ,

not sure about the terraform notation but you can define annotations to the service here with something like this:

service:
  type: ClusterIP
  externalPort: 9000
  internalPort: 9000
  labels:
  annotations: 
    imageregistry: "https://hub.docker.com/"

hope that helps