Multi env support and Kube client integration
Kube friendly Beta
Package versions supports Kube env
Added:
- Env type detection
- New option: --use-env, for selecting env
when function supports multiple detected envs
- Updated config loading
- Each module and command type has supported env check
and stops execution if it is on unsupported env
- Functions can support multiple envs
- Kubernetes dependency
- Kubenernetes API detection: local and remote
- Package checking class hierachy for using Salt or Kube
- Remote pod execution routine
- Flexible SSH/SSH Forwarder classes: with, ssh,do(), etc
- Multithreaded SSH script execution
- Number of workers parameter, default 5
Fixed:
- Config dependency
- Command loading with supported envs list
- Unittests structure and execution flow updated
- Unittests fixes
- Fixed debug mode handling
- Unified command type/support routine
- Nested attrs getter/setter
Change-Id: I3ade693ac21536e2b5dcee4b24d511749dc72759
Related-PROD: PROD-35811
diff --git a/etc/local.env b/etc/local.env
index 4fab668..bf55206 100644
--- a/etc/local.env
+++ b/etc/local.env
@@ -2,15 +2,18 @@
# Local Environment file
# Main log file of the tests
-LOGFILE = '/var/log/salt-cfg-checker.log'
+MCP_LOGFILE = '/var/log/salt-cfg-checker.log'
# Salt master host to connect to
-SALT_URL=127.0.0.1
-
+MCP_ENV_HOST=127.0.0.1
# Salt master port.
# Note that you can safely execute second master (not on production)
# on the same cfg node with diferent port and set logging to ALL
-SALT_PORT=6969
+MCP_SALT_PORT=6969
+
+
+### Salt type section
+# All vars should start with SALT
# User and password to auth on master. Can be found in /srv/salt/...
# No need for a password if environment is local
@@ -29,3 +32,10 @@
# Can be set to 'auto' for automatic collection
# or check the example in 'etc/example._list'
SALT_NODE_LIST_FILE=auto
+
+### K8s section
+# All vars start with KUBE
+KUBE_CONFIG_ROOT=/root
+KUBE_SCRIPTS_FOLDER=cfg-checker-scripts
+KUBE_NODE_USER=ubuntu
+KUBE_NODE_KEYPATH=/home/ubuntu/node_key.rsa
\ No newline at end of file