4d34815721
- These changes necessary to enable template re-use. Enables the specification of additional variables to be passed to each template referenced in ./etc/kolla-kubernetes/service_resources.yml - Template.vars are additional vars in the form of a dict passed to the jinja templating engine. Templates may access this dict with "kolla_kubernetes.template.vars.<subkey>". This enables arguments to be passed to templates so that they may be re-used or configured. These template.vars may not contain any other nested jinja references, and are passed unmodified directly to the template. - Used mariadb templates as an example for template.vars - Changes to ./etc/kolla-kubernetes/service_resources.yml resources: disk: - name: mariadb-disk <-- Name is new template: services/mariadb/mariadb-disk.sh.j2 <-- New vars: <-- Template variables are new size_in_gb: 10 <-- Template var example - CLI Syntax Change: Resource templates are specified by name (defined in service_resources.yml) instead of path. This is necessary because the same template may be referenced multiple times in service_resources.yml (with different template args), and a name is necessary to distinguish between the different template/template_args combinations. FROM: kolla-kubernetes resource-template \ <action> <resource_type> <service> <TEMPLATE-FILE> TO: kolla-kubernetes resource-template \ <action> <service> <resource_type> <RESOURCE-NAME> - CLI Syntax Change: Ordering changed to match resource-template FROM: kolla-kubernetes resource <action> <resource_type> <service> TO: kolla-kubernetes resource <action> <service> <resource_type> Change-Id: Ie1e0c973206a239bc3759827149b4e8d67029752 Partially-implements: blueprint kolla-kubernetes-cli |
||
---|---|---|
.. | ||
__init__.py | ||
base_command.py | ||
cmd_resource.py | ||
cmd_service.py |