Skip to content

Conversation

@tombojer
Copy link

@tombojer tombojer commented Jun 4, 2025

This pull request introduces a new notification service for NATS, adding support for sending messages via NATS.

Parameters

This notification service is capable of sending simple messages via Nats.

  • Url - Nats server URL, e.g. nats://nats:4222
  • Headers - optional, additional headers to be sent with the message
  • User - optional, Nats user for authentication used in combination with password
  • Password - optional, Nats password for authentication used in combination with user
  • Nkey - optional, Nats key for authentication

Example

Resource Annotation:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  annotations:
    notifications.argoproj.io/subscribe.on-deployment-ready.nats: "mytopic"
  • ConfigMap
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-notifications-cm
data:
  service.nats: |
    url: "nats://nats:4222"
    headers:
      my-header: "my-value"

template.deployment-ready: |
    message: |
      Deployment {{.obj.metadata.name}} is ready!

  trigger.on-deployment-ready: |
    - when: any(obj.status.conditions, {.type == 'Available' && .status == 'True'})
      send: [deployment-ready]
    - oncePer: obj.metadata.annotations["generation"]

@tombojer tombojer force-pushed the add-nats-service branch from c95cb55 to fd5ecec Compare June 4, 2025 10:53
Signed-off-by: Tom Bojer <t.bojer@shopware.com>
@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

❌ Patch coverage is 63.88889% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.02%. Comparing base (da04400) to head (776125e).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
pkg/services/nats.go 74.19% 4 Missing and 4 partials ⚠️
pkg/services/services.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #380      +/-   ##
==========================================
+ Coverage   55.41%   60.02%   +4.60%     
==========================================
  Files          46       48       +2     
  Lines        4125     3655     -470     
==========================================
- Hits         2286     2194      -92     
+ Misses       1511     1111     -400     
- Partials      328      350      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pasha-codefresh
Copy link
Member

@tombojer could you please fix linter issues?

tombojer and others added 2 commits January 19, 2026 13:23
Signed-off-by: Tom Bojer <t.bojer@shopware.com>
@tombojer
Copy link
Author

@pasha-codefresh The tests are now passing.

Ping me if I need to do something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants