Coder Social home page Coder Social logo

hadsch / helm-share-values-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 17 KB

Demostration how to share values between multiple helm Subcharts using the `global` key and using the template syntax as value in the values.yaml file

License: GNU General Public License v3.0

helm-share-values-demo's Introduction

This is a demonstration how you can share values between multiple helm Subcharts using the global key and using the template syntax as value in the values.yaml file.

Usage

To test the output use this command:

helm install --dry-run demo my-chart

Each Subchart is a standalone chart and can be used separately. To test one Subchart use this command:

  helm install --dry-run demo my-chart/charts/subchart-main

Output

As you can see the values are shared between the Subcharts and the parent chart.

# Source: mychart/charts/subchart-main/templates/subchart-main.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: demo-cfg-subchart-main
data:
  # Important: The values containing the template syntax. Therefore the template function is required to get the defined values in the global section.
  name: my-service-1 SHARED
  endpoint: my-service-1-endpoint SHARED
---
# Source: mychart/charts/subchart01/templates/subchart01-cfg.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: demo-cfg-subchart01
data:
  name: my-service-1 SHARED
  endpoint: my-service-1-endpoint SHARED
---
# Source: mychart/templates/parent.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: demo-cfg-parent
data:
  my-value: my-service-1 SHARED

helm-share-values-demo's People

Contributors

hadsch avatar

Watchers

 avatar

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.