Skip to content

Commit

Permalink
fix: allow nats address to include a port
Browse files Browse the repository at this point in the history
This fix omits the preset NATS leaf node port `7422` from being
automatically set if the `natsAddress` field is set in the CRD. This
allows you to specify the port if it is not using the default at the
cost of making it required.
  • Loading branch information
protochron committed May 27, 2024
1 parent 35af8ad commit 617cedd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hack/run-kind-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
# https://github.com/kubernetes-sigs/kind/issues/2875
# https://github.com/containerd/containerd/blob/main/docs/cri/config.md#registry-configuration
# See: https://github.com/containerd/containerd/blob/main/docs/hosts.md
cat <<EOF | kind create cluster --image kindest/node:v1.29.2 --config=-
cat <<EOF | kind create cluster --image kindest/node:v1.29.4 --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
Expand Down
8 changes: 4 additions & 4 deletions sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
# The name of a secret in the same namespace that provides the required secrets.
secretName: cluster-secrets
logLevel: INFO
natsAddress: nats://nats-cluster.default.svc.cluster.local
natsAddress: nats://nats-cluster.default.svc.cluster.local:7422
################################################
# Additional options that can be set for hosts:
################################################
Expand All @@ -27,9 +27,9 @@ spec:
# - "kind-registry:5000"
# Policy service configuration
# policyService:
# topic: "wasmcloud.policy"
# #changesTopic: "bar"
# timeoutMs: 10000
# topic: "wasmcloud.policy"
# changesTopic: "bar"
# timeoutMs: 10000
# Additional options to control how the underlying wasmCloud hosts are scheduled in Kubernetes.
# This includes setting resource requirements for the nats and wasmCloud host
# containers along with any additional pot template settings.
Expand Down
2 changes: 1 addition & 1 deletion src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ jetstream {
leafnodes {
remotes: [
{
url: "{{cluster_url}}:7422"
url: "{{cluster_url}}"
{{#if use_credentials}}
credentials: "/nats/nats.creds"
{{/if}}
Expand Down

0 comments on commit 617cedd

Please sign in to comment.