-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathmirror-config.yaml
152 lines (150 loc) · 5.16 KB
/
mirror-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{% set release = '4.' + (tag|string).split('.')[1] if tag|count('.') > 1 else tag %}
{% set ztp_images = ['registry.redhat.io/rhel9/support-tools', 'quay.io/mavazque/gitea:1.17.3', 'registry.redhat.io/openshift4/ztp-site-generate-rhel8:v' + OPENSHIFT_TAG|string] %}
apiVersion: mirror.openshift.io/v2alpha1
kind: ImageSetConfiguration
mirror:
platform:
graph: false
{% if version in ['ci', 'nightly'] %}
release: registry.ci.openshift.org/ocp/release:{{ tag }}
{% else %}
channels:
- name: {{ 'candidate' if 'rc' in tag else version }}-{{ release }}
{% if tag|count('.') > 1 %}
minVersion: {{ (disconnected_extra_release or tag)|min_ocp_version(tag) }}
maxVersion: {{ (disconnected_extra_release or tag)|max_ocp_version(tag) }}
{% endif %}
{% endif %}
architectures:
# - multi
- amd64
additionalImages:
{% for image in ztp_images + extra_images|default([]) %}
- name: {{ image }}
{% endfor %}
{% set operators = disconnected_operators|default([]) + disconnected_certified_operators|default([]) + disconnected_community_operators|default([]) + disconnected_marketplace_operators|default([]) %}
{% if operators %}
operators:
{% if disconnected_operators|default([]) %}
{% set catalog = 'quay.io/prega/prega-operator-index' if prega|default(False) else 'registry.redhat.io/redhat/redhat-operator-index' %}
- catalog: {{ catalog }}:{{ disconnected_operators_version or "v%s" % OPENSHIFT_TAG }}
packages:
{% for package in disconnected_operators %}
{% if package.name is defined %}
- name: {{ package.name }}
{% else %}{# Comment: Support old syntax #}
- name: {{ package }}
{% endif %}
{% if package.minVersion is defined %}
minVersion: {{ package.minVersion }}
{% endif %}
{% if package.maxVersion is defined %}
maxVersion: {{ package.maxVersion }}
{% endif %}
{% if package.channels is defined and package.channels|length > 0 %}
channels:
{% for channel in package.channels %}
- name: {{ channel.name }}
{% if channel.minVersion is defined %}
minVersion: {{ channel.minVersion }}
{% endif %}
{% if channel.maxVersion is defined %}
maxVersion: {{ channel.maxVersion }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% if disconnected_certified_operators|default([]) %}
- catalog: registry.redhat.io/redhat/certified-operator-index:{{ disconnected_certified_operators_version or "v%s" % OPENSHIFT_TAG }}
packages:
{% for package in disconnected_certified_operators %}
{% if package.name is defined %}
- name: {{ package.name }}
{% else %}
- name: {{ package }}
{% endif %}
{% if package.minVersion is defined %}
minVersion: {{ package.minVersion }}
{% endif %}
{% if package.maxVersion is defined %}
maxVersion: {{ package.maxVersion }}
{% endif %}
{% if package.channels is defined and package.channels|length > 0 %}
channels:
{% for channel in package.channels %}
- name: {{ channel.name }}
{% if channel.minVersion is defined %}
minVersion: {{ channel.minVersion }}
{% endif %}
{% if channel.maxVersion is defined %}
maxVersion: {{ channel.maxVersion }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% if disconnected_community_operators|default([]) %}
- catalog: registry.redhat.io/redhat/community-operator-index:{{ disconnected_community_operators_version or "v%s" % OPENSHIFT_TAG }}
packages:
{% for package in disconnected_community_operators %}
{% if package.name is defined %}
- name: {{ package.name }}
{% else %}
- name: {{ package }}
{% endif %}
{% if package.minVersion is defined %}
minVersion: {{ package.minVersion }}
{% endif %}
{% if package.maxVersion is defined %}
maxVersion: {{ package.maxVersion }}
{% endif %}
{% if package.channels is defined and package.channels|length > 0 %}
channels:
{% for channel in package.channels %}
- name: {{ channel.name }}
{% if channel.minVersion is defined %}
minVersion: {{ channel.minVersion }}
{% endif %}
{% if channel.maxVersion is defined %}
maxVersion: {{ channel.maxVersion }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% if disconnected_marketplace_operators|default([]) %}
- catalog: registry.redhat.io/redhat/redhat-marketplace-index:{{ disconnected_marketplace_operators_version or "v%s" % OPENSHIFT_TAG }}
packages:
{% for package in disconnected_marketplace_operators %}
{% if package.name is defined %}
- name: {{ package.name }}
{% else %}
- name: {{ package }}
{% endif %}
{% if package.minVersion is defined %}
minVersion: {{ package.minVersion }}
{% endif %}
{% if package.maxVersion is defined %}
maxVersion: {{ package.maxVersion }}
{% endif %}
{% if package.channels is defined and package.channels|length > 0 %}
channels:
{% for channel in package.channels %}
- name: {{ channel.name }}
{% if channel.minVersion is defined %}
minVersion: {{ channel.minVersion }}
{% endif %}
{% if channel.maxVersion is defined %}
maxVersion: {{ channel.maxVersion }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% if disconnected_extra_catalogs|default([]) %}
{% for catalog_image in disconnected_extra_catalogs %}
- catalog: {{ catalog_image }}
{% endfor %}
{% endif %}