marmelab / greenframe-cli

Estimate the carbon footprint of a user scenario on a web application
https://greenframe.io
Other
220 stars 9 forks source link

Cannot override kubeContainers and kubeDatabaseContainers parameter #43

Closed vpeltot closed 1 year ago

vpeltot commented 1 year ago

Currently it is not possible to override kubeContainers and kubeDatabaseContainers parameters with a command line flag

$ greenframe analyze --help
Create an analysis on GreenFrame server.

USAGE
  $ greenframe analyze [BASEURL] [SCENARIO] [-C <value>] [-K <value>] [-t <value>] [-p <value>] [-c <value>] [--commitId <value>] [-b
    <value>] [-s <value>] [-d] [-a] [-i] [--dockerdHost <value>] [--dockerdPort <value>] [--containers <value>] [--databaseContainers <value>]

ARGUMENTS
  BASEURL   Your baseURL website
  SCENARIO  Path to your GreenFrame scenario

FLAGS
  -C, --configFile=<value>      Path to config file
  -K, --kubeConfig=<value>      Path to kubernetes client config file
  -a, --useAdblock              Use an adblocker during analysis
  -b, --branchName=<value>      Pass branch name manually
  -c, --commitMessage=<value>   Pass commit message manually
  -d, --distant                 Run a distant analysis on GreenFrame Server instead of locally
  -i, --ignoreHTTPSErrors       Ignore HTTPS errors during analysis
  -p, --projectName=<value>     Project name
  -s, --samples=<value>         Number of runs done for the score computation
  -t, --threshold=<value>       Consumption threshold
  --commitId=<value>            Pass commit id manually
  --containers=<value>          Pass containers manually
  --databaseContainers=<value>  Pass database containers manually

<-- Missing kubeContainers and kubeDatabaseContainers flags -->

  --dockerdHost=<value>         Docker daemon host
  --dockerdPort=<value>         Docker daemon port

DESCRIPTION
  Create an analysis on GreenFrame server.

When I try to add these parameters anyway, I get the following error:

Unexpected argument: --kubeContainers=....

fzaninotto commented 1 year ago

Can you confirm this works with the configuration file though?

vpeltot commented 1 year ago

Yes, everything works with the configuration file. Only the overriding via the command line parameters did not work.