diff --git a/plugins/gateway/kong/README.md b/plugins/gateway/kong/README.md index d8723c64..136924af 100644 --- a/plugins/gateway/kong/README.md +++ b/plugins/gateway/kong/README.md @@ -6,7 +6,7 @@ run: ```shell -KONG_PROXY_CONTAINER_NAME= KONG_GATEWAY_DEPLOYMENT_NAME= KONG_GATEWAY_DEPLOYMENT_NAMESPACE= KONG_GATEWAY_INGRESS_NAME= KONG_GATEWAY_INGRESS_NAMESPACE= ./deploy/deploy.sh +KONG_PROXY_CONTAINER_NAME= KONG_GATEWAY_DEPLOYMENT_NAME= KONG_GATEWAY_DEPLOYMENT_NAMESPACE= KONG_GATEWAY_INGRESS_NAME= KONG_GATEWAY_INGRESS_NAMESPACE= UPSTREAM_TELEMETRY_HOST_NAME= ./deploy/deploy.sh ``` Where: @@ -21,4 +21,6 @@ KONG_GATEWAY_INGRESS_NAME - the name of the ingress resource to be patched KONG_GATEWAY_INGRESS_NAMESPACE - the namespace of the ingress resource to be patched +UPSTREAM_TELEMETRY_HOST_NAME - The name of the telemetry service (defaults to apiclarity-apiclarity.apiclarity:9000) + Once the plugin is deployed, traces will be sent to APIClarity to start learning specs. \ No newline at end of file diff --git a/plugins/gateway/kong/deploy/deploy.sh b/plugins/gateway/kong/deploy/deploy.sh index e0b90c31..8adb8c89 100755 --- a/plugins/gateway/kong/deploy/deploy.sh +++ b/plugins/gateway/kong/deploy/deploy.sh @@ -4,7 +4,7 @@ KongGatewayDeploymentName="${KONG_GATEWAY_DEPLOYMENT_NAME:-kong}" KongGatewayDeploymentNamespace="${KONG_GATEWAY_DEPLOYMENT_NAMESPACE:-default}" KongGatewayIngressName="${KONG_GATEWAY_INGRESS_NAME:-demo}" KongGatewayIngressNamespace="${KONG_GATEWAY_INGRESS_NAMESPACE:-default}" -UpstreamTelemetryHostName="${UPSTREAM_TELEMETRY_HOST_NAME:-apiclarity.apiclarity:9000}" +UpstreamTelemetryHostName="${UPSTREAM_TELEMETRY_HOST_NAME:-apiclarity-apiclarity.apiclarity:9000}" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" diff --git a/plugins/gateway/tyk/deploy/deploy.sh b/plugins/gateway/tyk/deploy/deploy.sh index 53190fec..2e559892 100755 --- a/plugins/gateway/tyk/deploy/deploy.sh +++ b/plugins/gateway/tyk/deploy/deploy.sh @@ -2,10 +2,11 @@ TykProxyContainerName="${TYK_PROXY_CONTAINER_NAME:-tyk-gtw}" TykGatewayDeploymentName="${TYK_GATEWAY_DEPLOYMENT_NAME:-tyk-gtw}" TykGatewayDeploymentNamespace="${TYK_GATEWAY_DEPLOYMENT_NAMESPACE:-default}" +UpstreamTelemetryHostName="${UPSTREAM_TELEMETRY_HOST_NAME:-apiclarity-apiclarity.apiclarity:9000}" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -deploymentPatch=`cat "${DIR}/patch-deployment.yaml" | sed "s/{{TYK_PROXY_CONTAINER_NAME}}/$TykProxyContainerName/g"` +deploymentPatch=`cat "${DIR}/patch-deployment.yaml" | sed "s/{{TYK_PROXY_CONTAINER_NAME}}/$TykProxyContainerName/g" | sed "s/{{UPSTREAM_TELEMETRY_HOST_NAME}}/$UpstreamTelemetryHostName/g"` kubectl patch deployments.apps -n ${TykGatewayDeploymentNamespace} ${TykGatewayDeploymentName} --patch "$deploymentPatch" diff --git a/plugins/gateway/tyk/deploy/patch-deployment.yaml b/plugins/gateway/tyk/deploy/patch-deployment.yaml index 42d66e7d..7d82d0d9 100644 --- a/plugins/gateway/tyk/deploy/patch-deployment.yaml +++ b/plugins/gateway/tyk/deploy/patch-deployment.yaml @@ -15,7 +15,7 @@ spec: fieldRef: fieldPath: metadata.namespace - name: APICLARITY_HOST - value: "apiclarity.apiclarity:9000" + value: {{UPSTREAM_TELEMETRY_HOST_NAME}} initContainers: - command: - cp