Updated env file and kube config file handling
New:
- Imported kaas/* repositories (1100+)
- Options for use of specific configs (env and kaas)
Fixes:
- updated header index search
- fixed package name handling
- fixed --force-tag option
Change-Id: Ib51ea9a47db93d6dd0868c32cb389d70053af26c
Related-PROD: PROD-35903
diff --git a/cfg_checker/cli/arguments.py b/cfg_checker/cli/arguments.py
index bd162a8..9ccf2f7 100644
--- a/cfg_checker/cli/arguments.py
+++ b/cfg_checker/cli/arguments.py
@@ -1,3 +1,11 @@
+import os
+
+from cfg_checker.common.settings import pkg_dir
+
+_env_name = "local"
+_config_path = os.path.join(pkg_dir, 'etc', _env_name + '.env')
+
+
def add_global_arguments(parser):
parser.add_argument(
"-d",
@@ -23,17 +31,30 @@
" Example: 'cmp*,ctl01'"
)
parser.add_argument(
- '--kube-config-path',
- metavar='skip_string', default="/root/.kube/config",
+ '--kube-config',
+ metavar='kube_config', default="/root/.kube/config",
help="Kube config path with certificates and keys. "
"Default: '/root/.kube/config'"
)
parser.add_argument(
- '--use-env',
- metavar='use_env',
+ '--force-env-type',
+ metavar='force_env_type',
help="Specify env to use if function supports multiple among detected"
" Example: SALT/KUBE"
)
+ parser.add_argument(
+ '--env-name',
+ metavar='env_name', default=_env_name,
+ help="Use of given env name instead of MCP_ENV var"
+ "Default: {}".format(_env_name)
+ )
+
+ parser.add_argument(
+ '--env-config',
+ metavar='env_config', default=_config_path,
+ help="Force use of given env file"
+ "Default: '{}'".format(_config_path)
+ )
parser.add_argument(
'--skip-nodes-file',