Skip to content
Snippets Groups Projects
Commit f9f0d282 authored by David José Araújo Ferreira's avatar David José Araújo Ferreira
Browse files

CRDB and NATS cluter mode

Restore default values
parent 14de559f
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!226Resolve "Testing configurations for DDOS protection"
......@@ -107,7 +107,6 @@ export NATS_EXT_PORT_CLIENT=${NATS_EXT_PORT_CLIENT:-"4222"}
# If not already set, set the external port NATS HTTP Mgmt GUI interface will be exposed to.
export NATS_EXT_PORT_HTTP=${NATS_EXT_PORT_HTTP:-"8222"}
# TESTING
# If not already set, set NATS installation mode. Accepted values are: 'single' and 'cluster'.
# - If NATS_DEPLOY_MODE is "single", NATS is deployed in single node mode. It is convenient for
# development and testing purposes and should fit in a VM. IT SHOULD NOT BE USED IN PRODUCTION ENVIRONMENTS.
......
......@@ -31,7 +31,6 @@ export NATS_EXT_PORT_CLIENT=${NATS_EXT_PORT_CLIENT:-"4222"}
# If not already set, set the external port NATS HTTP Mgmt GUI interface will be exposed to.
export NATS_EXT_PORT_HTTP=${NATS_EXT_PORT_HTTP:-"8222"}
# TESTING
# If not already set, set NATS installation mode. Accepted values are: 'single' and 'cluster'.
# - If NATS_DEPLOY_MODE is "single", NATS is deployed in single node mode. It is convenient for
# development and testing purposes and should fit in a VM. IT SHOULD NOT BE USED IN PRODUCTION ENVIRONMENTS.
......@@ -73,7 +72,8 @@ function nats_deploy_single() {
echo ">>> NATS is present; skipping step."
else
echo ">>> Deploy NATS"
helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine
helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine --set config.cluster.enabled=true --set config.cluster.tls.enabled=true
echo ">>> Waiting NATS statefulset to be created..."
while ! kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; do
......
......@@ -33,13 +33,11 @@ spec:
resources:
requests:
# This is intentionally low to make it work on local k3d clusters.
# TESTING
cpu: 1 #4
memory: 500Mi #4Gi
cpu: 4
memory: 4Gi
limits:
# TESTING
cpu: 1 #8
memory: 1Gi #8Gi
cpu: 8
memory: 8Gi
tlsEnabled: true
# You can set either a version of the db or a specific image name
# cockroachDBVersion: v22.2.8
......@@ -54,7 +52,6 @@ spec:
# disabled by default. To enable please see the operator.yaml file.
# The affinity field will accept any podSpec affinity rule.
# TESTING: Force one pod per node, if possible
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
......
......@@ -381,7 +381,6 @@ spec:
spec:
containers:
- args:
# TESTING
- -feature-gates=TolerationRules=true,AffinityRules=true,TopologySpreadRules=true
- -zap-log-level
- info
......
......@@ -9,11 +9,11 @@ container:
# recommended limit is at least 2 CPU cores and 8Gi Memory for production JetStream clusters
resources:
requests:
cpu: 1 # 2
memory: 500Mi # 4Gi
cpu: 1
memory: 500Mi
limits:
cpu: 1 # 4
memory: 1Gi # 8Gi
cpu: 1
memory: 1Gi
config:
cluster:
......
......@@ -117,7 +117,6 @@ spec:
- name: grafana
port: 3000
targetPort: 3000
# TESTING
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
......
......@@ -108,7 +108,7 @@ export CRDB_DATABASE="tfs"
# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/crdb.sh for additional details
export CRDB_DEPLOY_MODE="cluster"
export CRDB_DEPLOY_MODE="single"
# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS=""
......@@ -128,7 +128,6 @@ export NATS_EXT_PORT_CLIENT="4222"
# Set the external port NATS HTTP Mgmt GUI interface will be exposed to.
export NATS_EXT_PORT_HTTP="8222"
# TESTING
# Set NATS installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/nats.sh for additional details
export NATS_DEPLOY_MODE="single"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment