Repository navigation
Abstract cluster provider to add EKS - #169
Conversation
2680b2d to
1c4e518
Compare
742bd9b to
10c23bd
Compare
10c23bd to
ba53190
Compare
The NodeProvider interface abstracts the actions for each provider and will help to introduce additional cluster providers for running the test suite. Examples are EKS in the near future, or Openshift in the long run, but it is opened to other k8s platform as well. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
a33bf26 to
ead8725
Compare
|
I checked the new TC added is not seen in CI jobs, is it expected? |
@ptalgulk01 do you mean a CI for EKS, we still don't have a public one. I have tested this in our downstream repository. I know that's not ideal, but we don't have the ability to add public CI at the moment, but it isn't breaking bink testing |
cheesesashimi
left a comment
There was a problem hiding this comment.
Overall, this looks good! I don't have any blocking feedback, only minor suggestions and a few questions mostly for my own edification.
| Build() | ||
| } | ||
|
|
||
| func TestEKSAddNode(t *testing.T) { |
There was a problem hiding this comment.
praise: I really like that there are tests for this!
| // registry shares storage with the unauthenticated one (port 5000), | ||
| // so the update image is already available at both endpoints. | ||
| func TestPullSecretAuth(t *testing.T) { | ||
| e2eutil.Providers(t, "bink", "eks") |
There was a problem hiding this comment.
question (non-blocking): Would this be ran via two separate CI jobs where one job targets bink and the other job targets EKS? Or would both be covered via the same CI job?
There was a problem hiding this comment.
It will be 2 separate CI. For now, we don't have a plan to add EKS to the public CI, but if we have some budget I'd love to. Right now it will simply be a downstream CI.
|
Checking if the CI is happy and then I will squash the last commit. |
Move bink in its own provider implementation. If no provider is set, then we assume bink to be default one. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Rename environment variables to decouple e2e tests from the bink provider: - BINK_NODE_IMAGE_DIGEST -> E2E_NODE_IMAGE_DIGEST - BINK_LOCAL_REGISTRY_NODE_IMAGE -> E2E_NODE_IMAGE_REGISTRY - BINK_NODE_IMAGE_UPDATE_DIGEST -> E2E_NODE_IMAGE_UPDATE_DIGEST - BINK_NODE_IMAGE_UPDATE2_DIGEST -> E2E_NODE_IMAGE_UPDATE2_DIGEST Add E2E_PROVIDER=bink to explicitly select the provider. Signed-off-by: Alice Frosi <afrosi@redhat.com>
For now, we are only targeting the TestPullSecretAuth for EKS since it requires a pull secret for pulling the container images. Once, this first work has been merged will tackle the rest of the test suite. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Implement EKSProvider that provisions e2e test nodes by launching standalone EC2 instances that join an existing EKS cluster. The provider discovers the Auto Scaling group for an eksctl node group via tags, extracts its launch template, and uses it to launch new instances. EKSProvider implements the NodeProvider interface with: - AddNode: launches an EC2 instance, waits for the k8s node to register (polling up to 10 min), and patches labels - RemoveNode: terminates the EC2 instance and deletes the k8s node Required env vars: EKS_CLUSTER_NAME, EKS_NODE_GROUP, AWS_REGION Unit tests cover AddNode and RemoveNode using mock EC2 interfaces and a fake k8s client. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Previously, gather-logs was using bink ssh, in order to make it compatible with EKS, let's use a more generic way and use the bootc-operator daemons to fetch the logs. This will work with each cluster provider. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Use full digest-qualified image references per provider instead of separate registry and digest fields. Add AuthImageRef, RegistryHost, and extractRegistryHost helpers for pull secret test support. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
With remote registries the manifest digest and content digest can differ. Assert on the full image ref which carries the manifest digest rather than the locally resolved content digest. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
9462013 to
fed6309
Compare
|
@cheesesashimi @HarshwardhanPatil07 CI is green and I solved all the comments. Could you please have a final look to this and if you are fine with it approve it? |
HarshwardhanPatil07
left a comment
There was a problem hiding this comment.
Thank you very much!
|
@Mergifyio backport release-0.1 |
✅ Backports have been createdDetails
Cherry-pick of 124c07f has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Abstraction of the cluster provider in order to support simultaneously bink and other kubernetes platform like EKS.