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

Add a variable shorthand for helm values #2133

Closed
Racer159 opened this issue Nov 8, 2023 · 3 comments
Closed

Add a variable shorthand for helm values #2133

Racer159 opened this issue Nov 8, 2023 · 3 comments
Assignees
Labels
enhancement ✨ New feature or request
Milestone

Comments

@Racer159
Copy link
Contributor

Racer159 commented Nov 8, 2023

Is your feature request related to a problem? Please describe.

As Ezra I want a way to tie Zarf variables to Helm values so that I can more efficiently template values in the packages I build.

Describe the solution you'd like

  • Given I have a Helm Chart
  • And I have a variable I would like to template into its values
  • When I specify a new key on a chart under charts including the Zarf variable and the Helm value
  • Then that Zarf variable is set as that Helm value on deployments and templates of that chart.

Describe alternatives you've considered

Folks could use the existing logic and add templates but this simplifies things and allows people to more directly take advantage of Helm templating and featuresets without having to do a lot of manual wiring.

Additional context

This is being implemented in library form first through #2131

@Racer159 Racer159 added the enhancement ✨ New feature or request label Nov 8, 2023
@Racer159 Racer159 added this to the The Bucket milestone Nov 8, 2023
@Racer159
Copy link
Contributor Author

Racer159 commented Mar 6, 2024

An example of how this might look:

# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json
kind: ZarfPackageConfig
metadata:
  name: gitlab-common
  description: "UDS GitLab Common Package"

variables:
  - name: MIGRATIONS_RESOURCES
    description: "Gitlab Migrations Resources"
    prompt: true

components:
  - name: gitlab
    required: true
    charts:
      - name: uds-gitlab-config
        namespace: gitlab
        version: 0.1.0
        localPath: ../chart
      - name: gitlab
        namespace: gitlab
        url: https://repo1.dso.mil/big-bang/product/packages/gitlab.git
        gitPath: chart
        version: "7.9.1-bb.0"
        variables:
          - name: MIGRATIONS_RESOURCES
            description: "Gitlab Migrations Resources"
            path: "gitlab.migrations.resources"
          - name: WEBSERVICE_REPLICAS
            description: "Gitlab Webservice Min Replicas"
            path: "gitlab.webservice.minReplicas"
          - name: WEBSERVICE_RESOURCES
            description: "Gitlab Webservice Resources"
            path: "gitlab.webservice.resources"
          - name: WORKHORSE_RESOURCES
            description: "Gitlab Workhorse Resources"
            path: "gitlab.workhorse.resources"
          - name: SIDEKIQ_REPLICAS
            description: "Gitlab Sidekiq Min Replicas"
            path: "gitlab.sidekiq.minReplicas"
          - name: SIDEKIQ_RESOURCES
            description: "Gitlab Sidekiq Resources"
            path: "gitlab.sidekiq.resources"
          - name: REGISTRY_REPLICAS
            description: "Gitlab Registry Min Replicas"
            path: "registry.hpa.minReplicas"
          - name: SHELL_REPLICAS
            description: "Gitlab Shell Min Replicas"
            path: "gitlab.gitlab-shell.minReplicas"
        valuesFiles:
          - ../values/common-values.yaml

@Racer159
Copy link
Contributor Author

naveensrinivasan added a commit that referenced this issue Mar 25, 2024
- This feature allows chart deployment overrides.
- #2133

Signed-off-by: naveensrinivasan <[email protected]>
naveensrinivasan added a commit that referenced this issue Mar 25, 2024
- This feature allows chart deployment overrides.
- #2133

Signed-off-by: naveensrinivasan <[email protected]>
naveensrinivasan added a commit that referenced this issue Mar 25, 2024
- This feature allows chart deployment overrides.
- #2133

Signed-off-by: naveensrinivasan <[email protected]>
naveensrinivasan added a commit that referenced this issue Mar 28, 2024
- This feature allows chart deployment overrides.
- #2133

Signed-off-by: naveensrinivasan <[email protected]>
naveensrinivasan added a commit that referenced this issue Apr 4, 2024
- This feature allows chart deployment overrides.
- #2133

Signed-off-by: naveensrinivasan <[email protected]>
naveensrinivasan added a commit that referenced this issue Apr 8, 2024
- This feature allows chart deployment overrides.
- #2133

Signed-off-by: naveensrinivasan <[email protected]>
Noxsios added a commit that referenced this issue Apr 9, 2024
## Description
- This feature allows chart deployment overrides.

## Related Issue

Relates to #2133

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed

---------

Signed-off-by: naveensrinivasan <[email protected]>
Co-authored-by: Lucas Rodriguez <[email protected]>
Co-authored-by: razzle <[email protected]>
Co-authored-by: Austin Abro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants