v0.8.0支持http2版本,部署lazyload后流量一直走global-sidecar
QuentinYo opened this issue · 4 comments
问题描述
影响的子模块(在下面列表中打'X')
- 配置懒加载
- 插件管理
- 智能限流
- 注册仓库
- 安装Boot
重现问题的步骤
istio版本:1.14.5
安装过程:
安装 slime-boot
export tag_or_commit=$(curl -s https://api.github.com/repos/slime-io/slime/tags | grep 'name' | cut -d\" -f4 | head -1)
k create ns mesh-operator
k apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/crds-v1.yaml"
k apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/deployment_slime-boot.yaml"
安装 lazyload
k apply -f ~/lazyload-slimeboot.yaml (文件见附件lazyload-slimeboot_yaml.txt)
验证:
`
➜ ~ k get pod -n mesh-operator
NAME READY STATUS RESTARTS AGE
global-sidecar-74bbcdb545-9s5zf 2/2 Running 0 23m
global-sidecar-74bbcdb545-lkw95 2/2 Running 0 23m
global-sidecar-74bbcdb545-p4f46 2/2 Running 0 23m
lazyload-69986467bc-6c954 1/1 Running 0 23m
lazyload-69986467bc-ffbxf 1/1 Running 0 23m
lazyload-69986467bc-lb96p 1/1 Running 0 23m
slime-boot-56c8d9bb67-jwsv9 1/1 Running 0 23m
➜ ~ k get service -n mesh-operator
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
global-sidecar ClusterIP 10.85.29.199 10255/TCP,11000/TCP,12345/TCP,18080/TCP,18081/TCP,18082/TCP,18083/TCP,21405/TCP,244/TCP,24633/TCP,3000/TCP,32/TCP,3323/TCP,444/TCP,5556/TCP,5557/TCP,80/TCP,8000/TCP,8001/TCP,8002/TCP,8003/TCP,8004/TCP,8005/TCP,8080/TCP,83/TCP,8888/TCP,9080/TCP,9090/TCP,9321/TCP,9988/TCP 3m43s
lazyload ClusterIP 10.85.31.32 80/TCP,8081/TCP,8082/TCP,16010/TCP 3m57s
lazyload-leader ClusterIP 10.85.31.144 80/TCP,8081/TCP,8082/TCP,16010/TCP 3m57s
➜ ~ k get servicefence hello-admin-go-stag -n op-stag -oyaml
apiVersion: microservice.slime.io/v1alpha1
kind: ServiceFence
metadata:
creationTimestamp: "2023-08-10T11:06:24Z"
generation: 1
labels:
app.kubernetes.io/created-by: fence-controller
managedFields:
- apiVersion: microservice.slime.io/v1alpha1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:labels:
.: {}
f:app.kubernetes.io/created-by: {}
f:spec:
.: {}
f:enable: {}
f:workloadSelector:
.: {}
f:fromService: {}
manager: manager
operation: Update
time: "2023-08-10T11:06:24Z" - apiVersion: microservice.slime.io/v1alpha1
fieldsType: FieldsV1
fieldsV1:
f:status:
.: {}
f:domains: {}
manager: manager
operation: Update
subresource: status
time: "2023-08-10T11:06:24Z"
name: hello-admin-go-stag
namespace: op-stag
resourceVersion: "485735223"
selfLink: /apis/microservice.slime.io/v1alpha1/namespaces/op-stag/servicefences/hello-admin-go-stag
uid: b7d92338-8543-4a7a-af4a-b9dc8503b6fa
spec:
enable: true
workloadSelector:
fromService: true
status:
domains: {}
➜ ~ k get sidecar hello-admin-go-stag -n op-stag -oyaml
apiVersion: networking.istio.io/v1beta1
kind: Sidecar
metadata:
creationTimestamp: "2023-08-10T11:06:24Z"
generation: 1
managedFields:
- apiVersion: networking.istio.io/v1alpha3
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:ownerReferences:
.: {}
k:{"uid":"b7d92338-8543-4a7a-af4a-b9dc8503b6fa"}:
.: {}
f:apiVersion: {}
f:blockOwnerDeletion: {}
f:controller: {}
f:kind: {}
f:name: {}
f:uid: {}
f:spec:
.: {}
f:egress: {}
f:workloadSelector:
.: {}
f:labels:
.: {}
f:cluster: {}
f:service: {}
manager: manager
operation: Update
time: "2023-08-10T11:06:24Z"
name: hello-admin-go-stag
namespace: op-stag
ownerReferences: - apiVersion: microservice.slime.io/v1alpha1
blockOwnerDeletion: true
controller: true
kind: ServiceFence
name: hello-admin-go-stag
uid: b7d92338-8543-4a7a-af4a-b9dc8503b6fa
resourceVersion: "7529235795"
selfLink: /apis/networking.istio.io/v1beta1/namespaces/op-stag/sidecars/hello-admin-go-stag
uid: 8d3523ca-f6ee-4c8c-b286-265c9977af64
spec:
egress: - hosts:
- istio-system/*
- mesh-operator/*
workloadSelector:
labels:
cluster: stag
service: hello-admin-go
`
其他信息(日志、configmap)见附件
lazyload-accesslog-source.configmap.log
global-sidecar-74bbcdb545-9s5zf.log
global-sidecar-74bbcdb545-lkw95.log
global-sidecar-74bbcdb545-p4f46.log
istio-proxy's log of hello-admin-go.log
lazyload-69986467bc-6c954.log
lazyload-69986467bc-ffbxf.log
lazyload-69986467bc-lb96p.log
lazyload-slimeboot_yaml.txt
没看到 hello-admin-go 侧envoy 兜底路由相关信息
是缺少了什么配置导致的错误,还是需要我提供这部分信息呢
lazyload 多实例部署,开启选主的情况下,这个错误会导致lazyload功能失效。
造成这个错误的原因是 https://raw.githubusercontent.com/slime-io/slime/v0.8.0/install/init/deployment_slime-boot.yaml 中 ClusterRole 指定的权限不足,lazyload无法修改pod