Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tags vs. depends_on #734

Open
antonvigo opened this issue Sep 19, 2023 · 1 comment
Open

tags vs. depends_on #734

antonvigo opened this issue Sep 19, 2023 · 1 comment
Assignees
Milestone

Comments

@antonvigo
Copy link

We've faced with the problem of preventing optional dependencies to be deployed. So we have several products described in helmwave.yml and some of them are dependent from some infrastructure services like redis, postgresql etc. And in some cases these dependencies are acutal for all environments. But sometimes prod deployment is quite "independent". There is no any common pattern. That's why it's very important to have flexible built-in mechanism for such situations. From my point of view it would be great to prevent installation of optional dependencies with tag feature. Actually I've expected that because it seems to be quite obvious. But as it was mentioned in the TG-channel, unfortunately tags don't have influence on the installation of servant services specified in depends_on block. Even if they are optional. For example applying this piece of code with helmwave build -t app_only will install both mentioned services:

  - name: app
    chart:
      name: oci://host/path/to/app
    depends_on:
      - name: redis
        optional: true
    tags:
      - app_only
    values:
      - ...

  - name: redis
    chart:
      name: bitnami/redis
    tags:
      - redis
      - infrastructure
    values:
      - ...

So it would be awesome for tags to have precedence over depends_on section. But taking into account possible unexpected issue it is also convenient to have current behavior as default and some special (boolean) environment variable like HELMWAVE_TAGS_ARE_BOSS to let tags be "the Boss".

All existing workarounds make me suffer and don't let me sleep well. 😄 So I hope this feature will be added.
Thank you!

@zhilyaev zhilyaev self-assigned this Sep 19, 2023
@r3nic1e r3nic1e self-assigned this Sep 20, 2023
@r3nic1e r3nic1e added this to the v0.32.0 milestone Sep 21, 2023
@r3nic1e r3nic1e removed their assignment Sep 21, 2023
@zhilyaev zhilyaev changed the title = tags vs. depends_on = tags vs. depends_on Sep 22, 2023
@r3nic1e r3nic1e modified the milestones: v0.33.0, v0.34.0 Dec 9, 2023
@ansromanov
Copy link

It is still beneficial to use Helmwave tags along with dependencies to have the possibility to deploy a set of desired components with all dependent charts, especially in greenfield deployments.
But during component updates, it could be great to have the possibility of skipping optional dependencies for deployment speed's sake.
I propose to use the CLI flag and environment variable for this:
--skip-dependencies
env HELMWAVE_SKIP_DEPENDENCIES

@zhilyaev zhilyaev modified the milestones: v0.34.0, v0.36.0 Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants