modify k8s service account functions_2#113
Open
Drun1baby wants to merge 5 commits intocdk-team:mainfrom
Open
Conversation
Drun1baby
commented
Dec 12, 2024
- 修改 k8s service account 取值的路径,通过读取 /proc/self/mountinfo,而不是原本的硬编码模式
- 修改探测 k8s api server 未授权时的 address 获取,通过拿环境变量的方式动态获取(原本为空)
- 由于新增了函数,auto_escape 部分逻辑也需要重新修改
Member
Member
|
另外,解决编译报错的时候,可以考虑加一个逻辑:建议在取值的时候做一个判断,统一到一个入口函数,在这个函数里可以把三种方法里取出来的路径做一个判断,判断文件是否存在,如果存在就返回对应的文件路径。非必选,可作为可选需求。 |
Author
|
好, ready to do |
Author
|
理论上应该把这几个函数独立写出来较好,如果后续要使用的话再复用。但是实际开发的时候发现有部分的逻辑较为混乱,后续我会梳理重构一下 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
