diff --git a/ansible/group_vars/all/kolla b/ansible/group_vars/all/kolla index 97a8983435a2e7b6b9f3dbb9b58e6e0acf56a009..903f4ae80d9a5d8cea8d33a5e1fc0eb1ddce32a0 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 d08d37ac72b53bbf13a4b52b9d092ad033f995c0..66de5825f559729d72aebd2f23f32e531baca9d0 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 e20e2f7217d9fc9e28979b7a0519e8adafe2b706..18a79be3c816571835c4f86a6b310564b68d8048 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 e50f1d7727e2d3d72f640ed4949c7cf888a573e3..10f7b72ad80379c6fb1705d8438b51d02ed45a50 100644 --- a/doc/source/configuration/kolla.rst +++ b/doc/source/configuration/kolla.rst @@ -92,6 +92,9 @@ affect :ref:`Kolla Ansible configuration <configuration-kolla-ansible-global>`. 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 60ab7e4c4ef263d16b234b9b33d39a5c563595b2..12a9e7f1fdeabb7bdb0cf0021c23ba1683074bef 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 0000000000000000000000000000000000000000..4a4b546db115441ba4069044a62fd5cd5579143a --- /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``.