Comments (8)
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.
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.
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.
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.
@putz612 do you mean in the context of additionalContainers
? or something else?
from helm-charts.
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.
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.
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)
- common library: Remove additionalContainers key HOT 1
- common library: Remove list-based sidecars / initContainers entries HOT 1
- Add finalizers to meta data HOT 3
- Clarify this repo's purpose? HOT 6
- Preserve order of `initContainers` HOT 1
- Add a JSON schema HOT 5
- Is there documentation on how to convert an "old" k8s-at-home chart to using the new common library maintained in this repo? HOT 1
- When service 'http' is not defined, the service object gets rendered incorrectly HOT 1
- app-template doesn't like the image tag in the form a.b HOT 4
- Support for prometheusRule HOT 1
- Allow service loadbalancer modifier HOT 2
- Rename `ingressClassName` to `className` HOT 2
- Ingress port must be of type Int32 HOT 2
- Support for Argo Rollouts Controller
- Add support for networkpolicy HOT 2
- Multiple Images HOT 5
- Don't sort env variables HOT 2
- Support mulitline stringData secret HOT 2
- expected map[string]interface {}; got bool in _ports.tpl
- UDP/TCP Ingress HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helm-charts.