Skip to content

Commit

Permalink
Replace 'operator' filter with cifmw_set_openstack_containers_exclude…
Browse files Browse the repository at this point in the history
…d_envs

Replace condition ('operator' not in _container) with more understandable
and predictable list of ENV vars that should not be modifed by the role.
Previous filter was created in assumption that container names follow
some pattern, but as discovered recently they are diffreneces in upstream
versus downstream naming. ENVs names are the same, because they are defined
in operators and we should use them instead.
  • Loading branch information
ciecierski authored and openshift-merge-bot[bot] committed Sep 17, 2024
1 parent 28b43a2 commit d7e64e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions roles/set_openstack_containers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The role will generate two 2 files in ~/ci-framework-data/artifacts/ directory a
* `cifmw_set_openstack_containers_overrides`: Extra container overrides. Defaults to `{}`
* `cifmw_set_openstack_containers_prefix`: Container prefix name to set. Defaults to `openstack`
* `cifmw_set_openstack_containers_prefix_filter`: Include in filter containers containing prefix in the name. Defaults to value of `cifmw_set_openstack_containers_prefix`
* `cifmw_set_openstack_containers_excluded_envs`: (List[string]) List of excluded environment variables for container, that should not be modified by the role. Defaults to `[]`.
* `cifmw_set_openstack_containers_openstack_version_change`: (Boolean) Set environment variables for openstack services containers for specific OPENSTACK_RELEASE_VERSION defined in cifmw_set_openstack_containers_update_target_version. It should be used only for meta openstack operator in prepare for openstack minor update. Defaults to `false`.
* `cifmw_set_openstack_containers_update_target_version`: Value of OPENSTACK_RELEASE_VERSION env in openstack operator that should be set. Defaults to `0.0.2`.
* `cifmw_set_openstack_containers_openstack_final_env`: File name to store the operator env in a file. Default to `operator_env.txt`.
Expand Down
1 change: 1 addition & 0 deletions roles/set_openstack_containers/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ cifmw_set_openstack_containers_prefix: openstack
cifmw_set_openstack_containers_prefix_filter: "{{ cifmw_set_openstack_containers_prefix }}"
cifmw_set_openstack_containers_operator_name: openstack
cifmw_set_openstack_containers_tag_from_md5: false
cifmw_set_openstack_containers_excluded_envs: []
cifmw_set_openstack_containers_dlrn_md5_path: "/etc/yum.repos.d/delorean.repo.md5"
cifmw_set_openstack_containers_openstack_version_change: false
cifmw_set_openstack_containers_update_target_version: "0.0.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export PATH="{{ cifmw_path }}"
{% set _container = container_data[1] -%}
{# All the openstack services containers contain /openstack- or /rhos18-openstack- prefix #}
{# It filters out the same and update the container address with new url #}
{% if (_container_prefix_filter in _container) and ('operator' not in _container) -%}
{% if (_container_prefix_filter in _container) and (_container_env not in cifmw_set_openstack_containers_excluded_envs) -%}
{% set _container_data = _container.split(_container_prefix_filter)[-1] -%}
{# There is sha256 tag initially for container tags, but in some jobs we switch to dlrn tag #}
{% if '@sha256' in _container_data -%}
Expand Down

0 comments on commit d7e64e8

Please sign in to comment.