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

KubevirtCI rewrite draft #1195

Closed
wants to merge 10 commits into from
Closed

Conversation

aerosouund
Copy link
Member

@aerosouund aerosouund commented May 23, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes

#1185

Checklist

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels May 23, 2024
@kubevirt-bot
Copy link
Contributor

Hi @aerosouund. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

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-sigs/prow repository.

@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 davidvossel 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

@aerosouund aerosouund force-pushed the kubevirtci-rewrite branch from c85a92a to f4f7e83 Compare May 25, 2024 10:31
@dhiller
Copy link
Contributor

dhiller commented May 28, 2024

/uncc
/cc @alicefr @xpivarc

Since you folks were pinged on the issue, I suspect you have been talking to @aerosouund .

@kubevirt-bot kubevirt-bot requested review from alicefr and xpivarc and removed request for dhiller May 28, 2024 07:37
@dhiller
Copy link
Contributor

dhiller commented May 28, 2024

/uncc @davidvossel

@kubevirt-bot kubevirt-bot removed the request for review from davidvossel May 28, 2024 07:38
@alicefr
Copy link
Member

alicefr commented May 28, 2024

/cc @acardace

@kubevirt-bot kubevirt-bot requested a review from acardace May 28, 2024 07:39
@dhiller
Copy link
Contributor

dhiller commented May 28, 2024

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

@aerosouund we only accept signed commits. You need to rework each of the commits to have proper signing.

@alicefr
Copy link
Member

alicefr commented May 28, 2024

@aerosouund on top of what Daniel said, please try to split the code in clean separated commits with some explanation. Even if this is a draft, it is, otherwise, difficult to review and understanding what you are doing.

@aerosouund
Copy link
Member Author

@dhiller
Of course, i am just keeping this as a pull request where you guys can just see the code. eventually i will clean up everything properly
@alicefr
will do

@aerosouund aerosouund changed the title Network (#1) KubevirtCI rewrite draft Jun 16, 2024
@aerosouund aerosouund force-pushed the kubevirtci-rewrite branch from 5903333 to 2aad7c1 Compare June 20, 2024 10:35
@aerosouund aerosouund force-pushed the kubevirtci-rewrite branch from 7655e10 to 4b47ec1 Compare June 27, 2024 11:58
@kubevirt-bot
Copy link
Contributor

PR needs rebase.

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.

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 27, 2024
Signed-off-by: aerosouund <[email protected]>
Contains the K8sDynamicClient type which will be used to create an arbitrary object from a manifest. as well as a test client based on K8s Fake. In addition to the SSH Client type which contains interfaces to connect to nodes in the node network through the forwarded ssh port by the Dnsmasq container

Signed-off-by: aerosouund <[email protected]>
Subsequent code will implement this interface to modify each script used in run.go to a type that conforms to this interface`

Signed-off-by: aerosouund <[email protected]>
Implementations of the Opt interface that map to the nodes.sh and node01.sh scripts used to provision control plane and worker nodes. with test cases that leverage the mock ssh client

Signed-off-by: aerosouund <[email protected]>
The rootkey Opt adds the public key created from vagrant.key to the root user on a node to enable ssh as root directly without requiring sudo

Signed-off-by: aerosouund <[email protected]>
K8s opts map to the scripts that create a kubernetes deployment of something on the CI cluster. The opts depend on the k8s client type to apply a list of manifests and leverage the test client for testing while passing reactors to the test client to configure necessary behavior. the embed package is used to ship the necessary manifests with those opts. This includes rook-ceph, nfs-csi, cdi, aaq, multus, cnao and prometheus

Signed-off-by: aerosouund <[email protected]>
Introduce opts that leverage the ssh client to execute commands on the node and testing based on the mock ssh client.

Signed-off-by: aerosouund <[email protected]>
The k8s base provider is an abstraction that makes it easier to deal with a running provider. it leverages the Opts in provisioning the cluster. Some of its logic is a refactor of the run method and the other functions that were in run.go but didn't have a type attached to them. the Flagmap variable serves as a mapping between each flag and its corresponding OptFunc that sets the field in the struct

Signed-off-by: aerosouund <[email protected]>
The logic for run has been moved from running directly in the function to the provider. run was changed to parse the flags based on their types, initialize a provider and run its Start method. extra flags have been added for the options that previously were entirely in the bash code. a default container suffix has been introduced as none existed before. and unless passed provisioning would fail. as well as change the default for background and dns port to match what the bash code always set as default in k8s_provider_common.sh

Signed-off-by: aerosouund <[email protected]>
This is a new command that instantiates a new kubevirt provider from running and extracts its /etc/kubernetes/admin.conf file to the host machine to interact with the provider cluster later

Signed-off-by: aerosouund <[email protected]>
@aerosouund aerosouund force-pushed the kubevirtci-rewrite branch from 4b47ec1 to 0013f64 Compare June 27, 2024 12:02
@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Jun 27, 2024
@aerosouund aerosouund closed this Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants