-
Notifications
You must be signed in to change notification settings - Fork 561
adding offset to kubernetes cluster templates. Adding outputs needed … #366
Conversation
@JackQuincy, |
Can one of the admins verify this patch? |
2 changes I have decided I want to make to this since sending it.
|
parts/agentparams.t
Outdated
"metadata": { | ||
"description": "The offset into the agent pool where to start creating agents. This value can be from 0 to 100" | ||
}, | ||
"type": "int" |
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.
How will this impact the case of multiple agent pools. Will this offset impact all agent pools? Shouldn't offset be applied on a per agent pool basis?
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.
the {{.Name}} part is saying the name of the agent pool see unit test output below to see something like:
agentpool1Offset
parts/kubernetesagentvars.t
Outdated
@@ -1,7 +1,9 @@ | |||
"{{.Name}}StorageAccountOffset": "[mul(variables('maxStorageAccountsPerAgent'),variables('{{.Name}}Index'))]", | |||
"{{.Name}}Count": "[parameters('{{.Name}}Count')]", | |||
"{{.Name}}Offset": "[parameters('{{.Name}}Offset')]", | |||
"{{.Name}}TotalCount": "[add(parameters('{{.Name}}Count'), parameters('{{.Name}}Offset'))]", |
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.
Shouldn't total count be the goal state. E.g. If current VM count is 4, and desired count is 5 (goal state). So total count will be: 5+4 =9?
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.
agreed it is in my list of things todo to fix this PR up and get it ready for checkin
e89a371
to
0294d14
Compare
Can one of the admins verify this patch? |
Currently there is still down time on scale up. This is because our template reinputs the nsg which wipes out some rules that NRP adds. I'm looking into making it not reput the nsg potentially at the very least I'll document a work around of removing the nsg from the template before resubmitting |
The NSG rules can be made tracked sub-resources will which avoid clobbering them. |
@colemickens would that be the Kubernetes driver NSG rules , or the ACS NSG rules in the template, or both? |
Well, the cloudprovider code does a manual merge already, so it does the right thing by avoiding any automatic behavior. In this case, the fix is in the template. By making them sub-resources, it supposedly will use PATCH-like semantics and only add rules, rather than explicitly setting the "rules" subfield, thus causing a completely replacement of the entire set of rules, as we are doing now. (Note, I don't have first hand knowledge of this; this is my understanding based on discussions with @yangl900 and @weinong. I hope that I'm portraying it accurately.) |
Reviewed 1 of 63 files at r2. Comments from Reviewable |
Reviewed 2 of 63 files at r2. examples/scale-up/README.md, line 20 at r3 (raw file):
can you reformat them a bit? they look like stuffed in single paragraph. Comments from Reviewable |
Review status: 3 of 39 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. parts/agentparams.t, line 16 at r1 (raw file): Previously, JackQuincy (Jack) wrote…
is 100 a valid offset? pkg/acsengine/testdata/disks-managed/swarm-vmas_expected.json, line 216 at r3 (raw file):
is 100 an valid offset? Comments from Reviewable |
ade79a9
to
a6ef5dd
Compare
Review status: 3 of 39 files reviewed at latest revision, 4 unresolved discussions. examples/scale-up/README.md, line 20 at r3 (raw file): Previously, weinong (Weinong Wang) wrote…
Does this look better parts/agentparams.t, line 16 at r1 (raw file): Previously, weinong (Weinong Wang) wrote…
No, I'm reducing to just 99 and adding comment about the change pkg/acsengine/testdata/disks-managed/swarm-vmas_expected.json, line 216 at r3 (raw file): Previously, weinong (Weinong Wang) wrote…
no reducing to just 99 and adding comment about it needing to be less than count Comments from Reviewable |
Reviewed 10 of 63 files at r2, 2 of 2 files at r3, 24 of 24 files at r5. Comments from Reviewable |
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.
a few comments added
@@ -150,20 +150,20 @@ | |||
}, | |||
"dependsOn": [ | |||
{{if .IsStorageAccount}} | |||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageAccountPrefixes')[mod(add(div(copyIndex(),variables('maxVMsPerStorageAccount')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(div(copyIndex(),variables('maxVMsPerStorageAccount')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}AccountName'))]", | |||
"[concat('Microsoft.Storage/storageAccounts/',variables('storageAccountPrefixes')[mod(add(div(copyIndex(variables('{{.Name}}Offset')),variables('maxVMsPerStorageAccount')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(div(copyIndex(variables('{{.Name}}Offset')),variables('maxVMsPerStorageAccount')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}AccountName'))]", |
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.
in your testing, set vms per storage account to 2, and then test a number of vms and a number of pools. For example 5 vms, 2 agent pools. That will ensure the math all checks out.
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.
Not related to this pr. This is related to Resource Provider work to consume some of these changes
@@ -1761,6 +1981,14 @@ | |||
} | |||
], | |||
"outputs": { | |||
"agentStorageAccountPrefixes": { |
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.
where are the agent outputs.
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.
my bad didn't realize Kubernetes base template doesn't reference agents outputs template. Will update.
Reviewed 4 of 63 files at r2, 26 of 26 files at r6. Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions. parts/agentparams.t, line 16 at r1 (raw file): Previously, JackQuincy (Jack) wrote…
OK Comments from Reviewable |
ae35b1d
to
ac9199b
Compare
…to make scale down idempotent in RP also updating swarm and dcos vmas agent pools and adding example file moving output definition so that we can properly format it
ac9199b
to
431b5b6
Compare
stale, it is several commits old and she hasn't had time to take a look and I am blocking others at this point
Reviewed 15 of 15 files at r7. Comments from Reviewable |
This broke the build. @acs-bot test this please |
…to make scale down idempotent in RP
This change is