Skip to content

Cluster Authorization from Secret #833

Answered by caleblloyd
joelp172 asked this question in Q&A
Discussion options

You must be logged in to vote

It involves some templating. In NATS config, user/pass route auth has to be specified as part of the URL for cluster.routes:

A list of other servers (URLs) to cluster with. Self-routes are ignored. Should authentication via token or username/password be required, specify them as part of the URL.

I don't think NATS config can do string interpolation with variables to build those URLs. So they'd have to be built in Environment Variables. Try this:

config:
  cluster:
    enabled: true
    routeURLs:
      user: foo
      password: << $CLUSTER_AUTH >>
    merge:
      routes:
        $tplYaml: |
          {{- range $i, $_ := until (int $.Values.config.cluster.replicas) }}
          - << $RO…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@joelp172
Comment options

@caleblloyd
Comment options

Answer selected by joelp172
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants