我正在尝试为我的大使 Api 网关设置 AuthService。但是在那个大使吊舱的日志中,我收到了这个错误:
<RichStatus BAD error='AuthService cannot support multiple proto values; using grpc' hostname='ambassador-9dcgs878-4dfs111' version='1.7.4'>
2021-12-03 21:33:05 diagd 1.7.4 [P94TAEW] INFO: cluster_extauth_127_0_0_1_8500_ambassador: <RichStatus BAD error='cannot merge cluster cluster_extauth_my_auth_uswest2_env1_9014_otls_no_cert_upstream_ambassador: mismatched attributes tls_context, grpc' hostname='ambassador-9dcgs878-4dfs111' version='1.7.4'>
2021-12-03 21:33:05 diagd 1.7.4 [P94TAEW] INFO: ambassador-auth.ambassador-p.1: <RichStatus BAD error='auth canary cluster_extauth_my_auth_uswest2_env1_9014_otls_no_cert_upstream_ambassador can only change service!' hostname='ambassador-9dcgs878-4dfs111' version='1.7.4'>
2021-12-03 21:33:05 diagd 1.7.4 [P94TAEW] ERROR: could not reconfigure:
我的身份验证服务:
apiVersion: getambassador.io/v2
kind: AuthService
metadata:
name: myauth
namespace: ambassador
spec:
add_auth_headers:
x-added-auth: auth-added
add_linkerd_headers: false
allowed_authorization_headers:
- x-qotm-session
allowed_request_headers:
- x-example-header
auth_service: my-auth.uswest2-env1:9014
failure_mode_allow: true
include_body:
allow_partial: true
max_bytes: 4096
path_prefix: auth/check
proto: http
status_on_error:
code: 403
timeout_ms: 5000
tls: true
仅供参考:我有两个集群,第一个集群有两个命名空间大使,大使-p。其他集群有一个具有 my-auth 服务的命名空间。我正在尝试在集群 1 的大使命名空间中部署 authService 类型,它将连接到第二个集群中的 authservice。在命名空间ambassador-p中,ambassador_id 是ambassador_p,但对于Ambassador命名空间,没有大使 ID。这就是为什么我没有在 yaml 配置中指定 Ambassador_id。因此它应该采用default。
我在ambassador-p 命名空间中尝试了同样的事情并且它有效,但它在大使命名空间中不起作用。知道我做错了什么吗?