nats-io / k8s

NATS on Kubernetes with Helm Charts
Apache License 2.0
451 stars 304 forks source link

Allow annotation to be added to service via nats helm chart values.yaml #784

Closed ksingh-scogo closed 1 year ago

ksingh-scogo commented 1 year ago

It would be be great to allow addition of service level annotation some thing like this

############################################################
# service
############################################################
service:
  enabled: true
  merge:
    annotations:
    service.beta.kubernetes.io/azure-load-balancer-resource-group: YourRGNameHere
    spec:
      type: LoadBalancer
      loadBalancerIP: "xx.xx.xx.xx"

User case : While setting up Nats on public clouds and exposing it using LoadBalancer, it make sense to have a fix public IP. Cloud providers allows to reserve Public IP and later attach these IP to loadbalancers via kubernetes service by specifying correct annotations and LoadBalanerIP field

Currently Nats K8s helm chart supports adding loadBalancerIP however it does not supports adding service level annotation

Work around :

caleblloyd commented 1 year ago

use service.merge.metadata.annotations