Skip to content

Commit

Permalink
Merge branch 'release/v0.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyqs committed Apr 3, 2020
2 parents e32ff6e + 8041dd1 commit 64952ac
Show file tree
Hide file tree
Showing 8 changed files with 369 additions and 5 deletions.
68 changes: 68 additions & 0 deletions helm/charts/index.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
apiVersion: v1
entries:
nats:
- apiVersion: v2
appVersion: 2.1.6
created: "2020-04-03T08:25:32.302616-07:00"
description: A Helm chart for the NATS.io High Speed Cloud Native Distributed
Communications Technology.
digest: 633b48eb980b00659579739ff6b32c7576c7ecc339533b92d70a062ea4c85961
home: http://github.com/nats-io/k8s
icon: https://nats.io/img/logo.png
keywords:
- nats
- messaging
- cncf
maintainers:
- email: [email protected]
name: Waldemar Quevedo
- email: [email protected]
name: Colin Sullivan
name: nats
urls:
- https://github.com/nats-io/k8s/releases/download/v0.3.2/nats-0.3.2.tgz
version: 0.3.2
- apiVersion: v2
appVersion: 2.1.6
created: "2020-04-02T21:20:08.662671-07:00"
Expand Down Expand Up @@ -63,6 +84,31 @@ entries:
- https://github.com/nats-io/k8s/releases/download/v0.2.0/nats-0.2.0.tgz
version: 0.2.0
stan:
- apiVersion: v2
appVersion: 0.17.0
created: "2020-04-03T08:25:32.310714-07:00"
description: A Helm chart for NATS Streaming
digest: 341236096cbef84987ce68373d27a3ec020fa5d4c5d5e3883dd40a65c30c9cab
icon: https://nats.io/img/logo.png
keywords:
- nats
- streaming
- stan
- delivery
- ratelimit
- replay
- statefulset
- cncf
maintainers:
- email: [email protected]
name: Waldemar Quevedo
- email: [email protected]
name: Colin Sullivan
- name: rchenzheng
name: stan
urls:
- https://github.com/nats-io/k8s/releases/download/v0.3.2/stan-0.3.2.tgz
version: 0.3.2
- apiVersion: v2
appVersion: 0.17.0
created: "2020-04-02T21:22:25.946345-07:00"
Expand Down Expand Up @@ -137,6 +183,28 @@ entries:
- https://github.com/nats-io/k8s/releases/download/v0.2.0/stan-0.2.0.tgz
version: 0.2.0
nats-account-server:
- apiVersion: v2
appVersion: 0.8.6
created: "2020-04-03T08:25:32.304898-07:00"
description: A Helm chart for the NATS.io JWT Account Server
digest: cc47d5cdca9247d7d13c1a8fc239b630b62b7015c2255ef46797953bd67170e6
home: http://github.com/nats-io/k8s
icon: https://nats.io/img/logo.png
keywords:
- nats
- messaging
- cncf
- jwt
- auth
maintainers:
- email: [email protected]
name: Waldemar Quevedo
- email: [email protected]
name: Colin Sullivan
name: nats-account-server
urls:
- https://github.com/nats-io/k8s/releases/download/v0.3.2/nats-account-server-0.3.2.tgz
version: 0.3.2
- apiVersion: v2
appVersion: 0.8.6
created: "2020-04-02T21:57:47.563808-07:00"
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/nats-account-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords:
- cncf
- jwt
- auth
version: 0.3.0
version: 0.3.2
home: http://github.com/nats-io/k8s
maintainers:
- name: Waldemar Quevedo
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/nats/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- nats
- messaging
- cncf
version: 0.3.0
version: 0.3.2
home: http://github.com/nats-io/k8s
maintainers:
- name: Waldemar Quevedo
Expand Down
157 changes: 156 additions & 1 deletion helm/charts/nats/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,50 @@ data:
http: 8222
server_name: $POD_NAME
{{- if .Values.nats.tls }}
#####################
# #
# TLS Configuration #
# #
#####################
{{- with .Values.nats.tls }}
{{ $secretName := .secret.name }}
tls {
{{- with .cert }}
cert_file: /etc/nats-certs/clients/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .key }}
key_file: /etc/nats-certs/clients/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .ca }}
ca_file: /etc/nats-certs/clients/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .insecure }}
insecure: {{ . }}
{{- end }}
{{- with .verify }}
verify: {{ . }}
{{- end }}
{{- with .verifyAndMap }}
verify_and_map: {{ . }}
{{- end }}
{{- with .curvePreferences }}
curve_preferences: {{ . }}
{{- end }}
{{- with .timeout }}
timeout: {{ . }}
{{- end }}
}
{{- end }}
{{- end }}
{{ if .Values.cluster.enabled }}
###################################
# #
Expand All @@ -28,6 +72,43 @@ data:
cluster {
port: 6222
{{- with .Values.cluster.tls }}
{{ $secretName := .secret.name }}
tls {
{{- with .cert }}
cert_file: /etc/nats-certs/cluster/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .key }}
key_file: /etc/nats-certs/cluster/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .ca }}
ca_file: /etc/nats-certs/cluster/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .insecure }}
insecure: {{ . }}
{{- end }}
{{- with .verify }}
verify: {{ . }}
{{- end }}
{{- with .verifyAndMap }}
verify_and_map: {{ . }}
{{- end }}
{{- with .curvePreferences }}
curve_preferences: {{ . }}
{{- end }}
{{- with .timeout }}
timeout: {{ . }}
{{- end }}
}
{{- end }}
routes = [
{{ template "nats.clusterRoutes" . }}
]
Expand All @@ -52,7 +133,44 @@ data:
{{ if and .Values.nats.advertise .Values.nats.externalAccess }}
include "advertise/gateway_advertise.conf"
{{ end }}
{{- with .Values.leafnodes.tls }}
{{ $secretName := .secret.name }}
tls {
{{- with .cert }}
cert_file: /etc/nats-certs/leafnodes/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .key }}
key_file: /etc/nats-certs/leafnodes/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .ca }}
ca_file: /etc/nats-certs/leafnodes/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .insecure }}
insecure: {{ . }}
{{- end }}
{{- with .verify }}
verify: {{ . }}
{{- end }}
{{- with .verifyAndMap }}
verify_and_map: {{ . }}
{{- end }}
{{- with .curvePreferences }}
curve_preferences: {{ . }}
{{- end }}
{{- with .timeout }}
timeout: {{ . }}
{{- end }}
}
{{- end }}
remotes: [
{{- range .Values.leafnodes.remotes }}
{
Expand Down Expand Up @@ -83,6 +201,43 @@ data:
include "advertise/gateway_advertise.conf"
{{ end }}
{{- with .Values.gateway.tls }}
{{ $secretName := .secret.name }}
tls {
{{- with .cert }}
cert_file: /etc/nats-certs/gateways/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .key }}
key_file: /etc/nats-certs/gateways/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .ca }}
ca_file: /etc/nats-certs/gateways/{{ $secretName }}/{{ . }}
{{- end }}
{{- with .insecure }}
insecure: {{ . }}
{{- end }}
{{- with .verify }}
verify: {{ . }}
{{- end }}
{{- with .verifyAndMap }}
verify_and_map: {{ . }}
{{- end }}
{{- with .curvePreferences }}
curve_preferences: {{ . }}
{{- end }}
{{- with .timeout }}
timeout: {{ . }}
{{- end }}
}
{{- end }}
# Gateways array here
gateways: [
{{- range .Values.gateway.gateways }}
Expand Down
26 changes: 26 additions & 0 deletions helm/charts/nats/templates/nats-box.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ spec:
secret:
secretName: {{ .Values.natsbox.credentials.secret.name }}
{{- end }}
{{- with .Values.nats.tls }}
{{ $secretName := .secret.name }}
- name: {{ $secretName }}-clients-volume
secret:
secretName: {{ $secretName }}
{{- end }}

containers:
- name: nats-box
Expand All @@ -28,6 +34,16 @@ spec:
- name: USER2_CREDS
value: /etc/nats-config/creds/{{ .Values.natsbox.credentials.secret.key }}
{{- end }}
{{- with .Values.nats.tls }}
{{ $secretName := .secret.name }}
lifecycle:
postStart:
exec:
command:
- /bin/sh
- -c
- cp /etc/nats-certs/clients/{{ $secretName }}/* /usr/local/share/ca-certificates && update-ca-certificates
{{- end }}
command:
- "tail"
- "-f"
Expand All @@ -37,4 +53,14 @@ spec:
- name: nats-sys-creds
mountPath: /etc/nats-config/creds
{{- end }}
#######################
# #
# TLS Volumes Mounts #
# #
#######################
{{- with .Values.nats.tls }}
{{ $secretName := .secret.name }}
- name: {{ $secretName }}-clients-volume
mountPath: /etc/nats-certs/clients/{{ $secretName }}
{{- end }}
{{- end }}
Loading

0 comments on commit 64952ac

Please sign in to comment.