Skip to content

Kubernetes v1.20 开始,K8s 默认删除了 metadata.selfLink #82

Description

@neargle

历史上我们的几处代码里,有一个有趣但不算优雅的实现:使用 selfLink 来判断 Kubernetes ApiServer 的返回是否正确。

例如 CDK( github.com/cdk-team/CDK )里 检查 "selfLink": "/api/v1/namespaces/kube-system/pods/process-exporter-qnqwk" ;

但从 Kubernetes v1.20 开始,K8s 默认删除了 metadata.selfLink 字段,需要重启 apiserver 添加 RemoveSelfLink=false 才会有 selfLink。

我还在想有没有更优雅的方式来修复这个问题,毕竟漏洞测试工具要求被测环境修改启动参数是不可能的😂 。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions