qontract-reconcile 0.10.1rc546__py3-none-any.whl → 0.10.1rc547__py3-none-any.whl
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.
- {qontract_reconcile-0.10.1rc546.dist-info → qontract_reconcile-0.10.1rc547.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc546.dist-info → qontract_reconcile-0.10.1rc547.dist-info}/RECORD +8 -8
- reconcile/openshift_saas_deploy.py +13 -2
- reconcile/utils/saasherder/models.py +14 -0
- reconcile/utils/saasherder/saasherder.py +2 -0
- {qontract_reconcile-0.10.1rc546.dist-info → qontract_reconcile-0.10.1rc547.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc546.dist-info → qontract_reconcile-0.10.1rc547.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc546.dist-info → qontract_reconcile-0.10.1rc547.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc546.dist-info → qontract_reconcile-0.10.1rc547.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc547
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Home-page: https://github.com/app-sre/qontract-reconcile
|
6
6
|
Author: Red Hat App-SRE Team
|
{qontract_reconcile-0.10.1rc546.dist-info → qontract_reconcile-0.10.1rc547.dist-info}/RECORD
RENAMED
@@ -73,7 +73,7 @@ reconcile/openshift_resources.py,sha256=kwsY5cko7udEKNlhL2oKiKv_5wzEw9wmmwROE016
|
|
73
73
|
reconcile/openshift_resources_base.py,sha256=XSctdE3pD4BI-91tlV5rdXIhvdtymZYeOKiCad8ZJl4,45839
|
74
74
|
reconcile/openshift_rolebindings.py,sha256=0sEKajdqVuBSzlagyPbLxtNXQdI2vyabmbIRifs0des,6629
|
75
75
|
reconcile/openshift_routes.py,sha256=fXvuPSjcjVw1X3j2EQvUAdbOepmIFdKk-M3qP8QzPiw,1075
|
76
|
-
reconcile/openshift_saas_deploy.py,sha256=
|
76
|
+
reconcile/openshift_saas_deploy.py,sha256=NFiNrk7055vunzzJmI7cVBubFj6JPDlEpJqDwpG_t9g,12706
|
77
77
|
reconcile/openshift_saas_deploy_change_tester.py,sha256=fMmPDz-ZRO-WH8OIiDo4e4sBK4-zzpvFXmVCKGY1l-I,8837
|
78
78
|
reconcile/openshift_saas_deploy_trigger_base.py,sha256=p1Mv7dbw_K7TVFv-M-DDq6r1ltuW9VAF6PCNnEng_zM,14291
|
79
79
|
reconcile/openshift_saas_deploy_trigger_cleaner.py,sha256=aT8wqoXGyZEeXUA7Q6reaL9v5j5UnPLoYVe70D31HUg,2917
|
@@ -641,8 +641,8 @@ reconcile/utils/runtime/runner.py,sha256=72cc-I6yXyPov8UCLHpyERRy1eiMLpGite2roO0
|
|
641
641
|
reconcile/utils/runtime/sharding.py,sha256=roCdbnBklhTK_g34zbgQYqzpKPaNQ8J6Xd9XLO9-t6Q,16258
|
642
642
|
reconcile/utils/saasherder/__init__.py,sha256=J3MBZBFa5YmhqYm08QsjBXz8mFcVOCiOCkyIcw41t7E,343
|
643
643
|
reconcile/utils/saasherder/interfaces.py,sha256=XXY35h8VWQ66z3LBPxaoUAMkIW50264DQiecrzyV6oA,9076
|
644
|
-
reconcile/utils/saasherder/models.py,sha256=
|
645
|
-
reconcile/utils/saasherder/saasherder.py,sha256=
|
644
|
+
reconcile/utils/saasherder/models.py,sha256=PBv8DuAb6KUw_ayn5Ufiya20cCAelBv6Iv--x7hbpa4,5449
|
645
|
+
reconcile/utils/saasherder/saasherder.py,sha256=HuJQWnugPFWIVMPpH-5Hw4KLhRY3OVlCMGED74Pu9Xc,85737
|
646
646
|
reconcile/utils/terraform/__init__.py,sha256=zNbiyTWo35AT1sFTElL2j_AA0jJ_yWE_bfFn-nD2xik,250
|
647
647
|
reconcile/utils/terraform/config.py,sha256=5UVrd563TMcvi4ooa5JvWVDW1I3bIWg484u79evfV_8,164
|
648
648
|
reconcile/utils/terraform/config_client.py,sha256=py-Ree-QUYD6Hvng6bM40VgSuttteehIKNgwOSoJO1o,4706
|
@@ -670,8 +670,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
670
670
|
tools/test/test_qontract_cli.py,sha256=se-YG_YVCWRFrnCPvBVHDBT_59CkbIoEni-4SJa8_MU,2755
|
671
671
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
672
672
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
673
|
-
qontract_reconcile-0.10.
|
674
|
-
qontract_reconcile-0.10.
|
675
|
-
qontract_reconcile-0.10.
|
676
|
-
qontract_reconcile-0.10.
|
677
|
-
qontract_reconcile-0.10.
|
673
|
+
qontract_reconcile-0.10.1rc547.dist-info/METADATA,sha256=b4IdTIYgycDnvOu8T8KhIyQxE7hYqhq4JvztZk07c9Y,2349
|
674
|
+
qontract_reconcile-0.10.1rc547.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
675
|
+
qontract_reconcile-0.10.1rc547.dist-info/entry_points.txt,sha256=rTjAv28I_CHLM8ID3OPqMI_suoQ9s7tFbim4aYjn9kk,376
|
676
|
+
qontract_reconcile-0.10.1rc547.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
677
|
+
qontract_reconcile-0.10.1rc547.dist-info/RECORD,,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import json
|
1
2
|
import logging
|
2
3
|
import os
|
3
4
|
import sys
|
@@ -301,6 +302,7 @@ def run(
|
|
301
302
|
slack.chat_post_message(message)
|
302
303
|
|
303
304
|
# get upstream repo info for sast scan
|
305
|
+
# get image info for clamav scan
|
304
306
|
# we only do this if:
|
305
307
|
# - this is not a dry run
|
306
308
|
# - there is a single saas file deployed
|
@@ -309,14 +311,14 @@ def run(
|
|
309
311
|
openshift_saas_deploy_trigger_upstream_jobs.QONTRACT_INTEGRATION,
|
310
312
|
openshift_saas_deploy_trigger_images.QONTRACT_INTEGRATION,
|
311
313
|
]
|
312
|
-
|
314
|
+
scan = (
|
313
315
|
not dry_run
|
314
316
|
and len(saas_files) == 1
|
315
317
|
and trigger_integration
|
316
318
|
and trigger_integration in allowed_integration
|
317
319
|
and trigger_reason
|
318
320
|
)
|
319
|
-
if
|
321
|
+
if scan:
|
320
322
|
saas_file = saas_files[0]
|
321
323
|
owners = saas_file.app.service_owners or []
|
322
324
|
emails = " ".join([o.email for o in owners])
|
@@ -326,3 +328,12 @@ def run(
|
|
326
328
|
f.write(file + "\n")
|
327
329
|
f.write(url + "\n")
|
328
330
|
f.write(emails + "\n")
|
331
|
+
images = " ".join(saasherder.images)
|
332
|
+
images_file = os.path.join(io_dir, "images")
|
333
|
+
with open(images_file, "w", encoding="locale") as f:
|
334
|
+
f.write(images)
|
335
|
+
image_auth = saasherder._initiate_image_auth(saas_file)
|
336
|
+
if image_auth.auth_server:
|
337
|
+
json_file = os.path.join(io_dir, "dockerconfigjson")
|
338
|
+
with open(json_file, "w", encoding="locale") as f:
|
339
|
+
f.write(json.dumps(image_auth.getDockerConfigJson(), indent=2))
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import base64
|
1
2
|
from collections.abc import Iterable
|
2
3
|
from dataclasses import dataclass
|
3
4
|
from enum import Enum
|
@@ -192,6 +193,19 @@ class ImageAuth:
|
|
192
193
|
password: Optional[str] = None
|
193
194
|
auth_server: Optional[str] = None
|
194
195
|
|
196
|
+
def getDockerConfigJson(self) -> dict:
|
197
|
+
return {
|
198
|
+
"auths": {
|
199
|
+
self.auth_server: {
|
200
|
+
"username": self.username,
|
201
|
+
"password": self.password,
|
202
|
+
"auth": base64.b64encode(
|
203
|
+
f"{self.username}:{self.password}".encode()
|
204
|
+
).decode(),
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
|
195
209
|
|
196
210
|
@dataclass
|
197
211
|
class TargetSpec:
|
@@ -147,6 +147,7 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
147
147
|
self.state = state
|
148
148
|
self._promotion_state = PromotionState(state=state) if state else None
|
149
149
|
self._channel_map = self._assemble_channels(saas_files=all_saas_files)
|
150
|
+
self.images: list[str] = []
|
150
151
|
|
151
152
|
# each namespace is in fact a target,
|
152
153
|
# so we can use it to calculate.
|
@@ -1171,6 +1172,7 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
1171
1172
|
self._collect_images, resources, self.available_thread_pool_size
|
1172
1173
|
)
|
1173
1174
|
images = set(itertools.chain.from_iterable(images_list))
|
1175
|
+
self.images.extend(images)
|
1174
1176
|
if not images:
|
1175
1177
|
return False # no errors
|
1176
1178
|
errors = threaded.run(
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc546.dist-info → qontract_reconcile-0.10.1rc547.dist-info}/top_level.txt
RENAMED
File without changes
|