Skip to content

🔖 Tags

It allows you to choose releases for build.

It works with next flags for build command

Flags
--dependencies             evaluate releases dependencies and add them to the plan even if they don't match provided tags (default: true) [$HELMWAVE_DEPENDENCIES_ENABLED, $HELMWAVE_DEPENDENCIES]
--match-all-tags, --tt                             match all provided tags (default: false) [$HELMWAVE_MATCH_ALL_TAGS]
--tags value, -t value [ --tags value, -t value ]  build releases by tags: -t tag1 -t tag3,tag4 [$HELMWAVE_TAGS]

How to work with --tags and --match-all-tags?

Suppose we have next helmwave.yml with 4 releases

  1. redis-a
  2. redis-b
  3. memcached-a
  4. memcached-b

which tags include which releases

example of helmwave.yml for this case.

helmwave.yml
repositories:
  - name: bitnami
    url: https://charts.bitnami.com/bitnami

releases:
  - name: redis-a
    namespace: test
    chart:
      name: bitnami/redis
    tags:
      - a
      - redis

  - name: redis-b
    namespace: test
    chart:
      name: bitnami/redis
    tags:
      - b
      - redis

  - name: memcached-a
    namespace: test
    chart:
      name: bitnami/redis
    tags:
      - a
      - memcached

  - name: memcached-b
    namespace: test
    chart:
      name: bitnami/memcached
    tags:
      - b
      - memcached
helmwave build -t redis
[🙃 aka INFO]: 🏗 Plan
        releases: 
          - redis-a@test
          - redis-b@test
helmwave build -t a 
[🙃 aka INFO]: 🏗 Plan
        releases: 
          - redis-a@test
          - memcached-a@test
helmwave build -t ab
[🙃 aka INFO]: 🏗 Plan
        releases: 
          - redis-b@test
          - memcached-b@test

If you know SQL. It looks like that:

SELECT * FROM releases WHERE tag = "redis" OR tag = "a"
helmwave build -t redis -t a 
[🙃 aka INFO]: 🏗 Plan
        releases: 
          - redis-a@test
          - redis-b@test
          - memcached-a@test

All that was above, we used the logical OR operator. If you need strongly logic with AND you should use --match-all-tags flag. This flag changes logic for query releases.

helmwave build --match-all-tags -t redis -t a 
[🙃 aka INFO]: 🏗 Plan
        releases: 
          - redis-a@test