Skip to content

Commit

Permalink
add state monitoring stream
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymsiska committed Oct 30, 2024
1 parent ee8912d commit 6bbd871
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/continuous-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ jobs:
nats --creds ./nats.creds \
--server ${{ secrets.NATS_URL }} \
stream rm acapy_events -f
nats --creds ./nats.creds \
--server ${{ secrets.NATS_URL }} \
stream rm cloudapi_aries_state_monitoring -f
nats --creds ./nats.creds \
--server ${{ secrets.NATS_URL }} \
Expand Down Expand Up @@ -638,6 +641,19 @@ jobs:
--replicas 3 \
--compression s2
nats --creds ./nats.creds \
--server ${{ secrets.NATS_URL }} \
stream add cloudapi_aries_state_monitoring --subjects "cloudapi.aries.state_monitoring.*.*.>" \
--defaults \
--storage file \
--replicas 3 \
--compression s2 \
--retention limits \
--discard old \
--max-age 1m \
--dupe-window 1m \
--max-msgs-per-subject 1000
rm -f ./nats.creds
- name: Helmfile Apply # Apply default helmfile (without RDS proxy) when resetting deployments.
Expand Down
29 changes: 25 additions & 4 deletions tilt/cloudapi/nats/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,30 @@ spec:
{{- range $stream, $config := .Values.postInstall.streams }}
nats --server nats://{{ template "common.names.fullname" $ }}:{{ default 4222 $.Values.nats.service.ports.client }} stream add {{ $stream }} \
--subjects {{ join "," $config.subjects | quote }} \
{{- if $config.defaults }}
--defaults \
{{- end }}
--storage {{ $config.storage }} \
--replicas={{ $.Values.nats.replicaCount }}
--replicas={{ $.Values.nats.replicaCount }} \
{{- if $config.compression }}
--compression {{ $config.compression }} \
{{- end }}
{{- if $config.maxAge }}
--max-age {{ $config.maxAge }} \
{{- end }}
{{- if $config.maxBytes }}
--max-bytes {{ $config.maxBytes }} \
{{- end }}
{{- if $config.maxMsgs }}
--max-msgs {{ $config.maxMsgs }} \
{{- end }}
{{- if $config.maxMsgsPerSubject }}
--max-msgs-per-subject {{ $config.maxMsgsPerSubject }} \
{{- end }}
{{- if $config.retention }}
--retention {{ $config.retention }} \
{{- end }}
{{- if $config.discard }}
--discard {{ $config.discard }} \
{{- end }}
{{- if $config.duplicateWindow }}
--dupe-window {{ $config.duplicateWindow }} \
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions tilt/cloudapi/nats/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ postInstall:
- cloudapi.aries.events.*.*
defaults: true
storage: file
cloudapi_aries_state_monitoring:
subjects:
- cloudapi.aries.state_monitoring.*.*.>
defaults: true
storage: file
retention: limits
discard: old
maxAge: 1m
duplicateWindow: 1m
maxMsgsPerSubject: 1000
acapy_events:
subjects:
- acapy.>
Expand Down

0 comments on commit 6bbd871

Please sign in to comment.