slime-io/slime

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:

MouceL commented

没看到 hello-admin-go 侧envoy 兜底路由相关信息

是缺少了什么配置导致的错误,还是需要我提供这部分信息呢

image
lazyload-69986467bc-6c954.log 日志中错误有问题吗

lazyload 多实例部署,开启选主的情况下,这个错误会导致lazyload功能失效。
image

造成这个错误的原因是 https://raw.githubusercontent.com/slime-io/slime/v0.8.0/install/init/deployment_slime-boot.yaml 中 ClusterRole 指定的权限不足,lazyload无法修改pod
image