diff --git a/scripts/env.sh b/scripts/env.sh index e2e3ba9..4430303 100644 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -4,5 +4,9 @@ export INSTALLATION_SOURCE=Internal export LOKI_OPERATOR=Released # will use '1x.extra-small' if not set export LOKISTACK_SIZE=1x.extra-small -# will use '6' if not set +# will use '6' if not set export TOPIC_PARTITIONS=48 +# will use '2' if not set +export INGESTER_REPLICAS=2 + + diff --git a/scripts/loki/lokistack.yaml b/scripts/loki/lokistack.yaml index fcadd84..7214ff5 100644 --- a/scripts/loki/lokistack.yaml +++ b/scripts/loki/lokistack.yaml @@ -51,7 +51,7 @@ objects: value: reserved effect: NoExecute ingester: - replicas: 2 + replicas: ${INGESTER_REPLICAS} nodeAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 @@ -158,3 +158,5 @@ parameters: value: "1x.extra-small" - name: DEFAULT_SC value: "gp3-csi" + - name: INGESTER_REPLICAS + value: "2" diff --git a/scripts/netobserv.sh b/scripts/netobserv.sh index 89a4794..83bd6b3 100755 --- a/scripts/netobserv.sh +++ b/scripts/netobserv.sh @@ -316,8 +316,14 @@ deploy_lokistack() { SIZE="1x.extra-small" fi + if [[ -z $INGESTER_REPLICAS ]]; then + echo "====> No ingester replicas config was found - using '2'" + echo "====> To set config, set INGESTER_REPLICAS variable to desired number" + export INGESTER_REPLICAS=2 + fi + echo "====> Creating LokiStack" - oc process --ignore-unknown-parameters=true -f $SCRIPTS_DIR/loki/lokistack.yaml -p SIZE=$SIZE DEFAULT_SC=$DEFAULT_SC NAMESPACE=$LOKI_NS -n default -o yaml >"$ARTIFACT_DIR"/lokiStack.yaml + oc process --ignore-unknown-parameters=true -f $SCRIPTS_DIR/loki/lokistack.yaml -p SIZE=$SIZE DEFAULT_SC=$DEFAULT_SC NAMESPACE=$LOKI_NS INGESTER_REPLICAS=$INGESTER_REPLICAS -n default -o yaml >"$ARTIFACT_DIR"/lokiStack.yaml oc apply -f "$ARTIFACT_DIR"/lokiStack.yaml -n $LOKI_NS sleep 30 echo "====> Waiting lokistack to be ready"