-
Notifications
You must be signed in to change notification settings - Fork 15
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
e2e: refactor NRO deployment #1071
e2e: refactor NRO deployment #1071
Conversation
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.
partial review. I like the general direction, some initial comments inside
Yea, I used the copied the code verbatim, refactoring the actual logic for k8s and ocp wasn't part of the plan, but hey why not |
441712b
to
b54e389
Compare
621270d
to
eafabf4
Compare
9563ef1
to
9cb9a52
Compare
With this PR in place, HyperShift CI should be happy. if it's not, it's an actual bug in tests/functionality that we need to fix. |
9cb9a52
to
70e7a8a
Compare
On second thought we need #1027 first to make CI happy |
0a028dc
to
8e76a20
Compare
/test ci/prow/ci-e2e-install-hypershift |
@Tal-or: The specified target(s) for
The following commands are available to trigger optional jobs:
Use 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. |
/test ci-e2e-install-hypershift |
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
/lgtm cancel issue found offline |
8e76a20
to
28b87f1
Compare
3843f0d
to
fcbfd07
Compare
New API for deploying NROP CRs that will be implemented by different k8s flavor/platforms Signed-off-by: Talor Itzhak <[email protected]>
This is the main flow which implements the deployer interface for OpenShift platform. Signed-off-by: Talor Itzhak <[email protected]>
This is the main flow which implements the deployer interface for Kubernetes platform. It mostly based on the OpenShift implementation. Signed-off-by: Talor Itzhak <[email protected]>
Creating a placeholder for implementing the deployer interface for HyperShift. The reason we can't implement it for now is because we need to figure out where is the KUBECONFIG file for the HyperShift MNG cluster is located and providing it to the test. This is needed because we need to create a KubeletConfig ConfigMap against the MNG cluster and add it under the NodePool spec. Signed-off-by: Talor Itzhak <[email protected]>
Those function are exposed by the `Deployer` interface from now and are implemented differently for each platform. The user should call `NewForPlatform` to get the correct deployer flavor Signed-off-by: Talor Itzhak <[email protected]>
Besides standard renaming, the interface doesn't expose the NRO object anymore, so the test should retrieve it from the API server directly. This is done only for the tests so we prefer maintainability and readablity at the cost of some several API calls. Signed-off-by: Talor Itzhak <[email protected]>
Add context to the Deployer's functions and pass it from the caller. Signed-off-by: Talor Itzhak <[email protected]>
Some cosmetic changes to make the ginkgo tests more readable Signed-off-by: Talor Itzhak <[email protected]>
Implement the deployer interface for HyperShift platform. Signed-off-by: Talor Itzhak <[email protected]>
So far we were relaying on an env variable to be set in order to determine whether we're running on hypershift. There is a clever way to detect the platform for "free" (without having the need to set any env variable) so lets use it instead. Signed-off-by: Talor Itzhak <[email protected]>
NRO test object always sets the MCP selector. This is not the case for hypershift, so let's make the label selector optional. Signed-off-by: Talor Itzhak <[email protected]>
In hypershift case if withSELinuxPolicy set to `true` then the manifests will contain a `MachineConfig` object which NROP while running on HyperShift doesn't install. Signed-off-by: Talor Itzhak <[email protected]>
fcbfd07
to
7de8e4b
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Tal-or 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 |
/lgtm silly me missed that change previously :\ |
I would wait with that but let's see |
At the beginning of the u/s tests we're deploying the NRO/Scheduler objects.
This PR introduce a refactor of the deployment code, so each k8s flavor will be able to implement it for its need.
At the moment we're having 3 flavors:
In this PR the HyperShift logic is not implemented because there're missing details from the CI perspective such as the
KUBECONFIG
of the MNG cluster. we'll implement the missing code in future PR.