Skip to content

Commit ca230c7

Browse files
elelayshpriteau
authored andcommitted
Add support for url sources in kolla_sources
Previously the version and sha256 attributes would not be generated in kolla-build.conf, preventing the override for sources with url type. Only git and local types worked. Change-Id: I0a5100347d8755a452d2744a458b3177e41196ca Signed-off-by: Eric Le Lay <eric@stackhpc.com>
1 parent 62721ab commit ca230c7

3 files changed

Lines changed: 28 additions & 1 deletion

File tree

ansible/roles/kolla-build/templates/kolla/kolla-build.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ location = {{ source_def.location }}
4040
# Reference of source for {{ source_name }}.
4141
reference = {{ source_def.reference }}
4242
{% endif %}
43+
{% if source_def.sha256 is defined %}
44+
{# generates sha256 = amd64:xxx,arm64:yyy #}
45+
sha256 = {{ source_def.sha256.keys() | zip (source_def.sha256.values()) | map("join", ":") | join(",") }}
46+
{% endif %}
47+
{% if source_def.version is defined %}
48+
version = {{ source_def.version }}
49+
{% endif %}
4350

4451
{% endfor %}
4552

doc/source/configuration/reference/kolla.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ default is to specify the URL and version of Bifrost, as defined in
247247
``${KAYOBE_CONFIG_PATH}/bifrost.yml``.
248248

249249
For example, to specify a custom source location for the ``ironic-base``
250-
package:
250+
package and a custom version of cadvisor:
251251

252252
.. code-block:: yaml
253253
:caption: ``kolla.yml``
@@ -261,6 +261,11 @@ package:
261261
type: "git"
262262
location: https://git.example.com/ironic
263263
reference: downstream
264+
prometheus-cadvisor:
265+
version: "0.54.1"
266+
sha256:
267+
amd64: xxxx
268+
arm64: yyyy
264269
265270
This will result in Kayobe adding the following configuration to
266271
``kolla-build.conf``:
@@ -278,9 +283,17 @@ This will result in Kayobe adding the following configuration to
278283
location = https://git.example.com/ironic
279284
reference = downstream
280285
286+
[prometheus-cadvisor]
287+
version = 0.54.1
288+
sha256 = amd64:xxxx,arm64:yyyy
289+
281290
Note that it is currently necessary to include the Bifrost source location if
282291
using a seed.
283292

293+
Note that it is not necessary to specify the prometheus-cadvisor ``type: url``
294+
and ``location: https://github.com/...`` because they are inherited from kolla
295+
(``kolla/common/sources.py``).
296+
284297
Plugins & additions
285298
-------------------
286299

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
feature:
3+
- |
4+
Adds support for ``url`` sources in ``kolla_sources``. Previously the
5+
``version`` and ``sha256`` attributes would not be generated in
6+
``kolla-build.conf``, preventing the override for sources with ``url``
7+
type. Only ``git`` and ``local`` types worked.

0 commit comments

Comments
 (0)