Add kubetest2 deployer for e2e testing - #1510
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| klog.Infof("Starting cluster up flow for cluster=%q", d.clusterName()) | ||
|
|
||
| ctx := context.Background() | ||
| if err := d.ensureManagedClusterAccess(ctx); err != nil { |
There was a problem hiding this comment.
somehow i don't like that this is split up in "bootstrap" and "ske cluster provisioning". To me all steps are equally important in terms of bootstrapping, also deploying the csi helmchart will be the last step.
i would like to organize this a little different.
add another folder, lets name it "bootstrap" if you will, inside there are multiple go files for every step.
project.go
serviceaccount.go
ske.go
csi.go
...
Each expose an ensure function. "ensureProject", "ensureCluster" etc.
The Up() function just calls these functions one after another :) and each function itself is idempotent.
This would overall help with getting through the code and understanding when which step is happening and each step can be encapsulated really nice :)
WDYT?
There was a problem hiding this comment.
Im going with a flattened/restructured file list for now. A bootstrap/ folder would result in a new go package, so ensureProject etc. couldn't stay methods on *Deployer and we would have to refactor a lot. The bootstrap_*.go prefix gives the same readability IMO. What do you think?
Signed-off-by: Felix Breuer <f.breuer94@gmail.com>
How to categorize this PR?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Breaking changes:
/hold still WIP