Azure / azure-sdk-for-go

This repository is for active development of the Azure SDK for Go. For consumers of the SDK we recommend visiting our public developer docs at:
https://docs.microsoft.com/azure/developer/go/
MIT License
1.6k stars 821 forks source link

Not getting an option to mount volume for an azure container job at the time of start #22168

Open kumarmo-2 opened 9 months ago

kumarmo-2 commented 9 months ago

Bug Report

Below is how i am defining the template.

    args := getContainerArgs(processId, debug, redisUri, meta, timeout)
    envId := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.App/managedEnvironments/%s", subscriptionId, resourceGroupName, containerEnvName)
    container := aca.JobExecutionContainer{
        Name:  &containerExecutionName,
        Image: &containerImage,
        Args:  args,
    }
    jobTemplate := &aca.JobExecutionTemplate{
        Containers: []*aca.JobExecutionContainer{&container},
    }

The behavior i am seeing doing this is that, my volume mount and my environment variables that i defined at the time of job creation are not present when the job is running.

Now what i believe is happening here, is basically its overriding the configuration that i created at the time of the job creation. I could have done that, but I am seeing no way to attach volumes to the container. Although i can define environment variables.

The struct JobExecutionTemplate, allows me to defined the Containers and Init Containers but not volumes. This is a deal breaker for me to use jobs.

github-actions[bot] commented 8 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp @AzureAppServiceCLI.