Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • gitlab-ci gitlab-ci
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • catladder
  • gitlab-cigitlab-ci
  • Merge requests
  • !13

default commands & values from env vars

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Marco Wettstein requested to merge f/default-commands into master Sep 01, 2021
  • Overview 1
  • Commits 1
  • Pipelines 8
  • Changes 7

the-panter-chart 2.0.0 no longer defines a default command.

this pr here adds default commands.

while iterating over this i found that the most flexible approach is to construct an additional values file from env-vars. Here is how this works:

in gitlab-ci, you can define DEFAULT_VALUE_ prefixed variables:

DEFAULT_VALUE_application_command: "my command"

which will get converted to

application:
  command: my command

This also allows to alter values based on job definitions and reduces the need for extra --set args in the helm command.

E.g. i could replace REPLICAS with DEFAULT_VALUE_application_replicas, which now can get overridden much more easyly

notice that values.yml (and values-prod, etc.) take precedence over these values (hence the DEFAULT prefix)

Edited Sep 01, 2021 by Marco Wettstein
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: f/default-commands