这是indexloc提供的服务,不要输入任何密码
Skip to content

Updates telco connectors #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ddn-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ jobs:
sudo apt-get update
sudo apt-get install -y jq

- name: Create .env.cloud.telco-dev
- name: Create .env.cloud.telco-dev securely
working-directory: ./hasura
if: env.no_op != 'true'
env:
ENV_CLOUD_DEFAULT: ${{ secrets.ENV_CLOUD_DEFAULT }}
run: |
echo "${{ secrets.ENV_CLOUD_DEFAULT }}" > .env.cloud.telco-dev
echo "::add-mask::$ENV_CLOUD_DEFAULT"
echo "$ENV_CLOUD_DEFAULT" > .env.cloud.telco-dev

- name: Detect Connector Changes
if: env.no_op != 'true'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ddn-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ jobs:
sleep 20

QUERY='{
"query": "query getUsers { customers(where: {customerId: {_eq: 7}}) { customerId firstName lastName email satisfactionScore churnRisk customerPlans { customerPlanDevices { device { brand } } } } }"
"query": "query getUsers { publicCustomers(where: {customerId: {_eq: 7}}) { customerId firstName lastName email satisfactionScore churnRisk customerPlans { customerPlanDevices { device { brand } } } } }"
}'

EXPECTED_RESPONSE='{"data":{"customers":[{"customerId":7,"firstName":"Alexis","lastName":"Marchand","email":"alexis.marchand@gmail.com","satisfactionScore":5,"churnRisk":"0.55","customerPlans":[{"customerPlanDevices":[{"device":{"brand":"Apple"}}]}]}]}}'
EXPECTED_RESPONSE='{"data":{"publicCustomers":[{"customerId":7,"firstName":"Alexis","lastName":"Marchand","email":"alexis.marchand@gmail.com","satisfactionScore":5,"churnRisk":"0.55","customerPlans":[{"customerPlanDevices":[{"device":{"brand":"Apple"}}]}]}]}}'

RESPONSE=$(curl -s -X POST "http://localhost:3280/graphql" -H "Content-Type: application/json" -d "$QUERY")

Expand Down
75 changes: 37 additions & 38 deletions hasura/.env.telco.template
Original file line number Diff line number Diff line change
@@ -1,90 +1,89 @@
AUTH_AUTH_AUTHORIZATION_HEADER="Bearer YQ=="
AUTH_AUTH_CONNECTION_URI="postgresql://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:5432/auth"
AUTH_AUTH_HASURA_CONNECTOR_PORT=4444
AUTH_AUTH_JDBC_URL="jdbc:postgresql://local.hasura.dev:5432/auth?user=postgres&password=hbGciOiJIUzI1NiIsInR5cCI6IkpX"
AUTH_AUTH_HASURA_SERVICE_TOKEN_SECRET="YQ=="
AUTH_AUTH_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="http://local.hasura.dev:4317"
AUTH_AUTH_OTEL_SERVICE_NAME="auth_auth"
AUTH_AUTH_READ_URL="http://local.hasura.dev:6460"
AUTH_AUTH_WRITE_URL="http://local.hasura.dev:6460"
AUTH_AUTH_READ_URL="http://local.hasura.dev:4444"
AUTH_AUTH_WRITE_URL="http://local.hasura.dev:4444"
AUTH_SEARCH_AUTHORIZATION_HEADER="Bearer yEFrfQQHs6BCe0S2GBWQxQ=="
AUTH_SEARCH_BRAVE_API_KEY="FILLME"
AUTH_SEARCH_GEMINI_API_KEY="FILLME"
AUTH_SEARCH_HASURA_CONNECTOR_PORT=8956
AUTH_SEARCH_HASURA_CONNECTOR_PORT=9125
AUTH_SEARCH_HASURA_SERVICE_TOKEN_SECRET="yEFrfQQHs6BCe0S2GBWQxQ=="
AUTH_SEARCH_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
AUTH_SEARCH_OTEL_SERVICE_NAME="auth_search"
AUTH_SEARCH_PERPLEXITY_API_KEY="FILLME"
AUTH_SEARCH_READ_URL="http://local.hasura.dev:8956"
AUTH_SEARCH_WRITE_URL="http://local.hasura.dev:8956"
AUTH_SEARCH_READ_URL="http://local.hasura.dev:9125"
AUTH_SEARCH_WRITE_URL="http://local.hasura.dev:9125"
CUSTOMER_AURORA_AUTHORIZATION_HEADER="Bearer lW9ob0kcz3Zy6s5LXJCxbQ=="
CUSTOMER_AURORA_CONNECTION_URI="postgres://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:5432/customer"
CUSTOMER_AURORA_HASURA_CONNECTOR_PORT=8043
CUSTOMER_AURORA_JDBC_URL="jdbc:postgresql://local.hasura.dev:5432/customer?user=postgres&password=hbGciOiJIUzI1NiIsInR5cCI6IkpX"
CUSTOMER_AURORA_HASURA_CONNECTOR_PORT=7159
CUSTOMER_AURORA_HASURA_SERVICE_TOKEN_SECRET="lW9ob0kcz3Zy6s5LXJCxbQ=="
CUSTOMER_AURORA_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
CUSTOMER_AURORA_OTEL_SERVICE_NAME="customer_aurora"
CUSTOMER_AURORA_READ_URL="http://local.hasura.dev:8043"
CUSTOMER_AURORA_WRITE_URL="http://local.hasura.dev:8043"
CUSTOMER_AURORA_READ_URL="http://local.hasura.dev:7159"
CUSTOMER_AURORA_WRITE_URL="http://local.hasura.dev:7159"
CUSTOMER_LOGIC_AUTHORIZATION_HEADER="Bearer WbHea2dsmtQoGCrQENmQVQ=="
CUSTOMER_LOGIC_HASURA_CONNECTOR_PORT=6193
CUSTOMER_LOGIC_HASURA_CONNECTOR_PORT=5627
CUSTOMER_LOGIC_HASURA_SERVICE_TOKEN_SECRET="WbHea2dsmtQoGCrQENmQVQ=="
CUSTOMER_LOGIC_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
CUSTOMER_LOGIC_OTEL_SERVICE_NAME="customer_logic"
CUSTOMER_LOGIC_READ_URL="http://local.hasura.dev:6193"
CUSTOMER_LOGIC_WRITE_URL="http://local.hasura.dev:6193"
CUSTOMER_LOGIC_READ_URL="http://local.hasura.dev:5627"
CUSTOMER_LOGIC_WRITE_URL="http://local.hasura.dev:5627"
CUSTOMER_MONGO_AUTHORIZATION_HEADER="Bearer VPBBqvl0Ewtm-uE82clWfQ=="
CUSTOMER_MONGO_HASURA_CONNECTOR_PORT=5119
CUSTOMER_MONGO_HASURA_CONNECTOR_PORT=5973
CUSTOMER_MONGO_HASURA_SERVICE_TOKEN_SECRET="VPBBqvl0Ewtm-uE82clWfQ=="
CUSTOMER_MONGO_MONGODB_DATABASE_URI="mongodb://presales:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:27017/holotel"
CUSTOMER_MONGO_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
CUSTOMER_MONGO_OTEL_SERVICE_NAME="customer_mongo"
CUSTOMER_MONGO_READ_URL="http://local.hasura.dev:5119"
CUSTOMER_MONGO_WRITE_URL="http://local.hasura.dev:5119"
CUSTOMER_MONGO_READ_URL="http://local.hasura.dev:5973"
CUSTOMER_MONGO_WRITE_URL="http://local.hasura.dev:5973"
CUSTOMER_STRIPE_AUTHORIZATION_HEADER="Bearer XQVuVHPrqCvJsuxrpmExaw=="
CUSTOMER_STRIPE_HASURA_CONNECTOR_PORT=7813
CUSTOMER_STRIPE_HASURA_CONNECTOR_PORT=6775
CUSTOMER_STRIPE_HASURA_SERVICE_TOKEN_SECRET="XQVuVHPrqCvJsuxrpmExaw=="
CUSTOMER_STRIPE_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
CUSTOMER_STRIPE_OTEL_SERVICE_NAME="customer_stripe"
CUSTOMER_STRIPE_READ_URL="http://local.hasura.dev:7813"
CUSTOMER_STRIPE_WRITE_URL="http://local.hasura.dev:7813"
CUSTOMER_STRIPE_READ_URL="http://local.hasura.dev:6775"
CUSTOMER_STRIPE_WRITE_URL="http://local.hasura.dev:6775"
JWT_SECRET="hptj8supNeslwet7nhGGr5Uu5MombVVjDmcGMOyrWa8"
NETWORK_CLICKHOUSE_AUTHORIZATION_HEADER="Bearer BRiJ5KAUsYN__yGaVd72LQ=="
NETWORK_CLICKHOUSE_CLICKHOUSE_PASSWORD="hbGciOiJIUzI1NiIsInR5cCI6IkpX"
NETWORK_CLICKHOUSE_CLICKHOUSE_URL="http://local.hasura.dev:8123"
NETWORK_CLICKHOUSE_CLICKHOUSE_USERNAME="default"
NETWORK_CLICKHOUSE_JDBC_URL="jdbc:clickhouse://local.hasura.dev:8123/default?user=default&password=hbGciOiJIUzI1NiIsInR5cCI6IkpX"
NETWORK_CLICKHOUSE_HASURA_SERVICE_TOKEN_SECRET="BRiJ5KAUsYN__yGaVd72LQ=="
NETWORK_CLICKHOUSE_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
NETWORK_CLICKHOUSE_OTEL_SERVICE_NAME="network_clickhouse"
NETWORK_CLICKHOUSE_READ_URL="http://local.hasura.dev:4842"
NETWORK_CLICKHOUSE_WRITE_URL="http://local.hasura.dev:4842"
NETWORK_CLICKHOUSE_READ_URL="http://local.hasura.dev:4045"
NETWORK_CLICKHOUSE_WRITE_URL="http://local.hasura.dev:4045"
NETWORK_KAFKA_SINK_AUTHORIZATION_HEADER="Bearer ZGnGjDgbvJlDmoB-R2g0Fw=="
NETWORK_KAFKA_SINK_CONNECTION_URI="postgresql://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:5432/network"
NETWORK_KAFKA_SINK_HASURA_CONNECTOR_PORT=4040
NETWORK_KAFKA_SINK_JDBC_URL="jdbc:postgresql://local.hasura.dev:5432/network?user=postgres&password=hbGciOiJIUzI1NiIsInR5cCI6IkpX"
NETWORK_KAFKA_SINK_HASURA_CONNECTOR_PORT=9204
NETWORK_KAFKA_SINK_HASURA_SERVICE_TOKEN_SECRET="ZGnGjDgbvJlDmoB-R2g0Fw=="
NETWORK_KAFKA_SINK_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
NETWORK_KAFKA_SINK_OTEL_SERVICE_NAME="network_kafka_sink"
NETWORK_KAFKA_SINK_READ_URL="http://local.hasura.dev:4040"
NETWORK_KAFKA_SINK_WRITE_URL="http://local.hasura.dev:4040"
NETWORK_KAFKA_SINK_READ_URL="http://local.hasura.dev:9204"
NETWORK_KAFKA_SINK_WRITE_URL="http://local.hasura.dev:9204"
SUPPORT_ATLAS_AUTHORIZATION_HEADER="Bearer NW85vcBvTEZHpqFwYV95sQ=="
SUPPORT_ATLAS_HASURA_CONNECTOR_PORT=4240
SUPPORT_ATLAS_HASURA_CONNECTOR_PORT=8795
SUPPORT_ATLAS_HASURA_SERVICE_TOKEN_SECRET="NW85vcBvTEZHpqFwYV95sQ=="
SUPPORT_ATLAS_MONGODB_DATABASE_URI="mongodb://presales:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:27017/holotel"
SUPPORT_ATLAS_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
SUPPORT_ATLAS_OTEL_SERVICE_NAME="support_atlas"
SUPPORT_ATLAS_READ_URL="http://local.hasura.dev:4240"
SUPPORT_ATLAS_WRITE_URL="http://local.hasura.dev:4240"
SUPPORT_ATLAS_READ_URL="http://local.hasura.dev:8795"
SUPPORT_ATLAS_WRITE_URL="http://local.hasura.dev:8795"
SUPPORT_VECTOR_AUTHORIZATION_HEADER="Bearer KJPU9PE8nw5omUeDtT6uxA=="
SUPPORT_VECTOR_CONNECTION_URI="postgresql://postgres:hbGciOiJIUzI1NiIsInR5cCI6IkpX@local.hasura.dev:5433/postgres"
SUPPORT_VECTOR_HASURA_CONNECTOR_PORT=8848
SUPPORT_VECTOR_JDBC_URL="jdbc:postgresql://local.hasura.dev:5433/postgres?user=postgres&password=hbGciOiJIUzI1NiIsInR5cCI6IkpX"
SUPPORT_VECTOR_HASURA_CONNECTOR_PORT=6755
SUPPORT_VECTOR_HASURA_SERVICE_TOKEN_SECRET="KJPU9PE8nw5omUeDtT6uxA=="
SUPPORT_VECTOR_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
SUPPORT_VECTOR_OTEL_SERVICE_NAME="support_vector"
SUPPORT_VECTOR_READ_URL="http://local.hasura.dev:8848"
SUPPORT_VECTOR_READ_URL="http://local.hasura.dev:6755"
SUPPORT_VECTOR_SEARCH_SERVICE_AUTHORIZATION_HEADER="Bearer p36W1PUoYmv1mOzeFA9CJg=="
SUPPORT_VECTOR_SEARCH_SERVICE_HASURA_CONNECTOR_PORT=6633
SUPPORT_VECTOR_SEARCH_SERVICE_HASURA_CONNECTOR_PORT=6143
SUPPORT_VECTOR_SEARCH_SERVICE_HASURA_SERVICE_TOKEN_SECRET="p36W1PUoYmv1mOzeFA9CJg=="
SUPPORT_VECTOR_SEARCH_SERVICE_OPENAI_API_KEY="FILLME"
SUPPORT_VECTOR_SEARCH_SERVICE_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
SUPPORT_VECTOR_SEARCH_SERVICE_OTEL_SERVICE_NAME="support_vector_search_service"
SUPPORT_VECTOR_SEARCH_SERVICE_READ_URL="http://local.hasura.dev:6633"
SUPPORT_VECTOR_SEARCH_SERVICE_WRITE_URL="http://local.hasura.dev:6633"
SUPPORT_VECTOR_SEARCH_SERVICE_READ_URL="http://local.hasura.dev:6143"
SUPPORT_VECTOR_SEARCH_SERVICE_WRITE_URL="http://local.hasura.dev:6143"
SUPPORT_VECTOR_SEARCH_SERVICE_GQL_URL="FILLME"
SUPPORT_VECTOR_WRITE_URL="http://local.hasura.dev:8848"
SUPPORT_VECTOR_WRITE_URL="http://local.hasura.dev:6755"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM ghcr.io/hasura/ndc-postgres-jdbc:v1.2.6
COPY ./ /etc/connector
Original file line number Diff line number Diff line change
@@ -1,16 +1,65 @@
version: v2
ndcSpecGeneration: v0.2
packagingDefinition:
type: PrebuiltDockerImage
dockerImage: ghcr.io/hasura/ndc-postgres:v1.1.1
dockerImage: ghcr.io/hasura/ndc-postgres-jdbc:v1.2.6
supportedEnvironmentVariables:
- name: CONNECTION_URI
description: The PostgreSQL connection URI
defaultValue: postgresql://read_only_user:readonlyuser@35.236.11.122:5432/v3-docs-sample-app
- name: JDBC_URL
description: The JDBC URL to connect to the database
- name: JDBC_SCHEMAS
description: A comma-separated list of schemas to include in the metadata
commands:
update: hasura-ndc-postgres update
update:
type: Dockerized
dockerImage: ghcr.io/hasura/ndc-postgres-jdbc-cli:v1.2.6
commandArgs:
- update
- --jdbc-url
- JDBC_URL
- --schemas
- $JDBC_SCHEMAS
- --outfile
- /etc/connector/configuration.json
upgradeConfiguration:
type: Dockerized
dockerImage: ghcr.io/hasura/ndc-postgres-jdbc-cli:v1.2.6
commandArgs:
- upgrade
- --config-file
- /etc/connector/configuration.json
- --outfile
- /etc/connector/configuration.json
cliPlugin:
name: ndc-postgres
version: v1.1.1
dockerComposeWatch:
- path: ./
target: /etc/connector
action: sync+restart
type: Docker
dockerImage: ghcr.io/hasura/ndc-postgres-jdbc-cli:v1.2.6
dockerComposeWatch: []
nativeToolchainDefinition:
commands:
start:
type: ShellScript
bash: |
#!/usr/bin/env bash
set -eu -o pipefail
HASURA_CONFIGURATION_DIRECTORY="$HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH" \
"$HASURA_DDN_NATIVE_CONNECTOR_DIR/entrypoint.sh"
powershell: |
$ErrorActionPreference = "Stop"
$env:HASURA_CONFIGURATION_DIRECTORY="$env:HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH";
& "$env:HASURA_DDN_NATIVE_CONNECTOR_DIR\entrypoint.bat"
watch:
type: ShellScript
bash: |
#!/usr/bin/env bash
echo "Watch is not supported for this connector"
exit 1
powershell: |
Write-Output "Watch is not supported for this connector"
exit 1
update:
type: ShellScript
bash: set -e -o pipefail; "$HASURA_DDN_NATIVE_CONNECTOR_PLUGIN_DIR/entrypoint.sh" update --jdbc-url JDBC_URL --schemas $JDBC_SCHEMAS --outfile "$HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH/configuration.json"
powershell: $ErrorActionPreference = "Stop"; & "$env:HASURA_DDN_NATIVE_CONNECTOR_PLUGIN_DIR\entrypoint.bat" update --jdbc-url JDBC_URL --schemas `$env:JDBC_SCHEMAS --outfile "$env:HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH\configuration.json"
cliPluginEntrypoint:
type: ShellScript
bash: set -e -o pipefail; "$HASURA_DDN_NATIVE_CONNECTOR_PLUGIN_DIR/entrypoint.sh"
powershell: $ErrorActionPreference = "Stop"; & "$env:HASURA_DDN_NATIVE_CONNECTOR_PLUGIN_DIR/entrypoint.bat"
20 changes: 5 additions & 15 deletions hasura/industry/telco/auth/connector/auth/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,13 @@ services:
auth_auth:
build:
context: .
dockerfile_inline: |-
FROM ghcr.io/hasura/ndc-postgres:v1.1.1
COPY ./ /etc/connector
develop:
watch:
- path: ./
action: sync+restart
target: /etc/connector
dockerfile: .hasura-connector/Dockerfile.auth
environment:
CONNECTION_URI: $AUTH_AUTH_CONNECTION_URI
HASURA_SERVICE_TOKEN_SECRET: $AUTH_AUTH_HASURA_SERVICE_TOKEN_SECRET
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: $AUTH_AUTH_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
JDBC_URL: $AUTH_AUTH_JDBC_URL
OTEL_EXPORTER_OTLP_ENDPOINT: $AUTH_AUTH_OTEL_EXPORTER_OTLP_ENDPOINT
OTEL_SERVICE_NAME: $AUTH_AUTH_OTEL_SERVICE_NAME
extra_hosts:
- local.hasura.dev=host-gateway
- local.hasura.dev:host-gateway
ports:
- mode: ingress
target: 8080
published: "6460"
protocol: tcp
- 4444:8080
Loading