diff --git a/ansible/group_vars/all/kolla b/ansible/group_vars/all/kolla index 97a898343..903f4ae80 100644 --- a/ansible/group_vars/all/kolla +++ b/ansible/group_vars/all/kolla @@ -74,6 +74,10 @@ kolla_docker_registry_password: # Default is {{ openstack_release }}. kolla_openstack_release: "{{ openstack_release }}" +# Docker tag applied to built container images. Default is +# {{ kolla_openstack_release }}. +kolla_tag: "{{ kolla_openstack_release }}" + # Dict mapping names of sources to their definitions for # kolla_install_type=source. See kolla.common.config for details. # Example: diff --git a/ansible/roles/kolla-build/defaults/main.yml b/ansible/roles/kolla-build/defaults/main.yml index d08d37ac7..66de5825f 100644 --- a/ansible/roles/kolla-build/defaults/main.yml +++ b/ansible/roles/kolla-build/defaults/main.yml @@ -15,7 +15,7 @@ kolla_install_type: kolla_docker_namespace: # Valid option is Docker repository tag -kolla_openstack_release: +kolla_tag: # Dict mapping names of sources to their definitions for # kolla_install_type=source. See kolla.common.config for details. diff --git a/ansible/roles/kolla-build/templates/kolla-build.conf.j2 b/ansible/roles/kolla-build/templates/kolla-build.conf.j2 index e20e2f721..18a79be3c 100644 --- a/ansible/roles/kolla-build/templates/kolla-build.conf.j2 +++ b/ansible/roles/kolla-build/templates/kolla-build.conf.j2 @@ -12,7 +12,7 @@ install_type={{ kolla_install_type }} namespace={{ kolla_docker_namespace }} # Docker image tag to apply. -tag={{ kolla_openstack_release }} +tag={{ kolla_tag }} # Path to a file containing template overrides. template_override={{ kolla_build_config_path }}/template-override.j2 diff --git a/doc/source/configuration/kolla.rst b/doc/source/configuration/kolla.rst index e50f1d772..10f7b72ad 100644 --- a/doc/source/configuration/kolla.rst +++ b/doc/source/configuration/kolla.rst @@ -92,6 +92,9 @@ affect :ref:`Kolla Ansible configuration `. Kolla OpenStack release version. This should be a Docker image tag. Default is the OpenStack release name (e.g. ``rocky``) on stable branches and tagged releases, or ``master`` on the Kayobe ``master`` branch. +``kolla_tag`` + Kolla container image tag. This is the tag that will be applied to built + container images. Default is ``kolla_openstack_release``. For example, to build the Kolla ``centos`` ``binary`` images with a namespace of ``example``, and a private Docker registry at ``registry.example.com:4000``, diff --git a/etc/kayobe/kolla.yml b/etc/kayobe/kolla.yml index 60ab7e4c4..12a9e7f1f 100644 --- a/etc/kayobe/kolla.yml +++ b/etc/kayobe/kolla.yml @@ -86,6 +86,10 @@ # Default is {{ openstack_release }}. #kolla_openstack_release: +# Docker tag applied to built container images. Default is +# {{ kolla_openstack_release }}. +#kolla_tag: + # Dict mapping names of sources to their definitions for # kolla_install_type=source. See kolla.common.config for details. # Example: diff --git a/releasenotes/notes/kolla-tag-and-suffix-a223b0c7173a245e.yaml b/releasenotes/notes/kolla-tag-and-suffix-a223b0c7173a245e.yaml new file mode 100644 index 000000000..4a4b546db --- /dev/null +++ b/releasenotes/notes/kolla-tag-and-suffix-a223b0c7173a245e.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Adds a variable for controlling the tag applied to built container images - + ``kolla_tag``. This separates the configuration of the tag for image + building from that used for deployment (``kolla_openstack_release``). The + default for ``kolla_tag`` is ``kolla_openstack_release``.