Repository: kubernetes-sigs/node-feature-discovery
Pull request #842 (2022-07-02 12:12:24)

nfd-topology-updater: retrieve kubelet config from API `/configz` 
Now `nfd-topology-updater` tries to retrieve `topologyManagerPolicy` of a node by reading kubelet config file. However, sometimes we use command line to start Kubelet instead of the config file, or sometimes the config file is modified but Kubelet has not restarted to make this file take effect.

I think we'd better retrieve the latest config from Kubelet API `/configz`, Kubelet will return the configuration in its memory. This config is obviously accurate.

k8s-ci-robot: Welcome @Garrybest! <br><br>It looks like this is your first PR to <a href='https://github.com/kubernetes-sigs/node-feature-discovery'>kubernetes-sigs/node-feature-discovery</a> 🎉. Please refer to our [pull request process documentation](https://git.k8s.io/community/contributors/guide/pull-requests.md) to help your PR have a smooth ride to approval. <br><br>You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. [Here is the bot commands documentation](https://go.k8s.io/bot-commands). <br><br>You can also check if kubernetes-sigs/node-feature-discovery has [its own contribution guidelines](https://github.com/kubernetes-sigs/node-feature-discovery/tree/master/CONTRIBUTING.md). <br><br>You may want to refer to our [testing guide](https://git.k8s.io/community/contributors/devel/sig-testing/testing.md) if you run into trouble with your tests not passing. <br><br>If you are having difficulty getting your pull request seen, please follow the [recommended escalation practices](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#why-is-my-pull-request-not-getting-reviewed). Also, for tips and tricks in the contribution process you may want to read the [Kubernetes contributor cheat sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet/README.md). We want to make sure your contribution gets all the attention it needs! <br><br>Thank you, and welcome to Kubernetes. :smiley:
k8s-ci-robot: Hi @Garrybest. Thanks for your PR.

I'm waiting for a [kubernetes-sigs](https://github.com/orgs/kubernetes-sigs/people) member to verify that this patch is reasonable to test. If it is, they should reply with `/ok-to-test` on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should [join the org](https://git.k8s.io/community/community-membership.md#member) to skip this step.

Once the patch is verified, the new status will be reflected by the `ok-to-test` label.

I understand the commands that are listed [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fnode-feature-discovery).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>

k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/node-feature-discovery/pull/842#" title="Author self-approved">Garrybest</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **marquiz** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @marquiz` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fnode-feature-discovery).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["marquiz"]} -->
Garrybest: cc @swatisehgal @fromanirh
Garrybest: /cc @swatisehgal @fromanirh
k8s-ci-robot: @Garrybest: GitHub didn't allow me to request PR reviews from the following users: fromanirh.

Note that only [kubernetes-sigs members](https://github.com/orgs/kubernetes-sigs/people) and repo collaborators can review this PR, and authors cannot review their own PRs.

<details>

In response to [this](https://github.com/kubernetes-sigs/node-feature-discovery/pull/842#issuecomment-1172888693):

>/cc @swatisehgal @fromanirh


Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
Garrybest: I have tested the whole deployment in my own minikube, the logs show this API would works.

```
I0702 12:03:12.757291       1 main.go:74] detected kubelet Topology Manager policy "SingleNUMANodeContainerLevel"
```
fromanirh: /cc @Tal-or 
k8s-ci-robot: @fromanirh: GitHub didn't allow me to request PR reviews from the following users: Tal-or.

Note that only [kubernetes-sigs members](https://github.com/orgs/kubernetes-sigs/people) and repo collaborators can review this PR, and authors cannot review their own PRs.

<details>

In response to [this](https://github.com/kubernetes-sigs/node-feature-discovery/pull/842#issuecomment-1173030623):

>/cc @Tal-or 


Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
fromanirh: @Tal-or 
Tal-or: There is some note in K8S docs:
https://v1-23.docs.kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/#generating-a-file-that-contains-the-current-configuration

which says:
_Caution: The kubelet's configz endpoint is there to help with debugging, and is not a stable part of kubelet behavior. Do not rely on the behavior of this endpoint for production scenarios or for use with automated tools._

This is the reason why we decided to not pursue this direction eventually.
Maybe this warning isn't relevant anymore but this is something that should be figured out.

Garrybest: > There is some note in K8S docs: https://v1-23.docs.kubernetes.io/docs/tasks/administer-cluster/reconfigure-kubelet/#generating-a-file-that-contains-the-current-configuration
> 
> which says: _Caution: The kubelet's configz endpoint is there to help with debugging, and is not a stable part of kubelet behavior. Do not rely on the behavior of this endpoint for production scenarios or for use with automated tools._
> 
> This is the reason why we decided to not pursue this direction eventually. Maybe this warning isn't relevant anymore but this is something that should be figured out.

Thanks for reminding. Now I try to use token first. If failed, we could fall back to use config file.
marquiz: /ok-to-test
k8s-ci-robot: @Garrybest: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs | 425cec97ecb226893978a61c328eca1891714fc1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs/1545363928987471872) | true | `/test pull-node-feature-discovery-verify-docs`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
marquiz: Thanks @Garrybest for the PR. I think this makes sense.

I'm sorry I didn't have the time to review the PR this week and now I'm off to summer holidays 🙄 I will be off for four weeks but will reivew this when I'm back.

I'm not entirely sure about the fallback 🧐 How about changing `-kubelet-config-file` to `-kubelet-config` and you could the give a `http://` endpoint or a `file://`pointing to a local file?
fromanirh: > I'm not entirely sure about the fallback monocle_face How about changing `-kubelet-config-file` to `-kubelet-config` and you could the give a `http://` endpoint or a `file://`pointing to a local file?

I like this idea!
k8s-ci-robot: @Garrybest: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs | 4cb324503c9ace7867cbbf80f469167fb26e43df | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs/1546038675970723840) | true | `/test pull-node-feature-discovery-verify-docs`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
Garrybest: /retest
k8s-ci-robot: @Garrybest: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs | 4cb324503c9ace7867cbbf80f469167fb26e43df | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs/1546040677895245824) | true | `/test pull-node-feature-discovery-verify-docs`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
Garrybest: Thanks @marquiz, I like this suggestion. Very cool 😄
ArangoGutierrez: PING - How are we going with this PR, will be nice to have it as part of 0.12
Garrybest: cc @marquiz, could you please take a look here?
k8s-ci-robot: @Garrybest: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-master | 4fc17ada0b377c9404bc8779c32a1ccc58cbcca2 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-master/1571938921313472512) | true | `/test pull-node-feature-discovery-verify-master`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/node-feature-discovery/pull/842#" title="Author self-approved">Garrybest</a>*
**Once this PR has been reviewed and has the lgtm label**, please assign marquiz for approval by writing `/assign @marquiz` in a comment. For more information see:[The Kubernetes Code Review Process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process).

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fnode-feature-discovery).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["marquiz"]} -->
k8s-ci-robot: @Garrybest: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-build-image-cross-generic | 4fc17ada0b377c9404bc8779c32a1ccc58cbcca2 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-build-image-cross-generic/1571938921242169344) | true | `/test pull-node-feature-discovery-build-image-cross-generic`
pull-node-feature-discovery-verify-master | fec77716ef855770f9889d50e33c126cad4369d4 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-master/1572039667858018304) | true | `/test pull-node-feature-discovery-verify-master`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @Garrybest: PR needs rebase.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
marquiz: ping @Garrybest are you still working on this?
Garrybest: Sorry, I'm too busy recently. I will keep working on this ASAP.
netlify[bot]: ### <span aria-hidden="true">👷</span> Deploy Preview for *kubernetes-sigs-nfd* processing.


|  Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 14e2d8cc442c57a550a0bbeaf0adb9fd1bd2a971 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/636634fddc62d800097e16eb |
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/node-feature-discovery/pull/842#" title="Author self-approved">Garrybest</a>*
**Once this PR has been reviewed and has the lgtm label**, please assign marquiz for approval by writing `/assign @marquiz` in a comment. For more information see [the Kubernetes Code Review Process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process).

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fnode-feature-discovery).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["marquiz"]} -->
k8s-ci-robot: @Garrybest: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-build-image-generic | 14e2d8cc442c57a550a0bbeaf0adb9fd1bd2a971 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-build-image-generic/1588834561075187712) | true | `/test pull-node-feature-discovery-build-image-generic`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @Garrybest: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-build-image-generic | 14e2d8cc442c57a550a0bbeaf0adb9fd1bd2a971 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-build-image-generic/1588834561075187712) | true | `/test pull-node-feature-discovery-build-image-generic`
pull-node-feature-discovery-build-image-cross-generic | 14e2d8cc442c57a550a0bbeaf0adb9fd1bd2a971 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-build-image-cross-generic/1588834561129713664) | true | `/test pull-node-feature-discovery-build-image-cross-generic`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @Garrybest: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs-master | 84106acde83a445ac42e34a7f570c31083d279e0 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs-master/1589587845750722560) | true | `/test pull-node-feature-discovery-verify-docs-master`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @Garrybest: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs-master | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs-master/1589588331669229568) | true | `/test pull-node-feature-discovery-verify-docs-master`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @Garrybest: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs-master | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs-master/1589588331669229568) | true | `/test pull-node-feature-discovery-verify-docs-master`
pull-node-feature-discovery-build-image-generic | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-build-image-generic/1589588331518234624) | true | `/test pull-node-feature-discovery-build-image-generic`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @Garrybest: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs-master | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs-master/1589588331669229568) | true | `/test pull-node-feature-discovery-verify-docs-master`
pull-node-feature-discovery-build-image-generic | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-build-image-generic/1589588331518234624) | true | `/test pull-node-feature-discovery-build-image-generic`
pull-node-feature-discovery-verify-master | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-master/1589588331639869440) | true | `/test pull-node-feature-discovery-verify-master`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @Garrybest: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs-master | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs-master/1589588331669229568) | true | `/test pull-node-feature-discovery-verify-docs-master`
pull-node-feature-discovery-build-image-generic | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-build-image-generic/1589588331518234624) | true | `/test pull-node-feature-discovery-build-image-generic`
pull-node-feature-discovery-verify-master | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-master/1589588331639869440) | true | `/test pull-node-feature-discovery-verify-master`
pull-node-feature-discovery-build-image-cross-generic | ed0177c8d38bab9db6cb96a458dd558058cb6640 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-build-image-cross-generic/1589588331555983360) | true | `/test pull-node-feature-discovery-build-image-cross-generic`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
Garrybest: Thanks for the suggestions!
Garrybest: /retest
Garrybest: It seems that there is something wrong with the robot 🤣
Garrybest: > I think we can merge this but I'll give some time to others chime in, too

No problem. Thanks again for your rigorous reviewing 😄
marquiz: /retest
k8s-ci-robot: @Garrybest: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs-master | 7958ac90499de99b025085bbe8e78ade49d70e3c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs-master/1589991683238400000) | true | `/test pull-node-feature-discovery-verify-docs-master`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @Garrybest: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-node-feature-discovery-verify-docs-master | 7958ac90499de99b025085bbe8e78ade49d70e3c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-docs-master/1589991683238400000) | true | `/test pull-node-feature-discovery-verify-docs-master`
pull-node-feature-discovery-verify-master | 7958ac90499de99b025085bbe8e78ade49d70e3c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_node-feature-discovery/842/pull-node-feature-discovery-verify-master/1589991300793372672) | true | `/test pull-node-feature-discovery-verify-master`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=node-feature-discovery&pr=842). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AGarrybest). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/node-feature-discovery/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
fromanirh: > Thanks for working on this and the quick responses @Garrybest blush I think we can merge this but I'll give some time to others chime in, too
> 
> There really seems to be something odd in prow... /retest

Thanks for this! I don't have additional comments.

Patch:
diff --git a/cmd/nfd-topology-updater/main.go b/cmd/nfd-topology-updater/main.go
index 0f8872ef7..bdb9b7c92 100644
--- a/cmd/nfd-topology-updater/main.go
+++ b/cmd/nfd-topology-updater/main.go
@@ -19,23 +19,27 @@ package main
 import (
 	"flag"
 	"fmt"
+	"net/url"
 	"os"
 	"time"
 
 	"k8s.io/klog/v2"
+	kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1"
 
-	"sigs.k8s.io/node-feature-discovery/pkg/kubeconf"
+	nfdclient "sigs.k8s.io/node-feature-discovery/pkg/nfd-client"
 	topology "sigs.k8s.io/node-feature-discovery/pkg/nfd-client/topology-updater"
 	"sigs.k8s.io/node-feature-discovery/pkg/resourcemonitor"
 	"sigs.k8s.io/node-feature-discovery/pkg/topologypolicy"
 	"sigs.k8s.io/node-feature-discovery/pkg/utils"
 	"sigs.k8s.io/node-feature-discovery/pkg/utils/hostpath"
+	"sigs.k8s.io/node-feature-discovery/pkg/utils/kubeconf"
 	"sigs.k8s.io/node-feature-discovery/pkg/version"
 )
 
 const (
 	// ProgramName is the canonical name of this program
-	ProgramName = "nfd-topology-updater"
+	ProgramName       = "nfd-topology-updater"
+	kubeletSecurePort = 10250
 )
 
 func main() {
@@ -58,10 +62,33 @@ func main() {
 	// Plug klog into grpc logging infrastructure
 	utils.ConfigureGrpcKlog()
 
-	klConfig, err := kubeconf.GetKubeletConfigFromLocalFile(resourcemonitorArgs.KubeletConfigFile)
+	u, err := url.ParseRequestURI(resourcemonitorArgs.KubeletConfigURI)
 	if err != nil {
-		klog.Exitf("error reading kubelet config: %v", err)
+		klog.Exitf("failed to parse args for kubelet-config-uri: %v", err)
 	}
+
+	// init kubelet API client
+	var klConfig *kubeletconfigv1beta1.KubeletConfiguration
+	switch u.Scheme {
+	case "file":
+		klConfig, err = kubeconf.GetKubeletConfigFromLocalFile(u.Path)
+		if err != nil {
+			klog.Exitf("failed to read kubelet config: %v", err)
+		}
+	case "https":
+		restConfig, err := kubeconf.InsecureConfig(u.String(), resourcemonitorArgs.APIAuthTokenFile)
+		if err != nil {
+			klog.Exitf("failed to initialize rest config for kubelet config uri: %v", err)
+		}
+
+		klConfig, err = kubeconf.GetKubeletConfiguration(restConfig)
+		if err != nil {
+			klog.Exitf("failed to get kubelet config from configz endpoint: %v", err)
+		}
+	default:
+		klog.Exitf("unsupported URI scheme: %v", u.Scheme)
+	}
+
 	tmPolicy := string(topologypolicy.DetectTopologyPolicy(klConfig.TopologyManagerPolicy, klConfig.TopologyManagerScope))
 	klog.Infof("detected kubelet Topology Manager policy %q", tmPolicy)
 
@@ -86,6 +113,15 @@ func parseArgs(flags *flag.FlagSet, osArgs ...string) (*topology.Args, *resource
 		os.Exit(2)
 	}
 
+	if len(resourcemonitorArgs.KubeletConfigURI) == 0 {
+		if len(nfdclient.NodeName()) == 0 {
+			fmt.Fprintf(flags.Output(), "unable to determine the default kubelet config endpoint 'https://${NODE_NAME}:%d/configz' due to empty NODE_NAME environment, "+
+				"please either define the NODE_NAME environment variable or specify endpoint with the -kubelet-config-uri flag\n", kubeletSecurePort)
+			os.Exit(1)
+		}
+		resourcemonitorArgs.KubeletConfigURI = fmt.Sprintf("https://%s:%d/configz", nfdclient.NodeName(), kubeletSecurePort)
+	}
+
 	return args, resourcemonitorArgs
 }
 
@@ -109,8 +145,10 @@ func initFlags(flagset *flag.FlagSet) (*topology.Args, *resourcemonitor.Args) {
 		"Time to sleep between CR updates. Non-positive value implies no CR updatation (i.e. infinite sleep). [Default: 60s]")
 	flagset.StringVar(&resourcemonitorArgs.Namespace, "watch-namespace", "*",
 		"Namespace to watch pods (for testing/debugging purpose). Use * for all namespaces.")
-	flagset.StringVar(&resourcemonitorArgs.KubeletConfigFile, "kubelet-config-file", hostpath.VarDir.Path("lib/kubelet/config.yaml"),
-		"Kubelet config file path.")
+	flagset.StringVar(&resourcemonitorArgs.KubeletConfigURI, "kubelet-config-uri", "",
+		"Kubelet config URI path. Default to kubelet configz endpoint.")
+	flagset.StringVar(&resourcemonitorArgs.APIAuthTokenFile, "api-auth-token-file", "/var/run/secrets/kubernetes.io/serviceaccount/token",
+		"API auth token file path. It is used to request kubelet configz endpoint, only takes effect when kubelet-config-uri is https. Default to /var/run/secrets/kubernetes.io/serviceaccount/token.")
 	flagset.StringVar(&resourcemonitorArgs.PodResourceSocketPath, "podresources-socket", hostpath.VarDir.Path("lib/kubelet/pod-resources/kubelet.sock"),
 		"Pod Resource Socket path to use.")
 	flagset.StringVar(&args.Server, "server", "localhost:8080",
diff --git a/deployment/base/rbac-topologyupdater/topologyupdater-clusterrole.yaml b/deployment/base/rbac-topologyupdater/topologyupdater-clusterrole.yaml
index 35de71b10..1719edbe0 100644
--- a/deployment/base/rbac-topologyupdater/topologyupdater-clusterrole.yaml
+++ b/deployment/base/rbac-topologyupdater/topologyupdater-clusterrole.yaml
@@ -10,6 +10,12 @@ rules:
   verbs:
   - get
   - list
+- apiGroups:
+  - ""
+  resources:
+  - nodes/proxy
+  verbs:
+  - get
 - apiGroups:
   - ""
   resources:
diff --git a/deployment/components/topology-updater/topologyupdater-mounts.yaml b/deployment/components/topology-updater/topologyupdater-mounts.yaml
index c792c99e9..89f1c2e5e 100644
--- a/deployment/components/topology-updater/topologyupdater-mounts.yaml
+++ b/deployment/components/topology-updater/topologyupdater-mounts.yaml
@@ -21,10 +21,6 @@
   - name: host-sys
     mountPath: /host-sys
 
-- op: add
-  path: /spec/template/spec/containers/0/args/-
-  value: "-kubelet-config-file=/host-var/lib/kubelet/config.yaml"
-
 - op: add
   path: /spec/template/spec/containers/0/args/-
   value: "-podresources-socket=/host-var/lib/kubelet/pod-resources/kubelet.sock"
diff --git a/deployment/helm/node-feature-discovery/templates/clusterrole.yaml b/deployment/helm/node-feature-discovery/templates/clusterrole.yaml
index 36a12ecbe..587a5a955 100644
--- a/deployment/helm/node-feature-discovery/templates/clusterrole.yaml
+++ b/deployment/helm/node-feature-discovery/templates/clusterrole.yaml
@@ -18,6 +18,12 @@ rules:
   - patch
   - update
   - list
+- apiGroups:
+    - ""
+  resources:
+    - nodes/proxy
+  verbs:
+    - get
 - apiGroups:
   - nfd.k8s-sigs.io
   resources:
diff --git a/docs/reference/topology-updater-commandline-reference.md b/docs/reference/topology-updater-commandline-reference.md
index e872e8d85..742d36c66 100644
--- a/docs/reference/topology-updater-commandline-reference.md
+++ b/docs/reference/topology-updater-commandline-reference.md
@@ -169,17 +169,33 @@ Example:
 nfd-topology-updater -watch-namespace=rte
 ```
 
-### -kubelet-config-file
+### -kubelet-config-uri
 
-The `-kubelet-config-file` specifies the path to the Kubelet's configuration
-file.
+The `-kubelet-config-uri` specifies the path to the Kubelet's configuration.
+Note that the URi could either be a local host file or an HTTP endpoint.
 
-Default:  /host-var/lib/kubelet/config.yaml
+Default:  `https://${NODE_NAME}:10250/configz`
 
 Example:
 
 ```bash
-nfd-topology-updater -kubelet-config-file=/var/lib/kubelet/config.yaml
+nfd-topology-updater -kubelet-config-uri=file:///var/lib/kubelet/config.yaml
+```
+
+### -api-auth-token-file
+
+The `-api-auth-token-file` specifies the path to the api auth token file
+which is used to retrieve Kubelet's configuration from Kubelet secure port,
+only taking effect when `-kubelet-config-uri` is https.
+Note that this token file must bind to a role that has the `get` capability to
+`nodes/proxy` resources.
+
+Default:  `/var/run/secrets/kubernetes.io/serviceaccount/token`
+
+Example:
+
+```bash
+nfd-topology-updater -token-file=/var/run/secrets/kubernetes.io/serviceaccount/token
 ```
 
 ### -podresources-socket
diff --git a/pkg/resourcemonitor/types.go b/pkg/resourcemonitor/types.go
index b288ef8c7..5b0a4c5fe 100644
--- a/pkg/resourcemonitor/types.go
+++ b/pkg/resourcemonitor/types.go
@@ -29,7 +29,8 @@ type Args struct {
 	PodResourceSocketPath string
 	SleepInterval         time.Duration
 	Namespace             string
-	KubeletConfigFile     string
+	KubeletConfigURI      string
+	APIAuthTokenFile      string
 }
 
 // ResourceInfo stores information of resources and their corresponding IDs obtained from PodResource API
diff --git a/pkg/utils/kubeconf/kubelet_configz.go b/pkg/utils/kubeconf/kubelet_configz.go
new file mode 100644
index 000000000..a7791f5de
--- /dev/null
+++ b/pkg/utils/kubeconf/kubelet_configz.go
@@ -0,0 +1,83 @@
+/*
+Copyright 2022 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package kubeconf
+
+import (
+	"context"
+	"encoding/json"
+	"fmt"
+	"os"
+	"time"
+
+	"k8s.io/client-go/discovery"
+	"k8s.io/client-go/rest"
+	kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1"
+)
+
+// GetKubeletConfiguration returns the kubelet configuration.
+func GetKubeletConfiguration(restConfig *rest.Config) (*kubeletconfigv1beta1.KubeletConfiguration, error) {
+	discoveryClient, err := discovery.NewDiscoveryClientForConfig(restConfig)
+	if err != nil {
+		return nil, err
+	}
+
+	var timeout time.Duration
+	// This hack because /configz reports the following structure:
+	// {"kubeletconfig": {the JSON representation of kubeletconfigv1beta1.KubeletConfiguration}}
+	type configzWrapper struct {
+		ComponentConfig kubeletconfigv1beta1.KubeletConfiguration `json:"kubeletconfig"`
+	}
+	bytes, err := discoveryClient.RESTClient().
+		Get().
+		Timeout(timeout).
+		Do(context.TODO()).
+		Raw()
+	if err != nil {
+		return nil, err
+	}
+
+	configz := configzWrapper{}
+	if err = json.Unmarshal(bytes, &configz); err != nil {
+		return nil, fmt.Errorf("failed to unmarshal json for kubelet config: %w", err)
+	}
+
+	return &configz.ComponentConfig, nil
+}
+
+// InsecureConfig returns a kubelet API config object which uses the token path.
+func InsecureConfig(host, tokenFile string) (*rest.Config, error) {
+	if tokenFile == "" {
+		return nil, fmt.Errorf("api auth token file must be defined")
+	}
+	if len(host) == 0 {
+		return nil, fmt.Errorf("kubelet host must be defined")
+	}
+
+	token, err := os.ReadFile(tokenFile)
+	if err != nil {
+		return nil, err
+	}
+
+	tlsClientConfig := rest.TLSClientConfig{Insecure: true}
+
+	return &rest.Config{
+		Host:            host,
+		TLSClientConfig: tlsClientConfig,
+		BearerToken:     string(token),
+		BearerTokenFile: tokenFile,
+	}, nil
+}
diff --git a/source/cpu/cpuid_arm.go b/source/cpu/cpuid_arm.go
index e01071f00..214986a21 100644
--- a/source/cpu/cpuid_arm.go
+++ b/source/cpu/cpuid_arm.go
@@ -18,13 +18,11 @@ package cpu
 
 /*
 #include <sys/auxv.h>
+#define HWCAP_CPUID	(1 << 11)
 
 unsigned long gethwcap() {
 	return getauxval(AT_HWCAP);
 }
-unsigned long gethwcap2() {
-	return getauxval(AT_HWCAP2);
-}
 */
 import "C"
 
@@ -53,17 +51,15 @@ const (
 	CPU_ARM_FEATURE_VFPv4
 	CPU_ARM_FEATURE_IDIVA
 	CPU_ARM_FEATURE_IDIVT
+	CPU_ARM_FEATURE_IDIV
 	CPU_ARM_FEATURE_VFPD32
 	CPU_ARM_FEATURE_LPAE
 	CPU_ARM_FEATURE_EVTSTRM
-)
-
-const (
-	CPU_ARM_FEATURE2_AES = 1 << iota
-	CPU_ARM_FEATURE2_PMULL
-	CPU_ARM_FEATURE2_SHA1
-	CPU_ARM_FEATURE2_SHA2
-	CPU_ARM_FEATURE2_CRC32
+	CPU_ARM_FEATURE_AES
+	CPU_ARM_FEATURE_PMULL
+	CPU_ARM_FEATURE_SHA1
+	CPU_ARM_FEATURE_SHA2
+	CPU_ARM_FEATURE_CRC32
 )
 
 var flagNames_arm = map[uint64]string{
@@ -86,23 +82,20 @@ var flagNames_arm = map[uint64]string{
 	CPU_ARM_FEATURE_VFPv4:    "VFPv4",
 	CPU_ARM_FEATURE_IDIVA:    "IDIVA",
 	CPU_ARM_FEATURE_IDIVT:    "IDIVT",
+	CPU_ARM_FEATURE_IDIV:     "IDIV",
 	CPU_ARM_FEATURE_VFPD32:   "VFPD32",
 	CPU_ARM_FEATURE_LPAE:     "LPAE",
 	CPU_ARM_FEATURE_EVTSTRM:  "EVTSTRM",
-}
-
-var flag2Names_arm = map[uint64]string{
-	CPU_ARM_FEATURE2_AES:   "AES",
-	CPU_ARM_FEATURE2_PMULL: "PMULL",
-	CPU_ARM_FEATURE2_SHA1:  "SHA1",
-	CPU_ARM_FEATURE2_SHA2:  "SHA2",
-	CPU_ARM_FEATURE2_CRC32: "CRC32",
+	CPU_ARM_FEATURE_AES:      "AES",
+	CPU_ARM_FEATURE_PMULL:    "PMULL",
+	CPU_ARM_FEATURE_SHA1:     "SHA1",
+	CPU_ARM_FEATURE_SHA2:     "SHA2",
+	CPU_ARM_FEATURE_CRC32:    "CRC32",
 }
 
 func getCpuidFlags() []string {
 	r := make([]string, 0, 20)
 	hwcap := uint64(C.gethwcap())
-	hwcap2 := uint64(C.gethwcap2())
 	for i := uint(0); i < 64; i++ {
 		key := uint64(1 << i)
 		val, ok := flagNames_arm[key]
@@ -110,12 +103,5 @@ func getCpuidFlags() []string {
 			r = append(r, val)
 		}
 	}
-	for i := uint(0); i < 64; i++ {
-		key := uint64(1 << i)
-		val, ok := flag2Names_arm[key]
-		if hwcap2&key != 0 && ok {
-			r = append(r, val)
-		}
-	}
 	return r
 }


Test patch:
diff --git a/cmd/nfd-topology-updater/main_test.go b/cmd/nfd-topology-updater/main_test.go
index 9094bb023..e1b249808 100644
--- a/cmd/nfd-topology-updater/main_test.go
+++ b/cmd/nfd-topology-updater/main_test.go
@@ -29,33 +29,33 @@ func TestArgsParse(t *testing.T) {
 		flags := flag.NewFlagSet(ProgramName, flag.ExitOnError)
 
 		Convey("When -no-publish and -oneshot flags are passed", func() {
-			args, finderArgs := parseArgs(flags, "-oneshot", "-no-publish")
+			args, finderArgs := parseArgs(flags, "-oneshot", "-no-publish", "-kubelet-config-uri=https://%s:%d/configz")
 
 			Convey("noPublish is set and args.sources is set to the default value", func() {
 				So(args.NoPublish, ShouldBeTrue)
 				So(args.Oneshot, ShouldBeTrue)
 				So(finderArgs.SleepInterval, ShouldEqual, 60*time.Second)
-				So(finderArgs.KubeletConfigFile, ShouldEqual, "/var/lib/kubelet/config.yaml")
 				So(finderArgs.PodResourceSocketPath, ShouldEqual, "/var/lib/kubelet/pod-resources/kubelet.sock")
 			})
 		})
 
-		Convey("When valid args are specified for -kubelet-config-file and -sleep-interval,", func() {
+		Convey("When valid args are specified for -kubelet-config-url and -sleep-interval,", func() {
 			args, finderArgs := parseArgs(flags,
-				"-kubelet-config-file=/path/testconfig.yaml",
+				"-kubelet-config-uri=file:///path/testconfig.yaml",
 				"-sleep-interval=30s")
 
 			Convey("args.sources is set to appropriate values", func() {
 				So(args.NoPublish, ShouldBeFalse)
 				So(args.Oneshot, ShouldBeFalse)
 				So(finderArgs.SleepInterval, ShouldEqual, 30*time.Second)
-				So(finderArgs.KubeletConfigFile, ShouldEqual, "/path/testconfig.yaml")
+				So(finderArgs.KubeletConfigURI, ShouldEqual, "file:///path/testconfig.yaml")
 				So(finderArgs.PodResourceSocketPath, ShouldEqual, "/var/lib/kubelet/pod-resources/kubelet.sock")
 			})
 		})
 
 		Convey("When valid args are specified for -podresources-socket flag and -sleep-interval is specified", func() {
 			args, finderArgs := parseArgs(flags,
+				"-kubelet-config-uri=https://%s:%d/configz",
 				"-podresources-socket=/path/testkubelet.sock",
 				"-sleep-interval=30s")
 
@@ -63,19 +63,18 @@ func TestArgsParse(t *testing.T) {
 				So(args.NoPublish, ShouldBeFalse)
 				So(args.Oneshot, ShouldBeFalse)
 				So(finderArgs.SleepInterval, ShouldEqual, 30*time.Second)
-				So(finderArgs.KubeletConfigFile, ShouldEqual, "/var/lib/kubelet/config.yaml")
 				So(finderArgs.PodResourceSocketPath, ShouldEqual, "/path/testkubelet.sock")
 			})
 		})
 		Convey("When valid -sleep-inteval is specified", func() {
 			args, finderArgs := parseArgs(flags,
+				"-kubelet-config-uri=https://%s:%d/configz",
 				"-sleep-interval=30s")
 
 			Convey("args.sources is set to appropriate values", func() {
 				So(args.NoPublish, ShouldBeFalse)
 				So(args.Oneshot, ShouldBeFalse)
 				So(finderArgs.SleepInterval, ShouldEqual, 30*time.Second)
-				So(finderArgs.KubeletConfigFile, ShouldEqual, "/var/lib/kubelet/config.yaml")
 				So(finderArgs.PodResourceSocketPath, ShouldEqual, "/var/lib/kubelet/pod-resources/kubelet.sock")
 			})
 		})
@@ -84,7 +83,7 @@ func TestArgsParse(t *testing.T) {
 			args, finderArgs := parseArgs(flags,
 				"-no-publish",
 				"-sleep-interval=30s",
-				"-kubelet-config-file=/path/testconfig.yaml",
+				"-kubelet-config-uri=file:///path/testconfig.yaml",
 				"-podresources-socket=/path/testkubelet.sock",
 				"-ca-file=ca",
 				"-cert-file=crt",
@@ -96,7 +95,7 @@ func TestArgsParse(t *testing.T) {
 				So(args.CertFile, ShouldEqual, "crt")
 				So(args.KeyFile, ShouldEqual, "key")
 				So(finderArgs.SleepInterval, ShouldEqual, 30*time.Second)
-				So(finderArgs.KubeletConfigFile, ShouldEqual, "/path/testconfig.yaml")
+				So(finderArgs.KubeletConfigURI, ShouldEqual, "file:///path/testconfig.yaml")
 				So(finderArgs.PodResourceSocketPath, ShouldEqual, "/path/testkubelet.sock")
 			})
 		})
diff --git a/pkg/kubeconf/kubelet_config_file.go b/pkg/utils/kubeconf/kubelet_config_file.go
similarity index 100%
rename from pkg/kubeconf/kubelet_config_file.go
rename to pkg/utils/kubeconf/kubelet_config_file.go
diff --git a/pkg/kubeconf/kubelet_config_file_test.go b/pkg/utils/kubeconf/kubelet_config_file_test.go
similarity index 93%
rename from pkg/kubeconf/kubelet_config_file_test.go
rename to pkg/utils/kubeconf/kubelet_config_file_test.go
index e2891a4a0..622056117 100644
--- a/pkg/kubeconf/kubelet_config_file_test.go
+++ b/pkg/utils/kubeconf/kubelet_config_file_test.go
@@ -29,7 +29,7 @@ type testCaseData struct {
 func TestGetKubeletConfigFromLocalFile(t *testing.T) {
 	tCases := []testCaseData{
 		{
-			path:     filepath.Join("..", "..", "test", "data", "kubeletconf.yaml"),
+			path:     filepath.Join("..", "..", "..", "test", "data", "kubeletconf.yaml"),
 			tmPolicy: "single-numa-node",
 		},
 	}