Skip to content

Commit

Permalink
Merge pull request #476 from nats-io/fix/nats-surveyor-tls-ca-optional
Browse files Browse the repository at this point in the history
[surveyor helm] make TLS CA optional
  • Loading branch information
caleblloyd authored Mar 25, 2022
2 parents 01a7cba + cee619f commit fd5cd1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion helm/charts/surveyor/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ apiVersion: v2
name: surveyor
description: NATS Monitoring, Simplified.
type: application
version: 0.13.0
version: 0.13.1
appVersion: 0.2.2
2 changes: 2 additions & 0 deletions helm/charts/surveyor/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ data:
{
"name": "{{ .name }}",
{{- if .tls }}
{{- if .tls.ca }}
"tls_ca": "/etc/nats-certs/accounts/{{ .name }}/{{ .tls.ca }}",
{{- end }}
"tls_cert": "/etc/nats-certs/accounts/{{ .name }}/{{ .tls.cert }}",
"tls_key": "/etc/nats-certs/accounts/{{ .name }}/{{ .tls.key }}"
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions helm/charts/surveyor/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ spec:
{{- end }}

{{- with .tls }}
{{- if .ca }}
- -tlscacert=/etc/nats-certs/clients/{{ .ca }}
{{- end }}
- -tlskey=/etc/nats-certs/clients/{{ .key }}
- -tlscert=/etc/nats-certs/clients/{{ .cert }}
{{- end }}
Expand Down
8 changes: 4 additions & 4 deletions helm/charts/surveyor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ config:
# Expected number of servers
expectedServers: 1

# Required if auth is enabled.
# Required if NATS auth is enabled
# credentials:
# secret:
# name: nats-sys-creds
# key: sys.creds

# Required if tls is enabled.
# Required for NATS mutual TLS
# tls:
# secret:
# name: nats-client-tls
# ca: "ca.crt"
# ca: "ca.crt" # optional
# cert: "tls.crt"
# key: "tls.key"

Expand All @@ -99,6 +99,6 @@ config:
# tls:
# secret:
# name: test-user-tls
# ca: "ca.crt"
# ca: "ca.crt" # optional
# cert: "tls.crt"
# key: "tls.key"

0 comments on commit fd5cd1b

Please sign in to comment.