Skip to content

Commit c1ca37e

Browse files
authored
Merge pull request #527 from stackhpc/url-sources-2024.1
Add support for url sources in kolla_sources (2024.1)
2 parents 911aeb1 + 36ffff3 commit c1ca37e

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
@@ -246,7 +246,7 @@ default is to specify the URL and version of Bifrost, as defined in
246246
``${KAYOBE_CONFIG_PATH}/bifrost.yml``.
247247

248248
For example, to specify a custom source location for the ``ironic-base``
249-
package:
249+
package and a custom version of cadvisor:
250250

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

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

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)