MCP server
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
apiVersion: configuration.konghq.com/v1
|
||||
kind: KongPlugin
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-audit-log
|
||||
namespace: ${NAMESPACE}
|
||||
plugin: http-log
|
||||
config:
|
||||
http_endpoint: ${AUDIT_LOG_ENDPOINT}
|
||||
method: POST
|
||||
content_type: application/json
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: configuration.konghq.com/v1
|
||||
kind: KongPlugin
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-openid-connect
|
||||
namespace: ${NAMESPACE}
|
||||
plugin: openid-connect
|
||||
config:
|
||||
issuer: ${OIDC_ISSUER}
|
||||
audience_required: ${BACKEND_AUDIENCE}
|
||||
auth_methods:
|
||||
- bearer
|
||||
display_errors: false
|
||||
ssl_verify: true
|
||||
consumer_claims:
|
||||
- - sub
|
||||
consumer_by:
|
||||
- custom_id
|
||||
- username
|
||||
consumer_optional: true
|
||||
client_id:
|
||||
- ${TOKEN_EXCHANGE_CLIENT_ID}
|
||||
client_secret:
|
||||
- ${TOKEN_EXCHANGE_CLIENT_SECRET}
|
||||
token_exchange:
|
||||
subject_token_issuers:
|
||||
- issuer: ${OIDC_ISSUER}
|
||||
conditions: {}
|
||||
request:
|
||||
audience: ${BACKEND_AUDIENCE}
|
||||
scopes: ${BACKEND_SCOPES}
|
||||
@@ -0,0 +1,71 @@
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongPluginBinding
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-openid-connect-binding
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
controlPlaneRef:
|
||||
type: konnectNamespacedRef
|
||||
konnectNamespacedRef:
|
||||
name: ${CONTROL_PLANE_REF_NAME}
|
||||
pluginRef:
|
||||
name: ${NAME}-catalog-api-openid-connect
|
||||
targets:
|
||||
serviceRef:
|
||||
group: configuration.konghq.com
|
||||
kind: KongService
|
||||
name: ${NAME}-catalog-api
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongPluginBinding
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-rate-limiting-binding
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
controlPlaneRef:
|
||||
type: konnectNamespacedRef
|
||||
konnectNamespacedRef:
|
||||
name: ${CONTROL_PLANE_REF_NAME}
|
||||
pluginRef:
|
||||
name: ${NAME}-catalog-api-rate-limiting
|
||||
targets:
|
||||
serviceRef:
|
||||
group: configuration.konghq.com
|
||||
kind: KongService
|
||||
name: ${NAME}-catalog-api
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongPluginBinding
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-proxy-cache-binding
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
controlPlaneRef:
|
||||
type: konnectNamespacedRef
|
||||
konnectNamespacedRef:
|
||||
name: ${CONTROL_PLANE_REF_NAME}
|
||||
pluginRef:
|
||||
name: ${NAME}-catalog-api-proxy-cache
|
||||
targets:
|
||||
serviceRef:
|
||||
group: configuration.konghq.com
|
||||
kind: KongService
|
||||
name: ${NAME}-catalog-api
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongPluginBinding
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-audit-log-binding
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
controlPlaneRef:
|
||||
type: konnectNamespacedRef
|
||||
konnectNamespacedRef:
|
||||
name: ${CONTROL_PLANE_REF_NAME}
|
||||
pluginRef:
|
||||
name: ${NAME}-catalog-api-audit-log
|
||||
targets:
|
||||
serviceRef:
|
||||
group: configuration.konghq.com
|
||||
kind: KongService
|
||||
name: ${NAME}-catalog-api
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: configuration.konghq.com/v1
|
||||
kind: KongPlugin
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-proxy-cache
|
||||
namespace: ${NAMESPACE}
|
||||
plugin: proxy-cache-advanced
|
||||
config:
|
||||
strategy: memory
|
||||
request_method:
|
||||
- GET
|
||||
- HEAD
|
||||
response_code:
|
||||
- 200
|
||||
content_type:
|
||||
- application/json
|
||||
cache_ttl: 60
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: configuration.konghq.com/v1
|
||||
kind: KongPlugin
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-rate-limiting
|
||||
namespace: ${NAMESPACE}
|
||||
plugin: rate-limiting-advanced
|
||||
config:
|
||||
limit:
|
||||
- ${API_RATE_LIMIT_MINUTE}
|
||||
window_size:
|
||||
- 60
|
||||
identifier: consumer
|
||||
sync_rate: -1
|
||||
strategy: local
|
||||
@@ -0,0 +1,279 @@
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-listproductlines
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_listproductlines
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- /classic-models/api/v1/productlines/
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-createproductline
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_createproductline
|
||||
methods:
|
||||
- POST
|
||||
- OPTIONS
|
||||
paths:
|
||||
- /classic-models/api/v1/productlines/
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-getproductline
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_getproductline
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/productlines/(?<productline>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-updateproductline
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_updateproductline
|
||||
methods:
|
||||
- PUT
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/productlines/(?<productline>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-patchproductline
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_patchproductline
|
||||
methods:
|
||||
- PATCH
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/productlines/(?<productline>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-deleteproductline
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_deleteproductline
|
||||
methods:
|
||||
- DELETE
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/productlines/(?<productline>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-listproductlineproducts
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_listproductlineproducts
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/productlines/(?<productline>[^#?/]+)/products/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-listproducts
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_listproducts
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- /classic-models/api/v1/products/
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-createproduct
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_createproduct
|
||||
methods:
|
||||
- POST
|
||||
- OPTIONS
|
||||
paths:
|
||||
- /classic-models/api/v1/products/
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-getproduct
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_getproduct
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/products/(?<productcode>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-updateproduct
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_updateproduct
|
||||
methods:
|
||||
- PUT
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/products/(?<productcode>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-patchproduct
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_patchproduct
|
||||
methods:
|
||||
- PATCH
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/products/(?<productcode>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-deleteproduct
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_deleteproduct
|
||||
methods:
|
||||
- DELETE
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/products/(?<productcode>[^#?/]+)/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
---
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongRoute
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api-getproductorderdetails
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
serviceRef:
|
||||
type: namespacedRef
|
||||
namespacedRef:
|
||||
name: ${NAME}-catalog-api
|
||||
name: catalog-api_getproductorderdetails
|
||||
methods:
|
||||
- GET
|
||||
- OPTIONS
|
||||
paths:
|
||||
- ~/classic-models/api/v1/products/(?<productcode>[^#?/]+)/order-details/$
|
||||
strip_path: false
|
||||
tags:
|
||||
- catalog
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: configuration.konghq.com/v1alpha1
|
||||
kind: KongService
|
||||
metadata:
|
||||
name: ${NAME}-catalog-api
|
||||
namespace: ${NAMESPACE}
|
||||
spec:
|
||||
controlPlaneRef:
|
||||
type: konnectNamespacedRef
|
||||
konnectNamespacedRef:
|
||||
name: ${CONTROL_PLANE_REF_NAME}
|
||||
name: catalog-api
|
||||
host: ${BACKEND_HOST}
|
||||
port: 8000
|
||||
protocol: http
|
||||
path: /
|
||||
tags:
|
||||
- catalog
|
||||
Reference in New Issue
Block a user