Skip to content

Commit

Permalink
Allow groupid to be passed
Browse files Browse the repository at this point in the history
  • Loading branch information
zalbiraw committed Sep 24, 2024
1 parent 57df45a commit 70d8965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PORTAL_LICENSE=
TYK_WORKER_CONNECTIONSTRING=
TYK_WORKER_ORGID=
TYK_WORKER_AUTHTOKEN=
TYK_WORKER_GROUPID=
TYK_WORKER_USESSL=true
TYK_WORKER_SHARDING_ENABLED=false
TYK_WORKER_SHARDING_TAGS=
Expand Down
10 changes: 6 additions & 4 deletions src/main/tyk-dp.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
cluster=$(kubectl config current-context);
if [ -z "$TYK_WORKER_GROUPID" ]; then
TYK_WORKER_GROUPID=$(echo "$(kubectl config current-context)/$namespace" | base64);
fi

args=(--set "global.remoteControlPlane.connectionString=$TYK_WORKER_CONNECTIONSTRING" \
--set "global.remoteControlPlane.orgId=$TYK_WORKER_ORGID" \
--set "global.remoteControlPlane.userApiKey=$TYK_WORKER_AUTHTOKEN" \
--set "global.remoteControlPlane.useSSL=$TYK_WORKER_USESSL" \
--set "global.remoteControlPlane.groupID=$(echo "$cluster/$namespace" | base64)" \
--set "global.remoteControlPlane.groupID=$TYK_WORKER_GROUPID" \
--set "global.servicePorts.gateway=$TYK_WORKER_GW_PORT" \
--set "tyk-gateway.gateway.image.tag=$GATEWAY_VERSION" \
--set "tyk-gateway.gateway.sharding.enabled=$TYK_WORKER_SHARDING_ENABLED" \
--set "tyk-gateway.gateway.sharding.tags=$TYK_WORKER_SHARDING_TAGS");

if [ -z "$TYK_WORKER_SHARDING_TAGS" ]
then
if [ -z "$TYK_WORKER_SHARDING_TAGS" ]; then
tykReleaseName="tyk-dp";
else
tykReleaseName="tyk-dp-$TYK_WORKER_SHARDING_TAGS";
fi

tykReleaseVersion="1.6.0";

logger "$DEBUG" "tykReleaseName=$tykReleaseName";
Expand Down

0 comments on commit 70d8965

Please sign in to comment.