Code Monkey home page Code Monkey logo

Comments (9)

kanika1894 avatar kanika1894 commented on July 23, 2024 1

I understand your concern @roncsak . Thanks a lot for explaining it with all details.
As of now, the requirement of these parameters is mandatory by design. To address your concern regarding ease of usage, we'll consider this enhancement. Can't promise a date yet, will have to see when can this be prioritized.
Meanwhile, feel free to contribute and raise a PR. Contributions are most welcome!

from aci-deploy.

HonzaV avatar HonzaV commented on July 23, 2024

I had the same problem. The cause was, that when creting container instances I used non-default values for RAM nad the aci-deploy action has default values on these params and these values were different, therefore Azure thinks "Oh hey, you are trying add more memory? No way without delete." So the solution was to specify these optional params in pipeline and set them to the same values as in Container Instances.

It also updated my secure env variables. I have some secrets there, so I can't specify it in pipeline. It could be resolved adding them to Gihtub Secrets probably, but I'd prefer not to have specify them at all.

from aci-deploy.

github-actions avatar github-actions commented on July 23, 2024

This issue is idle because it has been open for 14 days with no activity.

from aci-deploy.

kanika1894 avatar kanika1894 commented on July 23, 2024

Thanks for your insights @HonzaV
@roncsak Were you able to make progress?

from aci-deploy.

roncsak avatar roncsak commented on July 23, 2024

Hello @kanika1894,
if you read carefully, @HonzaV confirms the issue and the workaround I had, too.
I see only two options viable:

  • Make cpu, memory, restart-policy mandatory
  • Let cpu, memory, restart-policy optional and aci-deploy should know that it is currently updating an ACI or creating a new one. Upon creating a new one, use default values (in case not provided) to create ACI but check set values of created ACI upon updating.

The latter one would be the ultimate solution.

from aci-deploy.

github-actions avatar github-actions commented on July 23, 2024

This issue is idle because it has been open for 14 days with no activity.

from aci-deploy.

kanika1894 avatar kanika1894 commented on July 23, 2024

Hey @roncsak,

The default values for cpu, memory and restart-policy are given for the scenario when the user deploys a new container from the workflow itself.
The error The updates on container group 'mycontainer' are invalid. If you are going to update the os type, restart policy, network profile, CPU, memory, or GPU resources for a container group, you must delete it first and then create a new one. comes when a user is trying to update an existing container with a new image(having different values for the specified parameters). Also, if the update is except these image parameters, say, while updating dns-name-label, this won't come.

This is in sync with the fact that changes in certain properties require deletion and redeployment. Please refer this doc for more information.

from aci-deploy.

roncsak avatar roncsak commented on July 23, 2024

Hey @kanika1894,
that's the very thing that I don't want to!

Just look at the example code written here.

        - name: 'Deploy to Azure Container Instances'
          uses: 'azure/aci-deploy@v1'
          with:
            resource-group: contoso
            dns-name-label: url-for-container
            image: contoso.azurecr.io/nodejssampleapp:${{ github.sha }}
            registry-username: ${{ secrets.REGISTRY_USERNAME }}
            registry-password: ${{ secrets.REGISTRY_PASSWORD }}
            name: contoso-container
            location: 'west us'

Do you see? Even the example code omits the usage of cpu, memory and restart-plocy.

So what happens if an infastructure guy creates a Container Instance beforehand with 2 vcpu and 2 GB memory?
This example code will fail because this GH Action will pass default values of those attributes!
The problem is, that a regular developer shouldn't care about how much cpu and memory this resource has. If developers want to change the image only, they shouldn't care providing cpu and memory.
Operations will monitor the resource and they will act if needed.

The very simple problem with this action that it provides default values for some attributes (e.g. cpu and memory) even if the Container Instance is already created!
It could be easily fixed as I wrote in the original post.

from aci-deploy.

github-actions avatar github-actions commented on July 23, 2024

This issue is idle because it has been open for 14 days with no activity.

from aci-deploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.