-
Notifications
You must be signed in to change notification settings - Fork 67
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 VMI eviction also for external infra clusters #242
Support VMI eviction also for external infra clusters #242
Conversation
/ok-to-test |
Pull Request Test Coverage Report for Build 5199391506
💛 - Coveralls |
5a8c14e
to
84c9e65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, i left two minor comments
templates/cluster-template-kccm.yaml
Outdated
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
capk.cluster.x-k8s.io/template-kind: extra-resource | ||
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME} | ||
name: manager | ||
namespace: ${NAMESPACE} | ||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this new serviceAccount?
e2e/create-cluster_test.go
Outdated
// debug | ||
buff.Reset() | ||
_ = enc.Encode(machineList.Items) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug needs removal
@@ -65,7 +65,7 @@ type KubevirtMachineReconciler struct { | |||
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;machines,verbs=get;list;watch | |||
// +kubebuilder:rbac:groups="",resources=secrets;,verbs=get;list;watch;create;update;patch;delete | |||
// +kubebuilder:rbac:groups=kubevirt.io,resources=virtualmachines;,verbs=get;list;watch;create;update;patch;delete | |||
// +kubebuilder:rbac:groups=kubevirt.io,resources=virtualmachineinstances;,verbs=get;list;watch | |||
// +kubebuilder:rbac:groups=kubevirt.io,resources=virtualmachineinstances;,verbs=get;list;watch;patch;update;delete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want to remove the watch
item here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidvossel - the test was constantly failed without this watch
. I put it back.
config/kccm/kustomization.yaml
Outdated
- ../rbac | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is adding the rbac used to install capk to the template used to create a guest cluster with kccm
e303e1a
to
fc21fe8
Compare
fc21fe8
to
c1dd6e4
Compare
bce14c4
to
32d5f40
Compare
config/rbac/role.yaml
Outdated
- list | ||
- patch | ||
- update | ||
- watch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also remove the list
and watch
rbac here? This helps validate that the controller can operator entirely without those two rbac permissions
adadef9
to
020a265
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, I just had a couple of minor comments.
- list | ||
- patch | ||
- update | ||
- watch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also remove list
and watch
from the virtualmachines
entry that's slightly below this one
e2e/create-cluster_test.go
Outdated
setFakeAnnotationOnMachine(g) | ||
defer removeFakeAnnotationFromMachine(g) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see how forcing the reconciliation improves the test time and consistency, but my concern is that it might mask real issues caused by the reconcile loop not popping when we need it to.
Is it possible for us to test this without forcing the reconciliation? it's okay if the wait time needs to increase?
3c173b5
to
faea995
Compare
Closing and reopening. Maybe this will release the CI? |
CAPK now can drain a node when its VMI is evicted, even if the VMI is running at an external cluster. Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
faea995
to
87a8fb7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidvossel, nunnatsa The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
CAPK now can drain a node when its VMI is evicted, even if the VMI is running at an external cluster.