rainbond icon indicating copy to clipboard operation
rainbond copied to clipboard

如何打开rbd-gateway内的nginx的access_log

Open Libertad-904483782 opened this issue 10 months ago • 3 comments

碰到了一些ingress访问的问题,需要能打开特定域名的access log,发现页面上的网关配置中,没有关于日志的选项,直接修改ingress加注解会被刷掉。请教下,有办法打开吗

Libertad-904483782 avatar Apr 15 '24 07:04 Libertad-904483782

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: How to open the access_log of nginx in rbd-gateway

I encountered some ingress access problems. I needed to be able to open the access log of a specific domain name. I found that in the gateway configuration on the page, there was no log option. If I directly modify the ingress and add annotations, it would be erased. Please tell me, is there any way to open it?

Issues-translate-bot avatar Apr 15 '24 07:04 Issues-translate-bot

@Libertad-904483782

kubectl edit rbdcomponent rbd-gateway -n rbd-system

spec:
  args:
  - --access-log=/dev/stdout

zzzhangqi avatar Apr 15 '24 08:04 zzzhangqi

https://github.com/goodrain/rainbond/blob/f0d3a471eb2ec23c269bddec0c4417b494568dff/cmd/gateway/option/option.go#L107 对应这个参数。你可以参考如下方式设置。

  1. 编辑 rbd-gateway 的 crd 资源。
kubectl edit rbdcomponent rbd-gateway -nrbd-system
  1. 增加上面的 access-log 参数,如下所示
apiVersion: rainbond.io/v1alpha1
kind: RbdComponent
metadata:
  name: rbd-gateway
  namespace: rbd-system
spec:
  args:
  - --access-log=/logs/access.log
  image: registry.cn-hangzhou.aliyuncs.com/goodrain/rbd-gateway:v5.17.0-release
  1. 上面的 access-log 定义的地址,就是accesslog文件。进入 rbd-gateway 容器下该路径查看即可。

yangkaa avatar Apr 15 '24 08:04 yangkaa

由于这个issue已经有一段时间没有更新,我打算关闭它以保持项目的整洁。如果您在未来还有任何问题或需要进一步的帮助,请随时重新打开此issue或创建一个新的issue。

ZhangSetSail avatar Jun 06 '24 01:06 ZhangSetSail

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Since this issue hasn't been updated in a while, I'm going to close it to keep the project tidy. If you have any questions or need further assistance in the future, please feel free to reopen this issue or create a new one.

Issues-translate-bot avatar Jun 06 '24 01:06 Issues-translate-bot