-
Notifications
You must be signed in to change notification settings - Fork 95
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
✨ Support namespace in Metal3Machine's HostSelector #795
✨ Support namespace in Metal3Machine's HostSelector #795
Conversation
Support setting namespace where to look for BareMetalHosts in Metal3Machine using HostSelector Signed-off-by: Ondrej Vasko <ondrej.vaskoo@gmail.com>
Signed-off-by: Ondrej Vasko <ondrej.vaskoo@gmail.com>
Signed-off-by: Ondrej Vasko <ondrej.vaskoo@gmail.com>
During conversion from v1beta1 to v1alpha5 this field would be lost and there is no way how to make it compatible Signed-off-by: Ondrej Vasko <ondrej.vaskoo@gmail.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Hi @Lirt. Thanks for your PR. I'm waiting for a metal3-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
After more tests I found out that after API Version: metal3.io/v1alpha1
Kind: BareMetalHost
Name: s4anb866
Namespace: c-caas-bm-test1
Labels: cluster.x-k8s.io/cluster-name=ovasko-test-cluster-01
Metadata:
Owner References:
API Version: infrastructure.cluster.x-k8s.io/v1beta1
Controller: true
Kind: Metal3Machine
Name: ovasko-test-cluster-01-master-wb99h
UID: 48464ad2-5674-4f2a-b02b-a01783595d7a Warning OwnerRefInvalidNamespace 4m garbage-collector-controller ownerRef [infrastructure.cluster.x-k8s.io/v1beta1/Metal3Machine, namespace: c-caas-bm-test1, name: ovasko-test-cluster-01-master-wb99h, uid: 48464ad2-5674-4f2a-b02b-a01783595d7a] does not exist in namespace "c-caas-bm-test1" The issue is that ownerReference can only point to resource in the same namespace or cluster-wide resource:
And then BMH gets deleted as M3M could not be found (it's in different namespace for this case). I think this is a deal-breaker for this Pull Request and we cannot overcome it unless someone has idea how to combine this BMO feature with CAPM3. |
/retest |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with /lifecycle stale |
What this PR does / why we need it
This PR adds support for
namespace
field in aHostSelector
ofMetal3Machine
andMetal3MachineTemplate
CRDs.Short discussion about this feature was in this Slack thread.
cc. @jsen- and @schrej
Motivation
In case each
CAPI
/Metal3
cluster (or tenant) is located in a dedicated namespace - it is not possible to have a shared pool of BMHs among those clusters.This feature will allow to pick
BareMetalHosts
(BMHs) from different namespace than namespace of aMetal3Machine
(orCluster
namespace). With namespace selection feature each cluster (or tenant) can be isolated in a dedicated namespace and reference BMHs from different namespace in which they can be pre-provisioned.Signed-off-by: Ondrej Vasko ondrej.vaskoo@gmail.com