Skip to content

Commit

Permalink
add password for nats
Browse files Browse the repository at this point in the history
  • Loading branch information
klinch0 committed Nov 15, 2024
1 parent bfbde07 commit 46a519d
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 19 deletions.
15 changes: 0 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: [--fix=lf]
- id: check-yaml
exclude: '^.*templates/.*\.yaml$'
args: [--unsafe]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
hooks:
- id: markdownlint
args: [--fix, --disable, MD013, MD041, --]
- repo: local
hooks:
- id: gen-versions-map
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/nats/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
3 changes: 2 additions & 1 deletion packages/apps/nats/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
| `external` | Enable external access from outside the cluster | `false` |
| `replicas` | Persistent Volume size for NATS | `2` |
| `storageClass` | StorageClass used to store the data | `""` |

| `username` | Nats username, if empty no auth | `""` |
| `password` | Nats password, if empty no auth | `""` |
7 changes: 7 additions & 0 deletions packages/apps/nats/templates/nats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ spec:
nats:
fullnameOverride: {{ .Release.Name }}
config:
{{- if and .Values.username .Values.password }}
merge:
accounts:
A:
users:
- {user: "{{ .Values.username }}", password: "{{ .Values.password }}"}
{{- end }}
cluster:
enabled: true
replicas: {{ .Values.replicas }}
Expand Down
12 changes: 11 additions & 1 deletion packages/apps/nats/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
"type": "string",
"description": "StorageClass used to store the data",
"default": ""
},
"username": {
"type": "string",
"description": "Nats username, if empty no auth",
"default": ""
},
"password": {
"type": "string",
"description": "Nats password, if empty no auth",
"default": ""
}
}
}
}
4 changes: 4 additions & 0 deletions packages/apps/nats/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
## @param external Enable external access from outside the cluster
## @param replicas Persistent Volume size for NATS
## @param storageClass StorageClass used to store the data
## @param nats username, if empty no auth
## @param nats password, if empty no auth
##
external: false
replicas: 2
storageClass: ""
username:
password:
3 changes: 2 additions & 1 deletion packages/apps/versions_map
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ mysql 0.5.0 4b84798
mysql 0.5.1 fab5940b
mysql 0.5.2 HEAD
nats 0.1.0 5ca8823
nats 0.2.0 HEAD
nats 0.2.0 c07c4bbd
nats 0.3.0 HEAD
postgres 0.1.0 f642698
postgres 0.2.0 7cd7de73
postgres 0.2.1 4a97e297
Expand Down
4 changes: 4 additions & 0 deletions packages/system/nats/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ nats:
persistentVolumeClaimRetentionPolicy:
whenDeleted: Delete
whenScaled: Delete
config:
cluster:
routeURLs:
k8sClusterDomain: cozy.local

0 comments on commit 46a519d

Please sign in to comment.