Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A auto-deploy-image
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 120
    • Issues 120
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • cluster-integration
  • auto-deploy-image
  • Issues
  • #31
Closed
Open
Issue created Feb 04, 2020 by Hordur Freyr Yngvason@hfyngvason👶Maintainer

It should be possible to override all values using a values file

In #29 we found that --set takes priority over --values, even when --values comes after --set.

This means that some values cannot be customized using .gitlab/auto-deploy-values.yaml

Steps to reproduce

Clone auto-deploy-app locally, add a file custom-value.yaml with the contents

# custom-value.yaml
image:
  pullPolicy: HELLO WORLD

First, confirm that it works without --set:

helm dependency build .
helm template . --values custom-value.yaml | grep imagePullPolicy

which outputs

        imagePullPolicy: ""
        imagePullPolicy: HELLO WORLD

Then add a --set:

helm template . --set image.pullPolicy=ECHO --values custom-value.yaml | grep imagePullPolicy

and we get

        imagePullPolicy: ""
        imagePullPolicy: ECHO

i.e. --set took priority over --values.

Proposed solution

Since --values files are merged from left-to-right, we could set all arguments using a dynamically built values file and never use --set

Do this using a small program written in ruby or go that scrapes the environment, turning the helm upgrade command into something like

scrape-environment > "$environment_values_file"

helm upgrade --install \
    "${atomic_flag[@]}" \
    --wait \
    --values "$environment_values_file" \
    "${modsecurity_set_args[@]}" \
    "${helm_values_args[@]}" \
    $HELM_UPGRADE_EXTRA_ARGS \
    --namespace="$KUBE_NAMESPACE" \
    "$name" \
    chart/
Edited Apr 28, 2020 by Hordur Freyr Yngvason
Assignee
Assign to
Time tracking