-
Notifications
You must be signed in to change notification settings - Fork 189
Description
Query/Question
How can I set the resource limit property for a container instance using the fluent SDK?
According to the docs, I should be able to set an optional resource limit
property when allocating resources to container instances within a container group, as well as setting the mandatory resource request
property.
However, the only methods to define resources that I can find the fluent SDK areWithCpuCoreCount()
and WithMemorySizeInGB()
. I assume that these methods set the resource request
property (because this property is mandatory). I can't find an equivalent method (or an overload) to set the resource limit
property. e.g.
IContainerGroup containerGroup = azure.ContainerGroups.Define(aciName)
.WithRegion(region)
.WithNewResourceGroup(rgName)
.WithLinux()
.WithPublicImageRegistryOnly()
.WithoutVolume()
.DefineContainerInstance(aciName + "-1")
.WithImage(containerImageName1)
.WithExternalTcpPort(80)
.WithCpuCoreCount(.5)
.WithCpuCoreCountLimit(1) // Something like this
.WithMemorySizeInGB(1)
.Attach()
.DefineContainerInstance(aciName + "-2")
.WithImage(containerImageName2)
.WithoutPorts()
.WithCpuCoreCount(request: .5, limit: 1) // Or maybe like this
.WithMemorySizeInGB(1)
.Attach()
.WithRestartPolicy(ContainerGroupRestartPolicy.Never)
.WithDnsPrefix(aciName)
.Create();
Why is this not a Bug or a feature Request?
This might be a feature request, but I'm hoping this is already possible and I've overlooked something.
Setup (please complete the following information if applicable):
- OS: Windows
- IDE : Visual Studio
- Microsoft.Azure.Management.ContainerInstance.Fluent v1.38.1
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Query Added
- Setup information Added