webkubectl icon indicating copy to clipboard operation
webkubectl copied to clipboard

使用redis缓存token不生效

Open lycnothing opened this issue 4 years ago • 6 comments

如下命令,似乎use_redis_token_cache并没生效,是设置错了么? docker run --rm --name="webkubectl" -p 8889:8080 --privileged -e GOTTY_OPTIONS="--port 8080 --permit-write --permit-arguments --use_redis_token_cache true --redis_addr x.x.x.x" kubeoperator/webkubectl:v2.8.0

lycnothing avatar Mar 25 '21 04:03 lycnothing

容器日志里有报错么?

liqiang-fit2cloud avatar Mar 25 '21 06:03 liqiang-fit2cloud

容器日志里有报错么?

没有,去掉redis_addr也没报“redis addr must not be null”,

lycnothing avatar Mar 25 '21 07:03 lycnothing

容器日志里有报错么?

没有,去掉redis_addr也没报“redis addr must not be null”,

日志如下: docker run --rm --name="webkubectl" -p 8889:8080 --privileged -e GOTTY_OPTIONS="--port 8081 --permit-write --permit-arguments --use_redis_token_cache true --redis_addr x.x.x.x:6379" kubeoperator/webkubectl:v2.8.0
Environment variables: GOTTY_OPTIONS=--port 8081 --permit-write --permit-arguments --use_redis_token_cache true --redis_addr x.x.x.x:6379 HOSTNAME=6ef5e269e4fe WELCOME_BANNER=Welcome to Web Kubectl, try kubectl --help. PWD=/ HOME=/root SHLVL=1 KUBECTL_INSECURE_SKIP_TLS_VERIFY=true SESSION_STORAGE_SIZE=10M PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin KUBECTL_VERSION=v1.20.2 _=/usr/bin/env 2021/03/25 03:43:58 Welcome to use webkubectl. 2021/03/25 03:43:58 GoTTY is starting with command: /opt/webkubectl/start-session.sh 2021/03/25 03:43:58 Permitting clients to write input to the PTY. 2021/03/25 03:43:58 HTTP server is listening at: http://:::8081

lycnothing avatar Mar 25 '21 07:03 lycnothing

已经重现问题,正在尝试修复。

liqiang-fit2cloud avatar Mar 25 '21 09:03 liqiang-fit2cloud

Hi, 请试试最新的2.9.0版本。https://github.com/KubeOperator/webkubectl/releases/tag/2.9.0 image

直接用环境变量就可以: docker run --name="webkubectl" -p 8080:8080 -e GOTTY_USE_REDIS_TOKEN_CACHE=true -e GOTTY_REDIS_ADDR=10.1.10.56:6379 -d --privileged kubeoperator/webkubectl:v2.9.0 用GOTTY_OPTIONS也可以: docker run --rm --name="webkubectl" -p 8889:8080 --privileged -e GOTTY_OPTIONS="--port 8080 --permit-write --permit-arguments --use-redis-token-cache true --redis-addr 10.1.10.56:6379" kubeoperator/webkubectl:v2.9.0 其中,redis-addr是ip:port。

liqiang-fit2cloud avatar Mar 25 '21 12:03 liqiang-fit2cloud

Hi, 请试试最新的2.9.0版本。https://github.com/KubeOperator/webkubectl/releases/tag/2.9.0 image

直接用环境变量就可以: docker run --name="webkubectl" -p 8080:8080 -e GOTTY_USE_REDIS_TOKEN_CACHE=true -e GOTTY_REDIS_ADDR=10.1.10.56:6379 -d --privileged kubeoperator/webkubectl:v2.9.0 用GOTTY_OPTIONS也可以: docker run --rm --name="webkubectl" -p 8889:8080 --privileged -e GOTTY_OPTIONS="--port 8080 --permit-write --permit-arguments --use-redis-token-cache true --redis-addr 10.1.10.56:6379" kubeoperator/webkubectl:v2.9.0 其中,redis-addr是ip:port。

嗯,可以了~

lycnothing avatar Mar 26 '21 01:03 lycnothing