openshift-update-proxy 1.3.0__tar.gz → 1.4.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of openshift-update-proxy might be problematic. Click here for more details.

Files changed (22) hide show
  1. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/PKG-INFO +20 -10
  2. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/README.md +17 -7
  3. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/pyproject.toml +3 -3
  4. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy/__init__.py +1 -1
  5. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy/app.py +4 -1
  6. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy.egg-info/PKG-INFO +20 -10
  7. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/tests/test_app.py +1 -1
  8. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/LICENSE +0 -0
  9. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/setup.cfg +0 -0
  10. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy/__main__.py +0 -0
  11. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy/cache.py +0 -0
  12. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy/catalog.py +0 -0
  13. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy/config.py +0 -0
  14. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy/graph.py +0 -0
  15. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy/lifecycle.py +0 -0
  16. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy.egg-info/SOURCES.txt +0 -0
  17. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy.egg-info/dependency_links.txt +0 -0
  18. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy.egg-info/entry_points.txt +0 -0
  19. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy.egg-info/requires.txt +0 -0
  20. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/src/openshift_update_proxy.egg-info/top_level.txt +0 -0
  21. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/tests/test_catalog.py +0 -0
  22. {openshift_update_proxy-1.3.0 → openshift_update_proxy-1.4.6}/tests/test_lifecycle.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openshift-update-proxy
3
- Version: 1.3.0
4
- Summary: Forwarding proxy for OpenShift update resources (Cincinnati API, mirror, release signatures)
3
+ Version: 1.4.6
4
+ Summary: Forwarding proxy for OpenShift update resources (update graph, mirror, release signatures, operator catalog, lifecycle API)
5
5
  Author-email: Simon Lauger <simon@lauger.de>
6
6
  License-Expression: Apache-2.0
7
7
  Project-URL: Repository, https://github.com/slauger/openshift-update-proxy
8
- Keywords: openshift,cincinnati,update-graph,proxy,disconnected,air-gapped
8
+ Keywords: openshift,cincinnati,update-graph,proxy,disconnected,air-gapped,olm,renovate
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Environment :: Web Environment
11
11
  Classifier: Framework :: Flask
@@ -47,8 +47,8 @@ central egress proxy (or a single host with internet access) exists.
47
47
  (`/api/upgrades_info/v1/graph`) to `api.openshift.com`
48
48
  - 📦 **Mirror Proxy** - forwards requests for clients and release artifacts to
49
49
  `mirror.openshift.com/pub`
50
- - 🔏 **Signature Store** - serves release image signatures for
51
- `ClusterVersion.spec.signatureStores` (OpenShift 4.14+)
50
+ - 🔏 **Signature Store** - forwards release image signature requests to the
51
+ public signature store on `mirror.openshift.com`
52
52
  - 🗺️ **ConfigMap Generator** - renders ready-to-apply signature ConfigMaps for the
53
53
  classic disconnected verification workflow
54
54
  - 🎛️ **Operator Catalog API** - serves operator channels and versions from the
@@ -61,6 +61,8 @@ central egress proxy (or a single host with internet access) exists.
61
61
  Cosign signed
62
62
  - ⛵ **Helm Chart** - deploy to Kubernetes/OpenShift with probes and sane security defaults
63
63
  - 🩺 **Health Endpoint** - `/healthz` for liveness and readiness probes
64
+ - 🪵 **Request Logging** - logs source, method, path and status for every
65
+ request (health probes excluded)
64
66
 
65
67
  ## How it works
66
68
 
@@ -159,6 +161,9 @@ pip install openshift-update-proxy
159
161
  openshift-update-proxy
160
162
  ```
161
163
 
164
+ For running as a service on a plain Linux host, see the systemd unit example in
165
+ [examples/update-proxy.service](examples/update-proxy.service).
166
+
162
167
  ## Cluster integration
163
168
 
164
169
  ### Update graph
@@ -190,8 +195,10 @@ curl -s "http://update-proxy.example.com:5000/configmaps/4.16.8" | oc apply -f -
190
195
  The optional `arch` (default `amd64`) and `channel_prefix` (default `stable`) query
191
196
  parameters select the architecture and the update channel used for the lookup, e.g.
192
197
  `/configmaps/4.16.8?arch=arm64`. Version lookups name the ConfigMap
193
- `release-image-<version>`; digest lookups use `signature-sha256-<digest>` as the
194
- version is not known there.
198
+ `release-signature-<version>-<arch>` - the signed digest differs per
199
+ architecture, so the name has to carry it. Digest lookups use
200
+ `signature-sha256-<digest prefix>` (first 16 characters) as neither version nor
201
+ architecture are known there.
195
202
 
196
203
  Alternatively, a release digest can be passed directly:
197
204
 
@@ -291,9 +298,12 @@ The optional `channel_prefix` (default `stable`, e.g. `eus`, `fast`, `candidate`
291
298
  lifecycle API is available under `/lifecycle/`, e.g.
292
299
  `/lifecycle/products?name=OpenShift Container Platform`.
293
300
 
294
- [examples/create-configmaps.sh](examples/create-configmaps.sh) combines this with
295
- the `/configmaps/` endpoint: it fetches the release signatures for a set of update
296
- channels through the proxy and applies them as ConfigMaps.
301
+ [examples/create-configmaps/](examples/create-configmaps/) combines this with the
302
+ `/configmaps/` endpoint: it fetches the release signatures for a set of update
303
+ channels through the proxy and writes one manifest per release
304
+ (`manifests/release-signature-<version>-<arch>.yaml`), ready to be committed to a GitOps
305
+ repository. The directory also contains a scheduled GitHub Actions workflow that
306
+ keeps the manifests up to date.
297
307
 
298
308
  ## Local Development
299
309
 
@@ -16,8 +16,8 @@ central egress proxy (or a single host with internet access) exists.
16
16
  (`/api/upgrades_info/v1/graph`) to `api.openshift.com`
17
17
  - 📦 **Mirror Proxy** - forwards requests for clients and release artifacts to
18
18
  `mirror.openshift.com/pub`
19
- - 🔏 **Signature Store** - serves release image signatures for
20
- `ClusterVersion.spec.signatureStores` (OpenShift 4.14+)
19
+ - 🔏 **Signature Store** - forwards release image signature requests to the
20
+ public signature store on `mirror.openshift.com`
21
21
  - 🗺️ **ConfigMap Generator** - renders ready-to-apply signature ConfigMaps for the
22
22
  classic disconnected verification workflow
23
23
  - 🎛️ **Operator Catalog API** - serves operator channels and versions from the
@@ -30,6 +30,8 @@ central egress proxy (or a single host with internet access) exists.
30
30
  Cosign signed
31
31
  - ⛵ **Helm Chart** - deploy to Kubernetes/OpenShift with probes and sane security defaults
32
32
  - 🩺 **Health Endpoint** - `/healthz` for liveness and readiness probes
33
+ - 🪵 **Request Logging** - logs source, method, path and status for every
34
+ request (health probes excluded)
33
35
 
34
36
  ## How it works
35
37
 
@@ -128,6 +130,9 @@ pip install openshift-update-proxy
128
130
  openshift-update-proxy
129
131
  ```
130
132
 
133
+ For running as a service on a plain Linux host, see the systemd unit example in
134
+ [examples/update-proxy.service](examples/update-proxy.service).
135
+
131
136
  ## Cluster integration
132
137
 
133
138
  ### Update graph
@@ -159,8 +164,10 @@ curl -s "http://update-proxy.example.com:5000/configmaps/4.16.8" | oc apply -f -
159
164
  The optional `arch` (default `amd64`) and `channel_prefix` (default `stable`) query
160
165
  parameters select the architecture and the update channel used for the lookup, e.g.
161
166
  `/configmaps/4.16.8?arch=arm64`. Version lookups name the ConfigMap
162
- `release-image-<version>`; digest lookups use `signature-sha256-<digest>` as the
163
- version is not known there.
167
+ `release-signature-<version>-<arch>` - the signed digest differs per
168
+ architecture, so the name has to carry it. Digest lookups use
169
+ `signature-sha256-<digest prefix>` (first 16 characters) as neither version nor
170
+ architecture are known there.
164
171
 
165
172
  Alternatively, a release digest can be passed directly:
166
173
 
@@ -260,9 +267,12 @@ The optional `channel_prefix` (default `stable`, e.g. `eus`, `fast`, `candidate`
260
267
  lifecycle API is available under `/lifecycle/`, e.g.
261
268
  `/lifecycle/products?name=OpenShift Container Platform`.
262
269
 
263
- [examples/create-configmaps.sh](examples/create-configmaps.sh) combines this with
264
- the `/configmaps/` endpoint: it fetches the release signatures for a set of update
265
- channels through the proxy and applies them as ConfigMaps.
270
+ [examples/create-configmaps/](examples/create-configmaps/) combines this with the
271
+ `/configmaps/` endpoint: it fetches the release signatures for a set of update
272
+ channels through the proxy and writes one manifest per release
273
+ (`manifests/release-signature-<version>-<arch>.yaml`), ready to be committed to a GitOps
274
+ repository. The directory also contains a scheduled GitHub Actions workflow that
275
+ keeps the manifests up to date.
266
276
 
267
277
  ## Local Development
268
278
 
@@ -4,15 +4,15 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "openshift-update-proxy"
7
- version = "1.3.0"
8
- description = "Forwarding proxy for OpenShift update resources (Cincinnati API, mirror, release signatures)"
7
+ version = "1.4.6"
8
+ description = "Forwarding proxy for OpenShift update resources (update graph, mirror, release signatures, operator catalog, lifecycle API)"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
11
11
  requires-python = ">=3.14"
12
12
  authors = [
13
13
  {name = "Simon Lauger", email = "simon@lauger.de"},
14
14
  ]
15
- keywords = ["openshift", "cincinnati", "update-graph", "proxy", "disconnected", "air-gapped"]
15
+ keywords = ["openshift", "cincinnati", "update-graph", "proxy", "disconnected", "air-gapped", "olm", "renovate"]
16
16
  classifiers = [
17
17
  "Development Status :: 4 - Beta",
18
18
  "Environment :: Web Environment",
@@ -1,3 +1,3 @@
1
1
  """OpenShift update proxy for disconnected environments."""
2
2
 
3
- __version__ = "1.3.0"
3
+ __version__ = "1.4.6"
@@ -212,7 +212,6 @@ def create_app(config: Config | None = None) -> Flask:
212
212
  if digest_match:
213
213
  digest = digest_match.group("digest")
214
214
  elif version_match:
215
- name = f"release-image-{ref}"
216
215
  arch = request.args.get("arch", "amd64")
217
216
  channel_prefix = request.args.get("channel_prefix", "stable")
218
217
 
@@ -220,6 +219,10 @@ def create_app(config: Config | None = None) -> Flask:
220
219
  if error:
221
220
  return error
222
221
 
222
+ # the signed digest differs per architecture, so the name has to
223
+ # carry it - the version alone would collide across architectures
224
+ name = f"release-signature-{ref}-{arch}"
225
+
223
226
  channel = (
224
227
  f"{channel_prefix}-{version_match.group('major')}.{version_match.group('minor')}"
225
228
  )
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openshift-update-proxy
3
- Version: 1.3.0
4
- Summary: Forwarding proxy for OpenShift update resources (Cincinnati API, mirror, release signatures)
3
+ Version: 1.4.6
4
+ Summary: Forwarding proxy for OpenShift update resources (update graph, mirror, release signatures, operator catalog, lifecycle API)
5
5
  Author-email: Simon Lauger <simon@lauger.de>
6
6
  License-Expression: Apache-2.0
7
7
  Project-URL: Repository, https://github.com/slauger/openshift-update-proxy
8
- Keywords: openshift,cincinnati,update-graph,proxy,disconnected,air-gapped
8
+ Keywords: openshift,cincinnati,update-graph,proxy,disconnected,air-gapped,olm,renovate
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Environment :: Web Environment
11
11
  Classifier: Framework :: Flask
@@ -47,8 +47,8 @@ central egress proxy (or a single host with internet access) exists.
47
47
  (`/api/upgrades_info/v1/graph`) to `api.openshift.com`
48
48
  - 📦 **Mirror Proxy** - forwards requests for clients and release artifacts to
49
49
  `mirror.openshift.com/pub`
50
- - 🔏 **Signature Store** - serves release image signatures for
51
- `ClusterVersion.spec.signatureStores` (OpenShift 4.14+)
50
+ - 🔏 **Signature Store** - forwards release image signature requests to the
51
+ public signature store on `mirror.openshift.com`
52
52
  - 🗺️ **ConfigMap Generator** - renders ready-to-apply signature ConfigMaps for the
53
53
  classic disconnected verification workflow
54
54
  - 🎛️ **Operator Catalog API** - serves operator channels and versions from the
@@ -61,6 +61,8 @@ central egress proxy (or a single host with internet access) exists.
61
61
  Cosign signed
62
62
  - ⛵ **Helm Chart** - deploy to Kubernetes/OpenShift with probes and sane security defaults
63
63
  - 🩺 **Health Endpoint** - `/healthz` for liveness and readiness probes
64
+ - 🪵 **Request Logging** - logs source, method, path and status for every
65
+ request (health probes excluded)
64
66
 
65
67
  ## How it works
66
68
 
@@ -159,6 +161,9 @@ pip install openshift-update-proxy
159
161
  openshift-update-proxy
160
162
  ```
161
163
 
164
+ For running as a service on a plain Linux host, see the systemd unit example in
165
+ [examples/update-proxy.service](examples/update-proxy.service).
166
+
162
167
  ## Cluster integration
163
168
 
164
169
  ### Update graph
@@ -190,8 +195,10 @@ curl -s "http://update-proxy.example.com:5000/configmaps/4.16.8" | oc apply -f -
190
195
  The optional `arch` (default `amd64`) and `channel_prefix` (default `stable`) query
191
196
  parameters select the architecture and the update channel used for the lookup, e.g.
192
197
  `/configmaps/4.16.8?arch=arm64`. Version lookups name the ConfigMap
193
- `release-image-<version>`; digest lookups use `signature-sha256-<digest>` as the
194
- version is not known there.
198
+ `release-signature-<version>-<arch>` - the signed digest differs per
199
+ architecture, so the name has to carry it. Digest lookups use
200
+ `signature-sha256-<digest prefix>` (first 16 characters) as neither version nor
201
+ architecture are known there.
195
202
 
196
203
  Alternatively, a release digest can be passed directly:
197
204
 
@@ -291,9 +298,12 @@ The optional `channel_prefix` (default `stable`, e.g. `eus`, `fast`, `candidate`
291
298
  lifecycle API is available under `/lifecycle/`, e.g.
292
299
  `/lifecycle/products?name=OpenShift Container Platform`.
293
300
 
294
- [examples/create-configmaps.sh](examples/create-configmaps.sh) combines this with
295
- the `/configmaps/` endpoint: it fetches the release signatures for a set of update
296
- channels through the proxy and applies them as ConfigMaps.
301
+ [examples/create-configmaps/](examples/create-configmaps/) combines this with the
302
+ `/configmaps/` endpoint: it fetches the release signatures for a set of update
303
+ channels through the proxy and writes one manifest per release
304
+ (`manifests/release-signature-<version>-<arch>.yaml`), ready to be committed to a GitOps
305
+ repository. The directory also contains a scheduled GitHub Actions workflow that
306
+ keeps the manifests up to date.
297
307
 
298
308
  ## Local Development
299
309
 
@@ -169,7 +169,7 @@ def test_configmap_by_version_resolves_digest(client, monkeypatch):
169
169
  assert graph_calls["params"]["channel"] == "stable-4.16"
170
170
  assert graph_calls["params"]["arch"] == "arm64"
171
171
  body = response.data.decode()
172
- assert "name: release-image-4.16.8" in body
172
+ assert "name: release-signature-4.16.8-arm64" in body
173
173
  assert f"sha256-{DIGEST}-1:" in body
174
174
 
175
175