Working with sub-charts helm doesn't create the sub-charts?

1/9/2018

I created a parent chart called "core-chart", and underneath it created few sub-charts.

The structure is like that (all chart directories are basically same contant):

/-core-chart/
 |_values.yaml
 |_charts.yaml
 |_requirments.yaml
 |_charts/
     |_redis-chart/
               |_templates/
                       |_redis.yaml
               |_values.yaml
               |_charts.yaml
     |_postgres-chart/
     |_cassandra-chart/
     |_activemq-chart/

When trying to install the core chart it install all other charts deployments and services, but I don't see the sub-charts when typing :

helm ls --all
NAME            REVISION        UPDATED                         STATUS          CHART                   NAMESPACE
core-chart      1               Tue Jan  9 18:33:02 2018        DEPLOYED        core-chart-0.1.0        default

Isn't there a way the create the sub-charts as well so I will be able to control them separately?

I tried to use tags and conditions but it didn't really worked :\

requirments.yaml:

dependencies:
      - name: redis-chart
        version: 0.1.0
        condition: redis-chart.enabled
        tags:
            - redis

      - name: postgres-chart
        version: 0.1.0
        condition: postgres-chart.enabled
        tags:
            - postgres

      - name: cassandra-chart
        version: 0.1.0
        condition: cassandra-chart.enabled
        tags:
            - cassandra

      - name: activemq-chart
        version: 0.1.0
        condition: activemq-chart.enabled
        tags:
            - activemq

Values.yaml:

    redis-chart:
        enabled: true
        kind: Service
        ports:
         port: 5432

        kind: Deployment
        replicaCount: 1
        resources:
         requestMemory: 100m
         requestCpu: 100Mi

        image:
          name: redis-master
          imageName: redis
          imageVersion: 4.0.6
        ports:
          port: 5432
        tags:
          redis: true

Example command for trying to disable sub-charts:

helm install --debug --set postgres-chart.enabled=false --set tags.redis=true --set cassandra-chart.enabled=false --set activemq-chart.enabled=false --name core-chart .
-- Shachar Hamuzim Rajuan
kubernetes
kubernetes-helm

0 Answers