Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify k8s service account functions_2 #113

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Drun1baby
Copy link

  • 修改 k8s service account 取值的路径,通过读取 /proc/self/mountinfo,而不是原本的硬编码模式
  • 修改探测 k8s api server 未授权时的 address 获取,通过拿环境变量的方式动态获取(原本为空)
  • 由于新增了函数,auto_escape 部分逻辑也需要重新修改

Copy link
Member

@neargle neargle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neargle
Copy link
Member

neargle commented Dec 13, 2024

CI 检查没通过,说明编译报错了。
image
这几个函数跨包引用,但是却没写包名。

@neargle
Copy link
Member

neargle commented Dec 13, 2024

另外,解决编译报错的时候,可以考虑加一个逻辑:建议在取值的时候做一个判断,统一到一个入口函数,在这个函数里可以把三种方法里取出来的路径做一个判断,判断文件是否存在,如果存在就返回对应的文件路径。非必选,可作为可选需求。

@Drun1baby
Copy link
Author

好, ready to do

@Drun1baby
Copy link
Author

理论上应该把这几个函数独立写出来较好,如果后续要使用的话再复用。但是实际开发的时候发现有部分的逻辑较为混乱,后续我会梳理重构一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants