Azure / Azure/azure-libraries-for-java

Does not seem possible to Create a ContainerGroup with multiple Container Instances

Offen
#661 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Container Instances
Vorherrschende Sprache
Java
Sterne
97
Forks
102
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

The current Fluent API works well if you know ahead of time what containers so you can hard code the deployment.

I am trying to do:

var containerGroup = azure.containerGroups().define(groupName)
.withRegion(region)
.withExistingResourceGroup(resourceGroupName)
.withLinux()
.withPrivateImageRegistry(registryAddress, username, password)
.withoutVolume()

requests.forEach {
val thing = containerGroup.defineContainerInstance(it.instanceName)
.withImage(it.remoteImageName)
.withExternalTcpPorts(*it.portsToOpen.toIntArray())
.withEnvironmentVariables(it.env)
.attach().withRestartPolicy(ContainerGroupRestartPolicy.ON_FAILURE)
.withDnsPrefix("${it.instanceName}-$networkName")
}

where a loop will add a container instance to the group.

This does not seem possible.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start at the azure.containerGroups().define and defineContainerInstance entry points shown in the Fluent API example, and trace how attach() finalizes each container definition. Done means a ContainerGroup can be built from a loop with all requested instances and remains deployable; the payload names no files or tests to run.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, java
Bereich
cloud
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.