这是indexloc提供的服务,不要输入任何密码
Skip to content

Extend mock provider to support extra node capacity settings and providerID #1087

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

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

JackieLan
Copy link
Contributor

@JackieLan JackieLan commented Mar 15, 2023

Extend mock provider to support advance capacity settings such as hugepage, SRIOV resources and providerID.

Fixes: #1086

How Has This Been Tested?

  • Test mock provider with huge page, SRIOV resources and providerID.
    Use the following provider configuration file:
    {
      "vkubelet-mock-0": {
        "cpu": "18",
        "memory": "80Gi",
        "others": {
          "hugepages-1Gi": "24Gi",
          "hugepages-2Mi": "1024Mi",
          "intel.com/sriov-igb-uio": "3",
          "intel.com/sriov-vfio-pci": "4"
        },
        "providerID": "mock://4218ae82-4789-afeb-b767-19948fd69eb3"
      }
    }

Run virtual-kubelet using the above configuration file and finally the mock node has the corresponding capacity and providerID.

[ ~/vk ]# kubectl describe node vkubelet-mock-0
...
Capacity:
  cpu:                          18
  hugepages-1Gi:                24Gi
  hugepages-2Mi:                1Gi
  intel.com/sriov-igb-uio:      3
  intel.com/sriov-vfio-pci:     4 
  memory:                       80Gi
  pods:                         20
Allocatable:
  cpu:                          18
  hugepages-1Gi:                24Gi
  hugepages-2Mi:                1Gi
  intel.com/sriov-igb-uio:      3
  intel.com/sriov-vfio-pci:     4 
  memory:                       80Gi
  pods:                         20
...
PodCIDR:                      100.96.6.0/24
PodCIDRs:                     100.96.6.0/24
ProviderID:                   mock://4218ae82-4789-afeb-b767-19948fd69eb3
...

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 15, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: JackieLan / name: Jackie Lan (403c456)

Copy link
Member

@pires pires left a comment

Choose a reason for hiding this comment

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

LGTM

@pires pires enabled auto-merge (rebase) March 28, 2023 11:42
@pires
Copy link
Member

pires commented Mar 28, 2023

Thank you for your contribution.

@pires pires merged commit b7030b9 into virtual-kubelet:master Mar 28, 2023
@helayoty helayoty added this to the v1.9 milestone Apr 6, 2023
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.

Support more capacity limit settings and providerID in mock provider
3 participants