Conversation
Codecov Report
@@ Coverage Diff @@
## master #3634 +/- ##
==========================================
- Coverage 73.14% 73.14% -0.01%
==========================================
Files 147 147
Lines 25165 25220 +55
==========================================
+ Hits 18408 18448 +40
- Misses 5623 5638 +15
Partials 1134 1134
Continue to review full report at Codecov.
|
Labeled as WIP until the onboarding image is hosted in MCR. |
Apparently this is not a requirement any more. Removing label. |
Apparently this is not a requirement any more. Removing label. |
pkg/engine/engine.go
Outdated
@@ -886,6 +886,32 @@ func getClusterAutoscalerAddonFuncMap(addon api.KubernetesAddon, cs *api.Contain | |||
} | |||
} | |||
|
|||
func getArcAddonFuncMap(addon api.KubernetesAddon) template.FuncMap { |
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.
I don't think we need this template funcmap, we can use getAddonFuncMap
, which already has a way to get the config key vals (ContainerConfig
)
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.
Added ContainerConfigBase64
func
We'll want to add a default addon data model via |
Example: | ||
|
||
```json | ||
{ |
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.
let's enclose this example JSON in something like this:
{
...
"properties": {
"orchestratorProfile": {
"kubernetesConfig": {
"addons": [
...,
<your example addons configuration here>,
...
]
}
},
...
}
/azp run pr-e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
lgtm, thanks @jadarsie! |
test/e2e/runner/cli_provisioner.go
Outdated
rg := cli.Account.ResourceGroup | ||
if err := cli.Account.CreateGroupWithRetry(addon.Config["resourceGroup"], addon.Config["location"], 30*time.Second, cli.Config.Timeout); err != nil { | ||
return errors.Wrapf(err, "Error while trying to create Azure Arc resource group: %s", rg) | ||
if err := cli.Account.CreateArcGroupWithRetry(addon.Config["resourceGroup"], addon.Config["location"], 30*time.Second, cli.Config.Timeout); err != nil { |
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.
@jadarsie why do we need to create a new func for this?
@@ -205,6 +205,8 @@ func (cli *CLIProvisioner) provision() error { | |||
} | |||
cli.Engine = eng | |||
|
|||
cli.EnsureArcResourceGroup() |
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.
O.K., lets add this after L130 above (after we've called CreateGroupWithRetry
and received a nil err):
now := fmt.Sprintf("now=%v", time.Now().Unix())
cli.Account.ResourceGroup = r := ResourceGroup{
Name: cli.Config.Name,
Location: cli.Config.Location,
Tags: map[string]string{
"now": now,
},
}
Then we can get rid of the now
var in the CreateGroup
method, and get rid of the whole "assign ResourceGroup property to account instance" code.
I think that's the easiest path forward. You can then get rid of the new duplicated "create resource group func" and basically do exactly what you were doing before, without the surprise Account.ResourceGroup override. :)
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis, jadarsie 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 |
* feat: azure arc addon * renamed addon * data model * product name update * e2e improvements * examples * fixed cluster config * add arc-onboarding to everything.json * Account.ResourceGroup * CreateGroup does not set Account.ResourceGroup * fix
Reason for Change:
New addon to simplify cluster onboarding to Azure Arc for Kubernetes.
Requirements:
Notes: