Giter VIP home page Giter VIP logo

Comments (8)

kferrone avatar kferrone commented on June 2, 2024 2

Maybe just allow a Flux specific post render. I suggested to Crossplane to include a simple patch method to their Helm controller, they agreed. I suggested to implement a simple post render json patch. Then implementation would look just like how kustomize does patches, something like:

patches:
- patch: |-
    - op: replace
      path: /some/existing/path
      value: new value
  target:
    kind: MyKind
    labelSelector: "env=dev"

Then you don't need to deal with the chaos of all the different ways a post render may look and this basically covers most possible use cases.

from helm-controller.

hiddeco avatar hiddeco commented on June 2, 2024 2

This is a great feature request and slipped through the cracks while I collected "highly upvoted issues" from the Helm Operator to determine the feature set for the helm-controller. It had already resurfaced in my mind due to discussions with @scottrigby, but had not been recorded in an issue yet, so thank you for doing just that. 🌻

Your proposal @kferrone, would serve use-cases where you want to apply a simple patch to the manifests rendered by Helm very well. This may be sufficient to most users, but due to the fact that the feature in Helm is still relatively unknown[1], there (still) is a lack of real world (non-declarative) examples to confirm this.

However, if this turns out to be limiting, we will eventually hear about it from our users and can then think about extending the support for other post-renderers (one way that has crossed my mind is by utilizing jobs with user defined images, but note that keeping track of jobs is not a light introduction), as long as we design the API properly.

from helm-controller.

valeriano-manassero avatar valeriano-manassero commented on June 2, 2024 1

This implementation would be amazing for my implementations since I'm currently forced to fork a lot of Helm charts used on production clusters by Flux.

from helm-controller.

hiddeco avatar hiddeco commented on June 2, 2024 1

Solved in #202.

from helm-controller.

seaneagan avatar seaneagan commented on June 2, 2024

Perhaps we could use KRM config functions for this, which would provide robust capabilities without any need to support arbitrary renderer binaries running inside the helm-controller (container images instead). See also the related kustomize functionality. Whatever support we include there for configuring the function runtime (e.g. network access) we'd want to probably allow the same here. As far as where to source the function definitions from:

  1. Via a path within a GitRepository or Bucket:
spec:
  functions:
    path: manifests/functions
    sourceRef:
      kind: GitRepository
      name: ...

The function runtime has some logic to determine the order of functions based on the directory layout etc.
2. A list of configmaps/secrets keys
3. A directory within the chart
4. Directly from the chart output

  1. and 2. seems nice for being able to store your function configs alongside your HelmReleases. However with 1. I'm not sure how to reference a source from the manifests within that source (HelmRelease in this case). 2. solves this, but does require applying the configmaps/secrets to the cluster, but that's not a big deal. 3. and 4. require ownership of the chart to be able to make the updates which seems less useful.

from helm-controller.

hiddeco avatar hiddeco commented on June 2, 2024

@seaneagan I am afraid that using KRM config functions from within a Kubernetes Pod is not possible.

If you look at the diagram here there is an assumption that local containers can be spawned (as possible in e.g. a CI pipeline), but a Pod in Kubernetes does not have access the Controller Runtime Interface (which is a great thing), and can thus not spawn any containers.

In addition to this technical limitation, I think that diverging from the functionality and the PostRenderer interface as introduced by Helm creates a xkcd#927 situation, and find the API proposal difficult to understand (which is a sign that it may be even harder to understand for users coming from a Helm background).

from helm-controller.

kdorosh avatar kdorosh commented on June 2, 2024

@hiddeco any updates on this one / roadmap?

from helm-controller.

hiddeco avatar hiddeco commented on June 2, 2024

No updates on this from my side yet, but I welcome PRs with an enhancement as described in your comment.

from helm-controller.

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.