Skip to content

Commit

Permalink
Use opm-auths script to add opm multi-registry support
Browse files Browse the repository at this point in the history
opm does not support multiple registry authentications,
operator-framework/operator-registry#935
the opm-auths is a wrapper script that adds this support.
Using the wrapper script in the places where opm is used to add that
support

Depends-on: 29331
Change-Id: I2eb8c3c688cdf28fe3cd2eb2a17d306f2ab9844a
  • Loading branch information
tonyskapunk authored and nocturnalastro committed Nov 9, 2023
1 parent 96b2c00 commit 78095fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
15 changes: 8 additions & 7 deletions roles/fbc-catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ By default, the catalog image sets a label "quay.expires-after" to define an exp

## Parameters

Name | Required | Default | Description
-----------------|----------| ---------------|-------------
fbc_opm_args | No | "" | Arguments for opm command. Those will be applied globally for all opm calls
fbc_bundles | Yes | undefined | A list of bundles to be included in the catalog
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
Name | Required | Default | Description
-----------------|----------| ---------------------------------------------- |-------------
fbc_opm_args | No | "" | Arguments for opm command. Those will be applied globally for all opm calls
fbc_bundles | Yes | undefined | A list of bundles to be included in the catalog
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: 1 addition & 0 deletions roles/fbc-catalog/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
fbc_opm_args: ""
fbc_expire: true
fbc_expire_time: 5h
fbc_opm_auths: "/usr/share/dci-openshift-agent/utils/opm-auths"
...
3 changes: 2 additions & 1 deletion roles/fbc-catalog/tasks/add-bundle.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
- name: "Render bundle operator image"
shell: >
{{ fbc_opm_auths }}
{{ fbc_opm_cmd }} render {{ bundle }}
args:
chdir: "{{ fbc_tmp_dir }}"
Expand Down Expand Up @@ -50,7 +51,7 @@

- name: "Render bundle for {{ fbc_short_name }}"
shell: >
{{ ansible_env.DOCKER_CONFIG|default('') }}
{{ fbc_opm_auths }}
{{ fbc_opm_cmd }} render {{ bundle }}
--output=yaml >> {{ fbc_tmp_dir }}/catalog/index.yml
args:
Expand Down

0 comments on commit 78095fe

Please sign in to comment.