mirror of
https://github.com/alibaba/higress.git
synced 2026-05-27 06:07:27 +08:00
Add Plugin de-graphql (#303)
This commit is contained in:
61
plugins/wasm-go/extensions/de-graphql/graphql.yaml
Normal file
61
plugins/wasm-go/extensions/de-graphql/graphql.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
apiVersion: networking.higress.io/v1
|
||||
kind: McpBridge
|
||||
metadata:
|
||||
name: default
|
||||
namespace: higress-system
|
||||
spec:
|
||||
registries:
|
||||
- domain: api.github.com
|
||||
name: github
|
||||
port: 443
|
||||
type: dns
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
higress.io/destination: github.dns
|
||||
higress.io/upstream-vhost: "api.github.com"
|
||||
higress.io/backend-protocol: HTTPS
|
||||
name: github-api
|
||||
namespace: higress-system
|
||||
spec:
|
||||
ingressClassName: higress
|
||||
rules:
|
||||
- http:
|
||||
paths:
|
||||
- backend:
|
||||
resource:
|
||||
apiGroup: networking.higress.io
|
||||
kind: McpBridge
|
||||
name: default
|
||||
path: /api
|
||||
pathType: Prefix
|
||||
---
|
||||
apiVersion: extensions.higress.io/v1alpha1
|
||||
kind: WasmPlugin
|
||||
metadata:
|
||||
name: de-graphql-github-api
|
||||
namespace: higress-system
|
||||
spec:
|
||||
defaultConfigDisable: true
|
||||
matchRules:
|
||||
- config:
|
||||
domain: api.github.com
|
||||
endpoint: /graphql
|
||||
gql: |-
|
||||
query ($owner:String! $name:String!){
|
||||
repository(owner:$owner, name:$name) {
|
||||
name
|
||||
forkCount
|
||||
description
|
||||
}
|
||||
}
|
||||
serviceName: github
|
||||
servicePort: 443
|
||||
serviceSource: dns
|
||||
timeout: 5000
|
||||
configDisable: false
|
||||
ingress:
|
||||
- github-api
|
||||
url: oci://docker.io/2456868764/de-graphql:1.0.0
|
||||
Reference in New Issue
Block a user