Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the use of wrapper script opm-auths #116

Merged
merged 4 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions roles/create_pr/tasks/bundle_operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
chdir: "{{ work_dir }}/{{ fork_name }}/operators/{{ product_name }}"

- name: "Render bundle operator image"
vars:
opm_auths: "/usr/share/dci-openshift-agent/utils/opm-auths"
ansible.builtin.command: >
{{ opm_auths }}
{{ opm_tool_path }} render {{ operator.bundle_image }}
register: rendered_bundle
retries: 2
Expand Down
1 change: 0 additions & 1 deletion roles/fbc_catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ fbc_bundles | Yes | undefined | A
fbc_expire | No | true | Whether or not to set an expiration label on the catalog
fbc_expire_time | No | 5h | The amount of time to set for the expiration label
fbc_index_image | Yes | undefined | Full reference for the image <registry>/namespace/image:tag
fbc_opm_auths | No | /usr/share/dci-openshift-agent/utils/opm-auths | Path to opm-auths a wrapper script to allow multi-regitsry auths in opm

## Requirements

Expand Down
1 change: 0 additions & 1 deletion roles/fbc_catalog/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
fbc_opm_args: ""
fbc_expire: true
fbc_expire_time: 5h
fbc_opm_auths: "/usr/share/dci-openshift-agent/utils/opm-auths"
...
2 changes: 0 additions & 2 deletions roles/fbc_catalog/tasks/add-bundle.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
- name: "Render bundle operator image"
ansible.builtin.shell: >
{{ fbc_opm_auths }}
{{ fbc_opm_cmd }} render {{ bundle }}
args:
chdir: "{{ fbc_tmp_dir }}"
Expand Down Expand Up @@ -52,7 +51,6 @@

- name: "Render bundle for {{ fbc_short_name }}"
ansible.builtin.shell: >
{{ fbc_opm_auths }}
{{ fbc_opm_cmd }} render {{ bundle }}
--output=yaml >> {{ fbc_tmp_dir }}/catalog/index.yml
args:
Expand Down
6 changes: 4 additions & 2 deletions roles/fbc_catalog/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@

- name: "Set opm cmd"
ansible.builtin.set_fact:
fbc_opm_cmd: "{{ fbc_tmp_dir }}/opm {{ fbc_opm_args }}"
fbc_opm_cmd: "{{ fbc_tmp_dir }}/opm-rhel{{ ansible_distribution_major_version }} {{ fbc_opm_args }}"

- name: "Download stable opm client"
vars:
ocp_clients_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable-4.14/opm-linux.tar.gz"
ocp_clients_url:
"https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/\
opm-linux{{ ansible_distribution_major_version is version('9', '==') | ternary('-rhel9', '') }}.tar.gz"
ansible.builtin.unarchive:
src: "{{ ocp_clients_url }}"
dest: "{{ fbc_tmp_dir }}"
Expand Down
3 changes: 0 additions & 3 deletions roles/preflight/tasks/prepare_operator_metadata.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
- name: "Render bundle operator image"
vars:
opm_auths: "/usr/share/dci-openshift-agent/utils/opm-auths"
ansible.builtin.shell: >
{% if partner_creds | length %}
DOCKER_CONFIG={{ preflight_tmp_dir.path }}
{% endif %}
{{ opm_auths }}
{{ opm_tool_path }} render {{ operator.bundle_image }}
register: rendered_bundle
retries: 2
Expand Down
1 change: 0 additions & 1 deletion roles/prune_catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pc_source_catalog | Yes |
pc_destination_catalog | Yes | | Catalog containing the required operators
pc_operators | Yes | | The set of operators to keep in the pruned catalog. See examples below
pc_opm_args | No | "" | Arguments for opm command. Those will be applied globally for all opm calls
pc_opm_auths | No | /usr/share/dci-openshift-agent/utils/opm-auths| Path to opm-auths a wrapper script to allow multi-registry auths in opm
pc_expire | No | false | Whether or not to set an expiration label on the catalog
pc_expire_time | No | 5h | The amount of time to set for the expiration label
pc_maintainer | No | redhatci.ocp | Value for catalog's image maintainer label
Expand Down
1 change: 0 additions & 1 deletion roles/prune_catalog/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pc_opm_args: ""
pc_expire: false
pc_expire_time: 5h
pc_opm_auths: "/usr/share/dci-openshift-agent/utils/opm-auths"
pc_maintainer: "redhatci.ocp"
pc_ignore_pull_errors: false
pc_allow_insecure_registry: true
Expand Down
7 changes: 4 additions & 3 deletions roles/prune_catalog/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@

- name: "Set opm cmd"
ansible.builtin.set_fact:
pc_opm_cmd: "{{ pc_tmp_dir }}/opm {{ pc_opm_args }}"
pc_opm_cmd: "{{ pc_tmp_dir }}/opm-rhel{{ ansible_distribution_major_version }} {{ pc_opm_args }}"

- name: "Download stable opm client"
vars:
ocp_clients_url: "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable-4.14/opm-linux.tar.gz"
ocp_clients_url:
"https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable\
/opm-linux{{ ansible_distribution_major_version is version('9', '==') | ternary('-rhel9', '') }}.tar.gz"
ansible.builtin.unarchive:
src: "{{ ocp_clients_url }}"
dest: "{{ pc_tmp_dir }}"
Expand All @@ -71,7 +73,6 @@
chdir: "{{ pc_tmp_dir }}"
cmd: >
set -x;
{{ pc_opm_auths }}
{{ pc_opm_cmd }} render {{ pc_source_catalog }} >
index-packages
register: prune_result
Expand Down