Package: deploy-config-generator
deploy-config-generatorUtility for generating deployment configs for a serviceBasic usageThe dirty detailsSite configGlobal optionsVariablesDeploy configPluginsDevelopmentRunning testsRegenerating plugin docsBasic usageThe below command will generate the required deployment config files for the specified service in the current directory.deploy-config-generatorpath/to/service/repoYou can specify the environment to generate configuration for.deploy-config-generatorpath/to/service/repo-estageYou can specify the output directory using the--output-diroption.deploy-config-generatorpath/to/service/repo--output-dir/tmpYou can increase the verbosity level to see what the script is doing.deploy-config-generatorpath/to/service/repo-vvvYou can specify the path to a site config file.deploy-config-generatorpath/to/service/repo--configpath/to/site/config.ymlThe dirty detailsSite configThe optional site config file is expected to be a YAML file with the following basic structure.---some_global_option:fooanother_global_option:barplugins:plugin_name:some_plugin_option:bazfields:<field definitions>The field definitions should have the following basic structure (continued from above).fields:field_name1:type:strfield_name2:type:booldefault:falseGlobal optionsThe following global options are available.NameDefaultDescriptiondefault_outputThe default output plugin to use (probably to be removed)deploy_dirdeployDirectory within service dir where deploy config is locateddeploy_config_fileconfig.ymlName of deploy config filevars_dirvarDirectory within deploy dir to look for vars filesdefaults_vars_file_patterns['defaults.var']Patterns for finding "defaults" vars filesenv_vars_file_patterns['{{ env }}.var', 'env_{{ env }}.var']Patterns for finding env-specific vars filesuse_env_varsTrueWhether to read vars from environmentplugin_dirs[]Additional dirs where plugins can be foundVariablesVariables are read from shell-compatible.varfiles (by default) located in the deploy directory. Variable
definitions referencing other variables (using the$FOOor${FOO}notation) are supported. Vars are read
in the following order.vars from site config (thedefault_varskey)vars from environment - useful for running in a CI job"defaults" vars file(s) - default values for all environmentsenv-specific vars files - values specific to a particular application environmentDeploy configThe deploy config is read fromdeploy/config.yml(by default) from the directory specified on the
commandline. It is expected to be a YAML file with the following basic structure.---apps:<app definitions>jobs:<job definitions>The available top-level sections and the keys allowed for them are defined by the individual output
plugins.PluginsThis tool uses a plugin system for handling the generation of deploy files for various backends.The following output plugins are available:dummykongfigkube_configmapkube_cronjobkube_deploymentkube_dnsendpointkube_ingresskube_jobkube_kong_consumerkube_kong_ingresskube_kong_pluginkube_namespacekube_pdbkube_pvkube_pvckube_secretkube_servicekube_servicemonitorkube_statefulsetmarathonmetronomeDevelopmentRunning testsThis tool comes with unit and integration test suites, which can be run with the commands:pythonsetup.pytestpythonsetup.pyintegrationYou can run the full test suite in multiple python versions usingtoxby running:toxRegenerating plugin docsThe docs for the individual plugins are generated from the code of the plugins. You can regenerate the plugin docs
with the following command:scripts/gen-plugin-docs.py