-
Notifications
You must be signed in to change notification settings - Fork 362
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
fix: Fixes issue in avm/res/container-instance/container-group
when container memory is set to less than 1 GB.
#3752
Open
anderseide
wants to merge
12
commits into
Azure:main
Choose a base branch
from
anderseide:container-instance-memory
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+297
−60
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
07f7c31
Updated test for low memory
anderseide ad9e64d
Changed memoryInGB type to string to support 0.5 memory
anderseide da465a0
bumped version number
anderseide 7a93d4a
Merge branch 'main' into container-instance-memory
anderseide b3b5067
Merge branch 'main' into container-instance-memory
JPEasier 10a7948
feat: Added types to `avm/res/cdn/profile` module (#3728)
anderseide 2e15194
feat: Add WAF Security PS Rule Config (#3745)
jtracey93 18bd7ee
feat: Add UDT to `avm/res/operational-insights/workspace` (#3774)
krbar b75725e
Merge branch 'main' into container-instance-memory after CICD update
anderseide 388c229
Rebuild with new bicep version
anderseide 5a59a11
Update new bicep version
anderseide f52e71b
Rollback after updating wrong module
anderseide File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
avm/res/container-instance/container-group/tests/e2e/low-memory/main.test.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
targetScope = 'subscription' | ||
|
||
metadata name = 'Using only defaults and low memory containers' | ||
metadata description = 'This instance deploys the module with the minimum set of required parameters and with low memory.' | ||
|
||
// ========== // | ||
// Parameters // | ||
// ========== // | ||
|
||
@description('Optional. The name of the resource group to deploy for testing purposes.') | ||
@maxLength(90) | ||
param resourceGroupName string = 'dep-${namePrefix}-containerinstance.containergroups-${serviceShort}-rg' | ||
|
||
@description('Optional. The location to deploy resources to.') | ||
param resourceLocation string = deployment().location | ||
|
||
@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') | ||
param serviceShort string = 'ciclow' | ||
|
||
@description('Optional. A token to inject into the name of each resource.') | ||
param namePrefix string = '#_namePrefix_#' | ||
|
||
// ============ // | ||
// Dependencies // | ||
// ============ // | ||
|
||
// General resources | ||
// ================= | ||
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { | ||
name: resourceGroupName | ||
location: resourceLocation | ||
} | ||
|
||
// ============== // | ||
// Test Execution // | ||
// ============== // | ||
|
||
@batchSize(1) | ||
module testDeployment '../../../main.bicep' = [ | ||
for iteration in ['init', 'idem']: { | ||
scope: resourceGroup | ||
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}' | ||
params: { | ||
location: resourceLocation | ||
name: '${namePrefix}${serviceShort}001' | ||
containers: [ | ||
{ | ||
name: '${namePrefix}-az-aci-x-001' | ||
properties: { | ||
image: 'mcr.microsoft.com/azuredocs/aci-helloworld' | ||
ports: [ | ||
{ | ||
port: 443 | ||
protocol: 'Tcp' | ||
} | ||
] | ||
resources: { | ||
requests: { | ||
cpu: 2 | ||
memoryInGB: '0.5' | ||
} | ||
} | ||
} | ||
} | ||
] | ||
ipAddressPorts: [ | ||
{ | ||
protocol: 'Tcp' | ||
port: 443 | ||
} | ||
] | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", | ||
"version": "0.2", | ||
"version": "0.3", | ||
"pathFilters": [ | ||
"./main.json" | ||
] | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 resource documentation says
https://learn.microsoft.com/en-us/azure/templates/microsoft.containerinstance/containergroups?pivots=deployment-language-bicep#resourcelimits
I'm not sure whether this might lead to misunderstandings?
might be good to use type
any
and add the description again?@eriqua, @AlexanderSehr what do you think?
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.
@Azure/avm-core-team I need a second pair of eyes.