Skip to content

Commit

Permalink
Merge pull request #70 from glaciation-heu/feature/replica-service
Browse files Browse the repository at this point in the history
Feature/replica service - adding nats operator
  • Loading branch information
ktatarnikovhiro authored Nov 25, 2024
2 parents 8f5451d + cf486ef commit ec026d6
Show file tree
Hide file tree
Showing 3 changed files with 182 additions and 0 deletions.
168 changes: 168 additions & 0 deletions base/apps/dkg-engine/nats.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nats-jetstream
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: dkg-engine
server: https://kubernetes.default.svc
project: default
source:
repoURL: https://nats-io.github.io/k8s/helm/charts
chart: nats
targetRevision: 0.19.17
helm:
valuesObject:
nats:
serverNamePrefix: integration

jetstream:
enabled: true

# Jetstream Domain
domain: integration

# Jetstream Unique Tag prevent placing a stream in the same availability zone twice.
uniqueTag:

max_outstanding_catchup:

##########################
# #
# Jetstream Encryption #
# #
##########################
encryption:
# Use key if you want to provide the key via Helm Values
# key: random_key

# Use a secret reference if you want to get a key from a secret
# secret:
# name: "nats-jetstream-encryption"
# key: "key"

# Use cipher if you want to choose a different cipher from the default.
# cipher: aes

#############################
# #
# Jetstream Memory Storage #
# #
#############################
memStorage:
enabled: true
size: 1Gi

############################
# #
# Jetstream File Storage #
# #
############################
fileStorage:
enabled: true
storageDirectory: /data

# Set for use with existing PVC
# existingClaim: jetstream-pvc
# claimStorageSize: 10Gi

# Use below block to create new persistent volume
# only used if existingClaim is not specified
size: 2Gi
storageClassName: longhorn
accessModes:
- ReadWriteOnce
annotations:
# key: "value"

# Use below if fileStorage is not enabled but you are persisting
# data using an alternative to PVC (e.g. hostPath)
# These set the corresponding jetstream configuration in nats.conf.
# store_dir: "/data"
# max_file: "10Gi"

#######################
# #
# TLS Configuration #
# #
#######################
#
# # You can find more on how to setup and trouble shoot TLS connnections at:
#
# # https://docs.nats.io/nats-server/configuration/securing_nats/tls
#

# tls:
# allowNonTLS: false
# secret:
# name: nats-client-tls
# ca: "ca.crt"
# cert: "tls.crt"
# key: "tls.key"

mqtt:
enabled: true
ackWait: 1m
maxAckPending: 100

#######################
# #
# TLS Configuration #
# #
#######################
#
# # You can find more on how to setup and trouble shoot TLS connnections at:
#
# # https://docs.nats.io/nats-server/configuration/securing_nats/tls
#

#
# tls:
# secret:
# name: nats-mqtt-tls
# ca: "ca.crt"
# cert: "tls.crt"
# key: "tls.key"
cluster:
enabled: true
replicas: 3
noAdvertise: false

# Explicitly set routes for clustering.
# When JetStream is enabled, the serverName must be unique in the cluster.
extraRoutes: []

# authorization:
# user: foo
# password: pwd
# timeout: 0.5
websocket:
enabled: true
port: 443
noTLS: true

sameOrigin: false
allowedOrigins: []

# This will optionally specify what host:port for websocket
# connections to be advertised in the cluster.
# advertise: "host:port"

# Set the handshake timeout for websocket connections
# handshakeTimeout: 5s

k8sClusterDomain: cluster.local

# Define if NATS is using FQDN name for clustering (i.e. nats-0.nats.default.svc.cluster.local) or short name (i.e. nats-0.nats.default).
useFQDN: true

syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
File renamed without changes.
14 changes: 14 additions & 0 deletions overlays/validation/dkg-engine/patch-optional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,17 @@ spec:
helm:
valuesObject:
ingressHostName: prediction.validation
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nats-operator
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
source:
helm:
valuesObject:
cluster:
name: nats-validation

0 comments on commit ec026d6

Please sign in to comment.