Giter VIP home page Giter VIP logo

Comments (8)

bjw-s avatar bjw-s commented on May 31, 2024 2

I've just added a page to the documentation with an example, hopefully this explains things a bit?
https://bjw-s.github.io/helm-charts/docs/common-library/howto/helm-templates.html

from helm-charts.

onedr0p avatar onedr0p commented on May 31, 2024 1

Here's an example I use, anything passed into additionalContainers is a standard kubernetes containers object.

---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: bazarr
  namespace: default
spec:
# ...
  values:
# ...
    additionalContainers:
      subcleaner:
        name: subcleaner
        image: k8s.gcr.io/git-sync/git-sync:v3.6.2
        args:
          - --repo=https://github.com/KBlixt/subcleaner.git
          - --branch=master
          - --depth=1
          - --root=/add-ons/subcleaner
        volumeMounts:
          - name: add-ons
            mountPath: /add-ons
# ...

You services would still be defined in the Values of root object service.

from helm-charts.

putz612 avatar putz612 commented on May 31, 2024 1

Totally get it now. Spent a while looking for examples in your repos trying to figure it out, makes a lot more since seeing a working one.

from helm-charts.

putz612 avatar putz612 commented on May 31, 2024

In the values.yaml there is a mention that "Helm templates can be used". Is there an example of using a template there?

from helm-charts.

onedr0p avatar onedr0p commented on May 31, 2024

@putz612 do you mean in the context of additionalContainers? or something else?

from helm-charts.

putz612 avatar putz612 commented on May 31, 2024

Just in the context of additionalContainers. I have seen this comment on the library and did not understand what it meant. https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml#L195-L197

from helm-charts.

putz612 avatar putz612 commented on May 31, 2024

It does a lot, I was so very wrong with what that meant. Would it be possible to add the additionalContainers example with the note on the service as well? That one took me awhile to figure out. I really appreciate all the hard work that went into this. It's absolutely amazing. Thank you!

from helm-charts.

bjw-s avatar bjw-s commented on May 31, 2024

Once the Helm template is rendered the contents of additionalContainer gets added to the container list in the main Pod manifest which is defined by the Kubernetes PodSpec spec: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container.

So if you would want to define ports, volumeMounts or set environment variables you would have to set them "as usual".

from helm-charts.

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.