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

feat(vmpool): Append index to ConfigMap or Secret refs #13642

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

0xFelix
Copy link
Member

@0xFelix 0xFelix commented Jan 7, 2025

What this PR does

Add options for appending a VM's index to the names of ConfigMaps or Secrets it refers to.

If enabled in the VirtualMachinePoolSpec append the index of a VM to ConfigMaps and/or Secrets the VM refers to.

Before adding a functional test for this feature change the functional tests to use label selectors in calls to List, to avoid flakes by limiting the expected list items.

This feature is part of the original VM pool design proposal but was never implemented.

See https://github.com/kubevirt/community/blob/c54eea11a2f42cbc7e411f8953cafdbfef257c90/design-proposals/vm-pool.md?plain=1#L52

Before this PR:

VMs in a VMPool are not able to receive individual configuration.

After this PR:

VMs in a VMPool are able to receive individual configuration.

Fixes kubevirt/user-guide#848

Why we need it and why it was done in this way

The following tradeoffs were made:

The following alternatives were considered:

Links to places where the discussion took place:

Special notes for your reviewer

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note

VMs in a VMPool are able to receive individual configuration through individually indexed ConfigMaps and Secrets.

This field is composed by a struct that carries options for appending
a VM's index to the names of ConfigMaps or Secrets it refers to.

Signed-off-by: Felix Matouschek <[email protected]>
@kubevirt-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jan 7, 2025
@kubevirt-bot kubevirt-bot added area/controller kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/L sig/compute labels Jan 7, 2025
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jean-edouard for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@0xFelix
Copy link
Member Author

0xFelix commented Jan 7, 2025

@davidvossel Can I get your opinion on this since you are the original author of that feature?

If enabled in the VirtualMachinePoolSpec append the index of a VM to
ConfigMaps and/or Secrets the VM refers to.

Signed-off-by: Felix Matouschek <[email protected]>
@0xFelix 0xFelix force-pushed the vm-pool-name-generation branch from 475d528 to c259673 Compare January 8, 2025 14:43
@0xFelix 0xFelix marked this pull request as ready for review January 8, 2025 14:44
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 8, 2025
By using label selectors in calls to List, flakes can be avoided by
limiting the expected list items.

Signed-off-by: Felix Matouschek <[email protected]>
@0xFelix 0xFelix force-pushed the vm-pool-name-generation branch from c259673 to d24b7fa Compare January 9, 2025 07:59
Add a functest to verify that VirtualMachinePools correctly append the
index of a VM to ConfigMaps and/or Secrets the VM refers to.

Signed-off-by: Felix Matouschek <[email protected]>
@0xFelix 0xFelix force-pushed the vm-pool-name-generation branch from d24b7fa to b4389e3 Compare January 9, 2025 08:55
@0xFelix
Copy link
Member Author

0xFelix commented Jan 21, 2025

@vladikr Would you mind taking a look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/enhancement release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/compute size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misleading documentation regarding ConfigMap/Secret volumes with VirtualMachinePools
2 participants