Mentions légales du service

Skip to content

custom variables

Alexandre MERLIN requested to merge env_variable into arch
  • Injecting custom variables from the cli with --custom-variable KEY=VALUE (can be specify multiple times) or from the env description with the "custom_variables" hash or in the cluster configuration with the hash of the same name.
  • The custom variables are accessible in kadeploy scripts by prefixing them by "KADEPLOY_". (eg: KADEPLOY_DEBUG)
  • The name of the variable and the value must be a string.
  • Priority of variables: CLI > env description > cluster configuration. A warning appears when a custom variable is overwrite. (eg: "Custom Variables from the environement overwrite by the client: DEBUG.")
  • Some name are reserved by kadeploy and can't be overwrite. An error is thrown when trying to name a custom variable with such name from the CLI. (eg: "You cannot overwrite Kadeploy variables: CLUSTER.")

TODO:

  • Ajouter l'option dans kareboot (et kapower?)
  • Meilleur gestion de l'erreur où la variable existe déjà
  • Mieux traiter les inputs (pour l'instant je vérifie juste que c'est un hash, mais il faut veriier que c'est un hash que d'une profondeur et avec que des strings ?)
Edited by Alexandre MERLIN

Merge request reports