- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.2k
 
VPA: [InPlaceOrRecreate] e2e tests #8072
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
VPA: [InPlaceOrRecreate] e2e tests #8072
Conversation
| 
           @maxcao13: The label(s)  In response to this: 
 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-sigs/prow repository.  | 
    
| 
           /hold depends on #7962  | 
    
| 
           /assign @raywainman for another pair of eyes  | 
    
| 
           @omerap12: GitHub didn't allow me to assign the following users: another, pair, of, eyes, for. Note that only kubernetes members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this: 
 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-sigs/prow repository.  | 
    
| 
           @maxcao13 do you mind rebasing once the other PR is merged?  | 
    
Signed-off-by: Max Cao <[email protected]>
baa02c9    to
    1680325      
    Compare
  
    | 
           /unhold  | 
    
| 
               | 
          ||
| // WaitForPodsUpdatedWithoutEviction waits for pods to be updated without any evictions taking place over the polling | ||
| // interval. | ||
| func WaitForPodsUpdatedWithoutEviction(f *framework.Framework, initialPods *apiv1.PodList) error { | 
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.
The logic is kinda weird but I guess it's working... wondering if we can verify that a container has been updated in-place rather than just iterating on the names.
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.
Not sure, I've thought about trying to track status.ContainerRestarts but doesn't hold up since we can't guarantee the container won't restart.
Maybe it's also possible to track the resize condition to go from nil -> PodResizeInProgress -> nil and not confirm it doesn't to Deferred or Infeasible or something, but that's probably not the best idea if the conditions change super fast.
Maybe someone else has better ideas, or maybe even someone from sig-node knows.
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.
Overall looks good. Great work, Max - really appreciated! I've added a few small comments.
| 
           I guess the e2e testing is taking longer now, right? I'm not sure how we could implement separate Prow job configurations specifically for feature-gated tests. We should definitely think about that, but it's not urgent right now.  | 
    
          
 Yeah, it's taking a bit longer now, which probably isn't great since it'll slow all PRs down after this entire thing is merged to main. I think it might be good to at least prepare for that here. I think we can use label filters to mark suites with  I've tried it locally and it works. You just have to specify  EDIT: Although this doesn't account for the fact that after the feature gate is GA'd, we wouldn't be running the tests separately anymore. So either we are okay with the full_vpa tests being at most double in length, or we somehow find a way to make the tests more time efficient, or we have to start parallelizing some e2e tests somehow.  | 
    
843639e    to
    1a19a4d      
    Compare
  
    
          
 I'm thinking about how we can integrate this into the CI process.  | 
    
| 
           Note to reviewers: The e2e tests I added aren't actually running right now. They require the   | 
    
Signed-off-by: Max Cao <[email protected]>
This commit refactors the VPA e2e test ginkgo wrappers so that they we can easily supply ginkgo decorators. This allows us to add ginkgo v2 labels to suites so that later we can run tests that only run FG tests. For now, this would only be useful for FG:InPlaceOrRecreate Signed-off-by: Max Cao <[email protected]>
1a19a4d    to
    c4b561d      
    Compare
  
    | 
           /lgtm /approve  | 
    
| 
           [APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maxcao13, raywainman 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   | 
    
97a67b7
      into
      
  
    kubernetes:in-place-updates
  
    
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds a lot of e2e tests to validate the
InPlaceOrRecreatefeature. I've tried to separate feature gated tests from regular tests.I've added this check
checkInPlaceOrRecreateTestsEnabled(f, true, true)to make sure thatInPlaceOrRecreatefeature gate is enabled for the necessary components, otherwise skipInPlacePodVerticalScalingfeature gate is enabled on clusterStill note quite sure how we want to handle VPA feature gated tests here. As of now, e2e tests will always run with
InPlaceOrRecreate=trueand all tests will run, but maybe we want to have a separate prow config which just exercises feature gated tests using special ginkgo test tags? We can ignore that for now in order to get this feature out the door, but maybe it's something to think about.Which issue(s) this PR fixes:
Part of AEP-4016
[InPlaceOrRecreate]This PR is part of the larger feature PR in #7673
Depends on: #7962
After it's merged I'll rebase.
Note that this PR is merging into the in-place-updates feature branch, which will be merged when this feature is all reviewed and ready.
Special notes for your reviewer:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: