Skip to content

Conversation

@ashupednekar
Copy link

@ashupednekar ashupednekar commented Oct 28, 2025

This PR introduces a new Helm chart for NATS S3, an S3-compatible object storage layer powered by NATS JetStream.
It enables simple, configurable deployment of NATS S3 on Kubernetes.


📂 Chart Overview

Adds a new Helm chart for deploying NATS S3, an S3-compatible object storage layer powered by NATS JetStream.
The chart is based on the wpnpeiris/nats-s3 project and includes configurable values for image, NATS servers, authentication, and service parameters.


⚙️ Configuration Overview

The chart is designed to make NATS S3 easily configurable through values.yaml.
Key configurable sections include:

General

  • nameOverride / fullnameOverride / namespaceOverride — Customize resource names and namespaces.
  • replicaCount — Number of NATS S3 pod replicas to deploy.

Image

  • image.repository — Container image to use (default: ghcr.io/wpnpeiris/nats-s3).
  • image.tag — Image tag (default: latest).
  • image.pullPolicy — Kubernetes pull policy (IfNotPresent, Always, etc.).

Service

  • service.type — Kubernetes service type (ClusterIP, NodePort, etc.).
  • service.port / service.targetPort — Define the external and internal ports for NATS S3.
  • service.nodePort — Optional NodePort override (used if type is NodePort).

NATS Connection

  • nats.servers — Comma-separated list of NATS server URLs, e.g. nats://nats:4222.

Authentication

  • auth.enabled — Enables username/password authentication.
  • auth.username / auth.password — Basic credentials for S3 access (used if auth.enabled is true).
  • auth.existingSecret — Optionally reference an existing Kubernetes Secret containing credentials.
    When set, this overrides inline username/password values.

🚀 Example Usage

helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm install my-nats-s3 nats/nats-s3 -f my-values.yaml

Example my-values.yaml:

nats:
  servers: "nats://nats:4222"

auth:
  enabled: true
  username: "natsadmin"
  password: "natsadmin"

Usage

Note

The optional dependency for s3 in the nats chart is currently an oci dependency pointing to my ghcr artifact, can be changed to file once/if merged

Right now, we need to cd into the nats chart and build the dependencies to pull in the s3 chart

helm/charts/nats on  feat_s3 !? macbook
❯ helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "nats" chart repository
Update Complete. ⎈Happy Helming!⎈
Error: could not retrieve list of tags for repository oci://ghcr.io/ashupe
dnekar/charts/nats-s3: GET "https://ghcr.io/v2/ashupednekar/charts/nats-s3
/nats-s3/tags/list": response status code 404: name unknown: repository na
me not known to registry
helm/charts/nats on  feat_s3 !? macbook
❯ helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "nats" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading nats-s3 from repo oci://ghcr.io/ashupednekar/charts
Pulled: ghcr.io/ashupednekar/charts/nats-s3:0.1.0
Digest: sha256:95b396a38241a050b20e589ecf87d6fb274bec0496d05fd9542e2af60a9
063b4
Deleting outdated charts

The chart can then be installed by enabling the s3.enabled=true value.

❯ helm install nats . -f ~/Documents/nats.yaml --set s3.enabled=true
NAME: nats
LAST DEPLOYED: Tue Oct 28 11:03:37 2025
NAMESPACE: default
STATUS: deployed
REVISION: 1
helm/charts/nats on  feat_s3 !? macbook
❯ k get po   
NAME                        READY   STATUS    RESTARTS      AGE
nats-0                      1/1     Running   0             21s
nats-1                      1/1     Running   0             21s
nats-2                      1/1     Running   0             21s
nats-box-789cd4555d-9w2n2   1/1     Running   0             21s
nats-s3-84bb45c49b-x27gr    1/1     Running   2 (19s ago)   21s
pgo-85767cc986-d64p7        1/1     Running   1 (4d ago)    9d
helm/charts/nats on  feat_s3 !? macbook
❯ 

TODO: fetch nats credentials and auto-configure.. instead of expecting seperate values. Will to this if accepted

🧰 Future Enhancements

  • Add additional authentication options, to the secret
  • Integration with NATS account- and JetStream-based policies

Maintainers:

@ashupednekar ashupednekar changed the title Feat s3 ✨ Feat: Add Helm Chart for NATS S3 Oct 28, 2025

```
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm install -f my-values.yaml my-nats-kafka nats/nats-kafka
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs here are from nats kafka?

Copy link
Author

@ashupednekar ashupednekar Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out, the docs commits were unpushed, my bad... updated

dependencies:
- name: nats-s3
version: 0.1.0
repository: "oci://ghcr.io/ashupednekar/charts"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: if this goes upstream, this can change to file:// to pick from the same repo

@@ -0,0 +1,10 @@
apiVersion: v2
version: 0.1.0
appVersion: 1.4.2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be version of latest nats-s3?, latest we have 0.3.3


auth:
# Enable authentication (disabled by default)
enabled: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is commented as disabled by default, so this should be false?

@Jarema
Copy link
Member

Jarema commented Oct 28, 2025

Hey!
Thanks for the contribution!

However, we should not add support for non-nats-io org project k8s chart here.
For now - probably the nats-s3 repo would make more sense.

@ashupednekar
Copy link
Author

Yes, makes sense... will add it to the nats-s3 repo for now...

There's a proposal from its maintainer to add nats-s3 to natsio, we could come back to this if that happens

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.

4 participants