Code Monkey home page Code Monkey logo

Comments (10)

hypnoglow avatar hypnoglow commented on May 28, 2024 1

Version 0.6.0 is released with this feature implemented 🎉, so I'm closing this issue. Feel free to open a new issue if something goes wrong

from helm-s3.

hypnoglow avatar hypnoglow commented on May 28, 2024

Hi @SharpEdgeMarshall !

I think that the push should be rejected if the version is already there.

Can you please describe your use case where you need to reject the push attempt on existing version?

In addition if i push the same version the index file doesn't overrides the old one.

I'm going to investigate this and respond after.

from helm-s3.

SharpEdgeMarshall avatar SharpEdgeMarshall commented on May 28, 2024

Use case is CI automated pushing of charts packages, if someone forget to bump chart version the package is overwritten.
This could potentially cause issue in production if a deploy of the application is made after.
The best solution i could think is a --force flag to replace the package if already present.

from helm-s3.

hypnoglow avatar hypnoglow commented on May 28, 2024

As I investigated, Helm maintainers adhere to the idea of immutable charts. So I think your proposal makes sense, with a --force flag implementation.

Let me think a bit more about it. If I will not find any reason against, I will implement it.

from helm-s3.

markhu avatar markhu commented on May 28, 2024

I agree, unless there is a -SNAPSHOT suffix.

from helm-s3.

andrewlock avatar andrewlock commented on May 28, 2024

+1 for this proposal, I just ran into an issue because of exactly this situation

from helm-s3.

hypnoglow avatar hypnoglow commented on May 28, 2024

I think --replace is the most suitable name for a flag since it explicitly declares the intent.

So the implementation works as follows:

$ helm s3 push /tmp/foobar-0.5.2.tgz hypnoglow
The chart already exists in the repository and cannot be overwritten without an explicit intent. If you want to replace existing chart, use --replace flag:

	helm s3 push --replace /tmp/foobar-0.5.2.tgz hypnoglow

Error: plugin "s3" exited with error

What do you think?


I agree, unless there is a -SNAPSHOT suffix.

I'm not sure if we need to treat some specific versions in another way. I mean, I think the plugin should be agnostic to the filename/version.

from helm-s3.

andrewlock avatar andrewlock commented on May 28, 2024

Looks good to me 👍

I'm not sure if we need to treat some specific versions in another way. I mean, I think the plugin should be agnostic to the filename/version.

I agree, the decision to replace or not should be made external to the plugin

from helm-s3.

SharpEdgeMarshall avatar SharpEdgeMarshall commented on May 28, 2024

I think that --force is a better naming because is consistent with other tools and doesn't assume there is a version to replace like --replace instead do.

from helm-s3.

hypnoglow avatar hypnoglow commented on May 28, 2024

@SharpEdgeMarshall You convinced me, let it be --force 👌

from helm-s3.

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.