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

Skip Huawei labels when NFD patches a default namespace #2

Open
wants to merge 1 commit into
base: v0.14.2-es
Choose a base branch
from

Conversation

taenzeyang
Copy link

改动说明
在NFD执行对不含namespace的标签打上默认前缀时,跳过华为相关的标签
添加了自动对带有华为设备的节点打上相关标签的nodefeaturerules,此功能可以在values.yaml里关闭

- name: "ascend/atlas-800t-a2"
labels:
"host-arch": "huawei-arm"
"accelerator": "huawei-Ascend910"

Choose a reason for hiding this comment

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

node-role.kubernetes.io/worker=worker
workerselector=dls-worker-node
host-arch=huawei-arm或host-arch=huawei-x86
accelerator=huawei-Ascend910
需要以上四个标签

Copy link
Author

Choose a reason for hiding this comment

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

Done

// containsHW returns true if the label contains Huawei's keys
func containsHW(src string) bool {
keys := []string{
"accelerator",

Choose a reason for hiding this comment

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

通过配置文件或者环境变量获取

Copy link
Author

@taenzeyang taenzeyang May 28, 2024

Choose a reason for hiding this comment

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

@yakiduck 华为标签基本长期固定,另外nfd在operator中目前尚未开启可配置功能,所以暂时还是硬编码,补全了所有可能的key

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