Skip to content

Commit 46a519d

Browse files
committed
add password for nats
1 parent bfbde07 commit 46a519d

8 files changed

Lines changed: 31 additions & 19 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
4-
hooks:
5-
- id: end-of-file-fixer
6-
- id: trailing-whitespace
7-
- id: mixed-line-ending
8-
args: [--fix=lf]
9-
- id: check-yaml
10-
exclude: '^.*templates/.*\.yaml$'
11-
args: [--unsafe]
12-
- repo: https://github.com/igorshubovych/markdownlint-cli
13-
rev: v0.42.0
14-
hooks:
15-
- id: markdownlint
16-
args: [--fix, --disable, MD013, MD041, --]
172
- repo: local
183
hooks:
194
- id: gen-versions-map

‎packages/apps/nats/Chart.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type: application
1616
# This is the chart version. This version number should be incremented each time you make changes
1717
# to the chart and its templates, including the app version.
1818
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19-
version: 0.2.0
19+
version: 0.3.0
2020

2121
# This is the version number of the application being deployed. This version number should be
2222
# incremented each time you make changes to the application. Versions are not expected to

‎packages/apps/nats/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
| `external` | Enable external access from outside the cluster | `false` |
1010
| `replicas` | Persistent Volume size for NATS | `2` |
1111
| `storageClass` | StorageClass used to store the data | `""` |
12-
12+
| `username` | Nats username, if empty no auth | `""` |
13+
| `password` | Nats password, if empty no auth | `""` |

‎packages/apps/nats/templates/nats.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ spec:
1818
nats:
1919
fullnameOverride: {{ .Release.Name }}
2020
config:
21+
{{- if and .Values.username .Values.password }}
22+
merge:
23+
accounts:
24+
A:
25+
users:
26+
- {user: "{{ .Values.username }}", password: "{{ .Values.password }}"}
27+
{{- end }}
2128
cluster:
2229
enabled: true
2330
replicas: {{ .Values.replicas }}

‎packages/apps/nats/values.schema.json‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
"type": "string",
1717
"description": "StorageClass used to store the data",
1818
"default": ""
19+
},
20+
"username": {
21+
"type": "string",
22+
"description": "Nats username, if empty no auth",
23+
"default": ""
24+
},
25+
"password": {
26+
"type": "string",
27+
"description": "Nats password, if empty no auth",
28+
"default": ""
1929
}
2030
}
21-
}
31+
}

‎packages/apps/nats/values.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
## @param external Enable external access from outside the cluster
55
## @param replicas Persistent Volume size for NATS
66
## @param storageClass StorageClass used to store the data
7+
## @param nats username, if empty no auth
8+
## @param nats password, if empty no auth
79
##
810
external: false
911
replicas: 2
1012
storageClass: ""
13+
username:
14+
password:

‎packages/apps/versions_map‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ mysql 0.5.0 4b84798
4848
mysql 0.5.1 fab5940b
4949
mysql 0.5.2 HEAD
5050
nats 0.1.0 5ca8823
51-
nats 0.2.0 HEAD
51+
nats 0.2.0 c07c4bbd
52+
nats 0.3.0 HEAD
5253
postgres 0.1.0 f642698
5354
postgres 0.2.0 7cd7de73
5455
postgres 0.2.1 4a97e297

‎packages/system/nats/values.yaml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ nats:
55
persistentVolumeClaimRetentionPolicy:
66
whenDeleted: Delete
77
whenScaled: Delete
8+
config:
9+
cluster:
10+
routeURLs:
11+
k8sClusterDomain: cozy.local

0 commit comments

Comments
 (0)