qontract-reconcile 0.10.1rc365__py3-none-any.whl → 0.10.1rc367__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc365
3
+ Version: 0.10.1rc367
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
@@ -8,7 +8,7 @@ reconcile/aws_support_cases_sos.py,sha256=i6bSWnlH9fh14P14PjVhFLwNl-q3fD733_rXKM
8
8
  reconcile/blackbox_exporter_endpoint_monitoring.py,sha256=W_VJagnsJR1v5oqjlI3RJJE0_nhtJ0m81RS8zWA5u5c,3538
9
9
  reconcile/checkpoint.py,sha256=figtZRuWUvdpdSnkhAqeGvO5dI02TT6J3heyeFhlwqM,5016
10
10
  reconcile/cli.py,sha256=tUBFXkQJZqakjGQI3VOB_MtPmO4xjJqkS_9JkPyvTfI,79269
11
- reconcile/closedbox_endpoint_monitoring_base.py,sha256=3ttGqCBxyUANnizTVxf8R6zuleZ77YM4YGMW7qSSVl8,4865
11
+ reconcile/closedbox_endpoint_monitoring_base.py,sha256=GmEdDSp9yBnwpzzrla6VJfhOZd_qxYh-xtIN5bXjOBo,4909
12
12
  reconcile/cluster_deployment_mapper.py,sha256=2Ah-nu-Mdig0pjuiZl_XLrmVAjYzFjORR3dMlCgkmw0,2352
13
13
  reconcile/dashdotdb_base.py,sha256=13s9B8iIqSwu-rS-95QbIMPue_Gli3YMNBct5QjmrVo,4525
14
14
  reconcile/dashdotdb_cso.py,sha256=FoXrWGpOwXG5jf0eklN84tjJVUAYzKat7rtq_28JMlQ,3672
@@ -17,7 +17,7 @@ reconcile/dashdotdb_dvo.py,sha256=YXqpI6fBQAql-ybGI0grj9gWMzmKiAvPE__pNju6obk,89
17
17
  reconcile/dashdotdb_slo.py,sha256=oiWMehzU5wTk2AkYmOzD34vCvIFKCzuy0WDLrA3Kjzc,5823
18
18
  reconcile/dynatrace_token_provider.py,sha256=HWItJ_LavPcUJlpYz5fmfnfOpP2-0Qjkar0EAzBJ5Cw,16602
19
19
  reconcile/email_sender.py,sha256=-5L-Ag_jaEYSzYRoMr52KQBRXz1E8yx9GqLbg2X4XFU,3533
20
- reconcile/gabi_authorized_users.py,sha256=gegGTuB6WEVAPrJ_B3D8HfD0xYCJuY0oTkcF5k5s8Vw,4293
20
+ reconcile/gabi_authorized_users.py,sha256=rCosZv8Iu9jhWG88YiwK-gftX475aJ1R-PYIJYp_svY,4342
21
21
  reconcile/gcr_mirror.py,sha256=TtWI8qVUku9OQwJ_TpFyfVviswVFoEmCtdhLKLkFHKk,8409
22
22
  reconcile/github_org.py,sha256=t0oEk4XPMiOLpVvPockMVeBVdmZShXj6Ol7wUISFrT4,13479
23
23
  reconcile/github_owners.py,sha256=QWX-BX3-sHAPnVAR2fZXUTgIdWnfMDDyalcZINr6i1s,2949
@@ -33,7 +33,7 @@ reconcile/gitlab_mr_sqs_consumer.py,sha256=O46mdziPgGOndbU-0_UJKJVUaiEoVzJPEgKm4
33
33
  reconcile/gitlab_owners.py,sha256=8ukww7OSH2nWI30ylOKj7-6U-jVhV7ztRPsLhOxcVdg,13794
34
34
  reconcile/gitlab_permissions.py,sha256=ciEKj_wnRbS_vs_ZwcUeD6HkWVe3osAuotFqJSmvd94,1638
35
35
  reconcile/gitlab_projects.py,sha256=K3tFf_aD1W4Ijp5q-9Qek3kwFGEWPcZ1kd7tzFJ4GyQ,1781
36
- reconcile/integrations_manager.py,sha256=zUCh1bYrnNoT_6SSQO-yYA2QdDxfCuzwb1tjcByIOaE,8885
36
+ reconcile/integrations_manager.py,sha256=2h3E0Q-vGlLbeK6e9tO8gMVRbtCM1cn3l9ZB9xKRTZo,9407
37
37
  reconcile/jenkins_base.py,sha256=0Gocu3fU2YTltaxBlbDQOUvP-7CP2OSQV1ZRwtWeVXw,875
38
38
  reconcile/jenkins_job_builder.py,sha256=8mcvvkPvcgw0hZnYTcuh9P-ltSHwqg8zihXh7oxGuzI,3957
39
39
  reconcile/jenkins_job_builds_cleaner.py,sha256=zK8gQgXY5Ab5aDk8yPiXg0ogUEBOGmbyo8wEEtK342k,3190
@@ -57,14 +57,14 @@ reconcile/ocm_groups.py,sha256=_kiMUndKc6as6cbbvXxVnq8V_Lj7X5lxMJVCuRWuUFE,2888
57
57
  reconcile/ocm_machine_pools.py,sha256=asQ2lmFQPyFpxvA5uVBeC2aKBgIPIPQOx_WKgl1r8Xk,15260
58
58
  reconcile/ocm_update_recommended_version.py,sha256=IYkfLXIprOW1jguZeELcGP1iBPuj-b53R-FTqKulMl8,4204
59
59
  reconcile/ocm_upgrade_scheduler_org_updater.py,sha256=7j5fxPLZQuhlxfhSRCnSnIJhUoysTwvhJ422vWqfVeo,4015
60
- reconcile/openshift_base.py,sha256=bJiM-9IK2I_-aQHuu8iWjPs22d-fEUZKq-DavRIz_l8,53908
60
+ reconcile/openshift_base.py,sha256=RLEhlkvr-4E_tJW4ptH0XEAUZmMjB9YV5ppRGIsceMU,54581
61
61
  reconcile/openshift_clusterrolebindings.py,sha256=9lBO2INBDCCtDpoj29NuOPbbpdJUXf-_LQIrhiLmmns,5827
62
- reconcile/openshift_groups.py,sha256=DL-H9UXHAnHjDNZl87MMDTStZ11p1T2utM_1TGNVqic,10324
63
- reconcile/openshift_limitranges.py,sha256=SZkHhGS3m9oBUkzcclRiszfLEB7jQ8z8xh9P2Y8KTzg,3393
62
+ reconcile/openshift_groups.py,sha256=i6xh4hv8-4CBw7eZQbMwMrr8QPySxaahRjyzE8IjtVo,9531
63
+ reconcile/openshift_limitranges.py,sha256=UvCGo_OQ4XoDK55TJmn55qEhhlkhLzhU12tX8nT5kPQ,3442
64
64
  reconcile/openshift_namespace_labels.py,sha256=rRrmLuHpBpMG6dAhWd6FveVV994aByMQFWywMxOHu1o,15776
65
- reconcile/openshift_namespaces.py,sha256=i7_R_J-IeFgu16N9VgTQqfxZpbuAMzMUn4i74YmGQPQ,5584
66
- reconcile/openshift_network_policies.py,sha256=NU5svhqm_lct1bQxFAzoKoIBjtmCrzAoSMzQUnbM9Qc,4188
67
- reconcile/openshift_resourcequotas.py,sha256=7Oy2p_iQ6PMb4eKvsfRVQqrOyE8MxOifZ-FYAiv2zF0,2366
65
+ reconcile/openshift_namespaces.py,sha256=mcWsMRoHPPS0TNMguGka7Q0fLl0Rj7rzypX98K2dRpM,5737
66
+ reconcile/openshift_network_policies.py,sha256=_9Xt0ERUknGh4F41PnJQ_a9Weam2vA_hOBny9SPwKag,4237
67
+ reconcile/openshift_resourcequotas.py,sha256=yUi56PiOn3inMMfq_x_FEHmaW-reGipzoorjdar372g,2415
68
68
  reconcile/openshift_resources.py,sha256=kwsY5cko7udEKNlhL2oKiKv_5wzEw9wmmwROE016ng8,1400
69
69
  reconcile/openshift_resources_base.py,sha256=7I82p9hVlAvUayDcX8CfGgPbA4txyz4FnOgvuZ0b8LQ,44926
70
70
  reconcile/openshift_rolebindings.py,sha256=K6alhxtnxifnytQKMqIGdVkqGEa28AVwFv4B7SjbgIk,6628
@@ -77,8 +77,8 @@ reconcile/openshift_saas_deploy_trigger_configs.py,sha256=uWzUV5D5CW0frdi1ys7BOb
77
77
  reconcile/openshift_saas_deploy_trigger_images.py,sha256=Yl4lMtxqab-c04I2Ju8isAJuYuNTbHN01Bk3dF9nTos,967
78
78
  reconcile/openshift_saas_deploy_trigger_moving_commits.py,sha256=VqjwgRhA-yOSq0WFPqGIJVgYkdq_UrTHcVusBzOFgMY,973
79
79
  reconcile/openshift_saas_deploy_trigger_upstream_jobs.py,sha256=etfBGj7GDXTOhNHKc40ee5QM0Chq3oHE40HrbWgopc8,971
80
- reconcile/openshift_serviceaccount_tokens.py,sha256=UlBRjfAxzf9-h4uxQwHqrYnBWMUGFqqfp6KvW2lM76k,6369
81
- reconcile/openshift_tekton_resources.py,sha256=_-Ujf7e3fAX4jwU7HRZrSY1jwvpwcVwoIQwdohpJkC4,16191
80
+ reconcile/openshift_serviceaccount_tokens.py,sha256=QDj8ZcVxnsG6nVtjDD3UVM2DkRWHubToI-blvYjkncI,6418
81
+ reconcile/openshift_tekton_resources.py,sha256=WpwloHimEBWQmXbNrcZPAvNdymR8IFNNefOac-W2QHg,16276
82
82
  reconcile/openshift_upgrade_watcher.py,sha256=KxJIBudfX0DcpSH1_evbz4gNMQi0yeOpSZLgKrs-FBw,6618
83
83
  reconcile/openshift_users.py,sha256=dKWS3AVmgMKcblafHYz1pLVnTOp1ZzfePGQCaTpVc_8,5213
84
84
  reconcile/openshift_vault_secrets.py,sha256=9rTqV6wzCQx2Oh712E_Xj8wMG7u8Oh-pY8DWjlv4mZw,1660
@@ -104,10 +104,10 @@ reconcile/status_board.py,sha256=xOKicOelyGv3h2sFJxa9FBj8HDroZyGhMaRWaNRGpQQ,810
104
104
  reconcile/template_tester.py,sha256=vZz8GM46waQUGd3OVnhW5OLTqctFMH_Hh1QXxT5hduM,2384
105
105
  reconcile/terraform_aws_route53.py,sha256=QJMlaYYwcw_N9TJu7VbgZfxrxxR8Wv62GuG05XVhSuE,10018
106
106
  reconcile/terraform_cloudflare_dns.py,sha256=auU4bzeLwd4S8D8oqpqJbrCUoEdELXrgi7vHOedjYFk,13332
107
- reconcile/terraform_cloudflare_resources.py,sha256=JAwqaryFUSE4BA_1xBpea5900J1Gsb3bUEtkAjrZSv8,15044
107
+ reconcile/terraform_cloudflare_resources.py,sha256=m4Xg3xmHa7XjbUEvAbg0a3BeRSnPLe-4CLUJPlQiTdc,15012
108
108
  reconcile/terraform_cloudflare_users.py,sha256=DfeSnYC9YQgXX6AbJh85tQbJUDv1e2FjiGXgcpVQlPg,13964
109
109
  reconcile/terraform_repo.py,sha256=fIVjcxqhG6DR6H8QtQM1RpE9ukanjkjp8iH0tQRhEl8,13042
110
- reconcile/terraform_resources.py,sha256=-VWkI-0EwNUovNcLksFBkYmAMZoB9GM_QG1pZa9ZMrg,17136
110
+ reconcile/terraform_resources.py,sha256=WUM0ZEpf2jgcXjfjy3QSwrzpuD6zMN7cyOxetx88f9g,17167
111
111
  reconcile/terraform_tgw_attachments.py,sha256=6PVhBYeIvNnz2PwBdPF0I222_83EzOWX6VKJnqz7UPo,13915
112
112
  reconcile/terraform_users.py,sha256=kXRUxCUchKCP2dbXXOzctynqMii4oyCP6bYZHQTrlTg,10202
113
113
  reconcile/terraform_vpc_peerings.py,sha256=LRW3GUaf8g9iZWILBWQukfv6YmEY_3fWpatC_op-66I,21611
@@ -153,7 +153,7 @@ reconcile/glitchtip/reconciler.py,sha256=_Lsu5_LRqSfjYe3Tn0eGE-u8WmTJt3c2TgCRvUR
153
153
  reconcile/glitchtip_project_alerts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
154
154
  reconcile/glitchtip_project_alerts/integration.py,sha256=u_HPhzID-oNh1J08X88Q7RRmZNObGlYVCzgrnJGgcoc,9176
155
155
  reconcile/glitchtip_project_dsn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
- reconcile/glitchtip_project_dsn/integration.py,sha256=IvFlSYumDPhUw7gLfFX1P8tg-7Vns0ot2-Nqf2_sE18,7997
156
+ reconcile/glitchtip_project_dsn/integration.py,sha256=dQPb_izAXSlHBwksEpiTGgeybIsUsPZ1wJfMZ5voBHY,8046
157
157
  reconcile/gql_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
158
158
  reconcile/gql_definitions/advanced_upgrade_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
159
159
  reconcile/gql_definitions/advanced_upgrade_service/aus_clusters.py,sha256=RSgN-BpYC1XG_4yaLdanUGsjBwh0RGLiEFX9T_Z_cvM,4091
@@ -323,7 +323,7 @@ reconcile/saas_auto_promotions_manager/utils/vcs.py,sha256=WXzr6I0Q9NzTU8s2Dk_wd
323
323
  reconcile/skupper_network/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
324
324
  reconcile/skupper_network/integration.py,sha256=178Q9RSYuZ9NmrCK4jRMLMekrewUaaRdclccI6zBsQ8,10786
325
325
  reconcile/skupper_network/models.py,sha256=DNTI7HZv-rqY42GIIxyRuvroHLvdH6rJerjIq9lj3RU,6663
326
- reconcile/skupper_network/reconciler.py,sha256=tweho_gZ5dRVQAke124ft4Jue0g-zoD2vtJaFnvtLeQ,10136
326
+ reconcile/skupper_network/reconciler.py,sha256=pfNeyUZLBnOSFu87i-sn_8okj1uCiY1kQWl5Rbt2G9Y,10176
327
327
  reconcile/skupper_network/site_controller.py,sha256=A3K-62BjJ5HiFVydV0ouGoD1NwrO7XhAH15BHAcS9fk,1550
328
328
  reconcile/statuspage/__init__.py,sha256=o9vR6sp3ARDQFZrbCEShelTxjF1XgfLaElK_QVt_248,261
329
329
  reconcile/statuspage/atlassian.py,sha256=BQ__HeoEJdkMEGamc1PSgYWbRpXK8j15YrBjytJhl6g,12780
@@ -357,7 +357,7 @@ reconcile/test/test_gitlab_housekeeping.py,sha256=7EpWikaWJH52IlA2PZs7vz4GEgID-_
357
357
  reconcile/test/test_gitlab_labeler.py,sha256=vFLUJXSIaCduj6wSqgw7Fg7FhlopaDnYI5SLzNHtLoY,4362
358
358
  reconcile/test/test_gitlab_members.py,sha256=dP_dm-1THba9Vyzcq-EX1tdmBoX2hq8R-MY4Uqknq5s,9896
359
359
  reconcile/test/test_instrumented_wrappers.py,sha256=CZzhnQH0c4i7-Rxjg7-0dfFMvVPegLHL46z5NHOOCwo,608
360
- reconcile/test/test_integrations_manager.py,sha256=gk58nAf-hItITWTAsDye5gWwcJxRg89uihdu0WoHPYg,30628
360
+ reconcile/test/test_integrations_manager.py,sha256=0rd7eAsWFMgLgpl6f7JcoztStlSNhUm728KUk_ttRYo,31644
361
361
  reconcile/test/test_jenkins_worker_fleets.py,sha256=kWHvxb0md0feglSjDHZ68acUx44s6H3qw5ZLB5llwsU,2399
362
362
  reconcile/test/test_jump_host.py,sha256=ZrsdafquKYXFyGSZFH86aVtF-BsLnYdW1FGH3l5QrBg,3285
363
363
  reconcile/test/test_ldap_users.py,sha256=8jjzVgoiRRylGad6-TvkugoFGXt3eko--zVVKjmZDn4,3812
@@ -368,8 +368,7 @@ reconcile/test/test_ocm_clusters_manifest_updates.py,sha256=SkHsWj8FZjOkigUky3Ig
368
368
  reconcile/test/test_ocm_machine_pools.py,sha256=o1AE0KzYAEqnsJsyxC7Ox96a_TbqXAK-dQAtBieY4us,23652
369
369
  reconcile/test/test_ocm_update_recommended_version.py,sha256=ONY3slwUHwEdonvIYRI2Z8nWPDMTSSLGZ2I1dqaz7fg,4328
370
370
  reconcile/test/test_ocm_upgrade_scheduler_org_updater.py,sha256=zYRGUX7pAmxSv9oFYw2ZnPGa-YAPgDfmqXOJM4eE-8A,4353
371
- reconcile/test/test_openshift_base.py,sha256=ybHiHMPjKdivI-vVf_2os8OP6J-k0c4hvgn6C_HWRjU,26731
372
- reconcile/test/test_openshift_groups.py,sha256=-OykzdgwhHCo3Cfi_7oSWVg32VGP05orhkYl6QuERog,348
371
+ reconcile/test/test_openshift_base.py,sha256=owJsyyatl_7z6igUEDeJcMMV5_jIwcV2Yj7YgsmYkXs,27035
373
372
  reconcile/test/test_openshift_namespace_labels.py,sha256=P1hqi6P88NijNrurdXG_QR2usyo3EYZSy9zpwYHvDsM,12104
374
373
  reconcile/test/test_openshift_namespaces.py,sha256=HmRnCE5EnFt3MYceVEFHmk8wWRtCrxu2AFGFkY9pdyA,9214
375
374
  reconcile/test/test_openshift_resource.py,sha256=FwU5xzrGyc1FHOL-HA3EH09iktCsdPaGv8HyKNwKit4,13037
@@ -482,7 +481,7 @@ reconcile/utils/environ.py,sha256=u3h1FlnIcZnaAk1POVaSYW_HIvcQG-W-n2DhfSCqwuE,53
482
481
  reconcile/utils/exceptions.py,sha256=DwfnWUpVOotpP79RWZ2pycmG6nKCL00RBIeZLYkQPW4,635
483
482
  reconcile/utils/expiration.py,sha256=BXwKE50sNIV-Lszke97fxitNkLxYszoOLW1LBgp_yqg,1246
484
483
  reconcile/utils/external_resource_spec.py,sha256=OGPKH3IKXgJszRTgE5U_QKgU-s4BHQnx97Lj-Krz46k,6655
485
- reconcile/utils/external_resources.py,sha256=ik6NOEP_6Tg1fjOpUXVQWW_ybwmR2ieAwO4AotMoqtg,7425
484
+ reconcile/utils/external_resources.py,sha256=eF9Wup8zbLWx56WoA0FlqguT6BRXRYgoyN3cbmpT_Dk,7443
486
485
  reconcile/utils/filtering.py,sha256=dw7Ok7HXjZb0ruvCWHFh194rtunX1COLDTRnNfOpwQU,418
487
486
  reconcile/utils/git.py,sha256=kgjN93MMB5mnkuNb1n53f5kldGGf5u0pBHj9YJbiE_c,1455
488
487
  reconcile/utils/git_secrets.py,sha256=897nRs7tycA3m7YYeVEbzOhI8RFrI9IJT2E0di1eJhc,1956
@@ -608,8 +607,8 @@ tools/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
608
607
  tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
609
608
  tools/test/test_sd_app_sre_alert_report.py,sha256=JeLhgzpKCPgLvptwg_4ZvJHLVWKNG1T5845HXTkMBxA,1826
610
609
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
611
- qontract_reconcile-0.10.1rc365.dist-info/METADATA,sha256=7qwDtNgwdcPELpxl9DuyjgTjjKbFcObGv44ohiZcYH4,2347
612
- qontract_reconcile-0.10.1rc365.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
613
- qontract_reconcile-0.10.1rc365.dist-info/entry_points.txt,sha256=ErVY2Jp-0Rtuq5KOtMlW5yvna4nIEuc_1YbEdEdcy9o,301
614
- qontract_reconcile-0.10.1rc365.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
615
- qontract_reconcile-0.10.1rc365.dist-info/RECORD,,
610
+ qontract_reconcile-0.10.1rc367.dist-info/METADATA,sha256=DyOymmfQbHA1ytfv6km0FdkN6A7RorL33eS7pVKHGH8,2347
611
+ qontract_reconcile-0.10.1rc367.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
612
+ qontract_reconcile-0.10.1rc367.dist-info/entry_points.txt,sha256=ErVY2Jp-0Rtuq5KOtMlW5yvna4nIEuc_1YbEdEdcy9o,301
613
+ qontract_reconcile-0.10.1rc367.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
614
+ qontract_reconcile-0.10.1rc367.dist-info/RECORD,,
@@ -162,6 +162,7 @@ def run_for_provider(
162
162
  probe = probe_builder(ep_mon_provider, endpoints)
163
163
  if probe:
164
164
  fill_desired_state(ep_mon_provider, probe, ri)
165
+ ob.publish_metrics(ri, integration)
165
166
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size, recycle_pods=False)
166
167
 
167
168
  if ri.has_error_registered():
@@ -127,6 +127,7 @@ def run(
127
127
  if defer:
128
128
  defer(oc_map.cleanup)
129
129
  fetch_desired_state(gabi_instances, ri)
130
+ ob.publish_metrics(ri, QONTRACT_INTEGRATION)
130
131
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size)
131
132
 
132
133
  if ri.has_error_registered():
@@ -232,6 +232,7 @@ def run(
232
232
  glitchtip_client=glitchtip_client,
233
233
  )
234
234
 
235
+ ob.publish_metrics(ri, QONTRACT_INTEGRATION)
235
236
  # create/update/delete all secrets
236
237
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size)
237
238
 
@@ -56,6 +56,8 @@ QONTRACT_INTEGRATION_VERSION = make_semver(0, 1, 0)
56
56
  IMAGE_DEFAULT = "quay.io/app-sre/qontract-reconcile"
57
57
  UPSTREAM_DEFAULT = "https://github.com/app-sre/qontract-reconcile"
58
58
 
59
+ INTEGRATION_UPSTREAM_REPOS_PARAM = "INTEGRATION_UPSTREAM_REPOS"
60
+
59
61
 
60
62
  def get_image_tag_from_ref(ref: str, upstream: str) -> str:
61
63
  gh_prefix = "https://github.com/"
@@ -87,6 +89,17 @@ def collect_parameters(
87
89
  if p["name"] in os.environ
88
90
  }
89
91
  parameters.update(tp_env_vars)
92
+
93
+ # overwrite image and imtage tag from environment parameter
94
+ for upstream_config in (environment.parameters or {}).get(
95
+ INTEGRATION_UPSTREAM_REPOS_PARAM, []
96
+ ):
97
+ if upstream_config.get("repo") == upstream:
98
+ parameters["IMAGE_TAG"] = get_image_tag_from_ref(
99
+ upstream_config.get("ref"), upstream
100
+ )
101
+
102
+ # overwrite image tag from cli parameters
90
103
  if image_tag_from_ref:
91
104
  for e, r in image_tag_from_ref.items():
92
105
  if environment.name == e:
@@ -288,6 +301,7 @@ def run(
288
301
  integration_environments, ri, upstream, image, image_tag_from_ref
289
302
  )
290
303
 
304
+ ob.publish_metrics(ri, QONTRACT_INTEGRATION)
291
305
  if use_upstream:
292
306
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size, caller=upstream)
293
307
  else:
@@ -1,5 +1,6 @@
1
1
  import itertools
2
2
  import logging
3
+ from collections import Counter
3
4
  from collections.abc import (
4
5
  Iterable,
5
6
  Mapping,
@@ -1524,7 +1525,7 @@ def publish_metrics(ri: ResourceInventory, integration: str) -> None:
1524
1525
  for state in ("current", "desired"):
1525
1526
  metrics.set_gauge(
1526
1527
  OpenshiftResourceInventoryGauge(
1527
- integration=integration,
1528
+ integration=integration.replace("_", "-"),
1528
1529
  cluster=cluster,
1529
1530
  namespace=namespace,
1530
1531
  kind=kind,
@@ -1532,3 +1533,23 @@ def publish_metrics(ri: ResourceInventory, integration: str) -> None:
1532
1533
  ),
1533
1534
  len(data[state]),
1534
1535
  )
1536
+
1537
+
1538
+ def get_state_count_combinations(state: Iterable[Mapping[str, str]]) -> Counter[str]:
1539
+ return Counter(s["cluster"] for s in state)
1540
+
1541
+
1542
+ def publish_cluster_desired_metrics_from_state(
1543
+ state: Iterable[Mapping[str, str]], integration: str, kind: str
1544
+ ) -> None:
1545
+ for cluster, count in get_state_count_combinations(state).items():
1546
+ metrics.set_gauge(
1547
+ OpenshiftResourceInventoryGauge(
1548
+ integration=integration,
1549
+ cluster=cluster,
1550
+ namespace="cluster",
1551
+ kind=kind,
1552
+ state="desired",
1553
+ ),
1554
+ count,
1555
+ )
@@ -1,6 +1,5 @@
1
1
  import itertools
2
2
  import logging
3
- from collections import Counter
4
3
  from collections.abc import (
5
4
  Callable,
6
5
  Iterable,
@@ -28,7 +27,6 @@ from reconcile.typed_queries.clusters import get_clusters
28
27
  from reconcile.utils import (
29
28
  expiration,
30
29
  gql,
31
- metrics,
32
30
  )
33
31
  from reconcile.utils.defer import defer
34
32
  from reconcile.utils.oc_map import (
@@ -36,7 +34,6 @@ from reconcile.utils.oc_map import (
36
34
  OCMap,
37
35
  init_oc_map_from_clusters,
38
36
  )
39
- from reconcile.utils.openshift_resource import OpenshiftResourceInventoryGauge
40
37
  from reconcile.utils.secret_reader import create_secret_reader
41
38
  from reconcile.utils.sharding import is_in_shard
42
39
 
@@ -88,7 +85,7 @@ def create_groups_list(
88
85
 
89
86
  def fetch_current_state(
90
87
  thread_pool_size: int, internal: Optional[bool], use_jump_host: bool
91
- ) -> tuple[OCMap, list[dict[str, str]], list[str]]:
88
+ ) -> tuple[OCMap, list[dict[str, str]], list[str], list[dict[str, str]]]:
92
89
  clusters = [c for c in get_clusters() if is_in_shard(c.name)]
93
90
  ocm_clusters = [c.name for c in clusters if c.ocm is not None]
94
91
  vault_settings = get_app_interface_vault_settings()
@@ -109,7 +106,7 @@ def fetch_current_state(
109
106
  )
110
107
 
111
108
  current_state = list(itertools.chain.from_iterable(results))
112
- return oc_map, current_state, ocm_clusters
109
+ return oc_map, current_state, ocm_clusters, groups_list
113
110
 
114
111
 
115
112
  def fetch_desired_state(
@@ -267,28 +264,6 @@ def act(diff: Mapping[str, Optional[str]], oc_map: ClusterMap) -> None:
267
264
  raise Exception("invalid action: {}".format(action))
268
265
 
269
266
 
270
- def get_state_count_combinations(state: Iterable[Mapping[str, str]]) -> Counter[str]:
271
- return Counter(s["cluster"] for s in state)
272
-
273
-
274
- def publish_metrics(
275
- current_state: Iterable[Mapping[str, str]],
276
- desired_state: Iterable[Mapping[str, str]],
277
- ) -> None:
278
- for state, state_type in ((current_state, "current"), (desired_state, "desired")):
279
- for cluster, count in get_state_count_combinations(state).items():
280
- metrics.set_gauge(
281
- OpenshiftResourceInventoryGauge(
282
- integration=QONTRACT_INTEGRATION,
283
- cluster=cluster,
284
- namespace="cluster",
285
- kind="GroupBinding",
286
- state=state_type,
287
- ),
288
- count,
289
- )
290
-
291
-
292
267
  @defer
293
268
  def run(
294
269
  dry_run: bool,
@@ -297,7 +272,7 @@ def run(
297
272
  use_jump_host: bool = True,
298
273
  defer: Optional[Callable] = None,
299
274
  ) -> None:
300
- oc_map, current_state, ocm_clusters = fetch_current_state(
275
+ oc_map, current_state, ocm_clusters, groups_list = fetch_current_state(
301
276
  thread_pool_size, internal, use_jump_host
302
277
  )
303
278
  if defer:
@@ -316,7 +291,9 @@ def run(
316
291
  if not (s["cluster"] in ocm_clusters and s["group"] == "dedicated-admins")
317
292
  ]
318
293
 
319
- publish_metrics(current_state, desired_state)
294
+ ob.publish_cluster_desired_metrics_from_state(
295
+ groups_list, QONTRACT_INTEGRATION, "Group"
296
+ )
320
297
  diffs = calculate_diff(current_state, desired_state)
321
298
  validate_diffs(diffs)
322
299
  diffs.sort(key=sort_diffs)
@@ -113,6 +113,7 @@ def run(
113
113
  defer(oc_map.cleanup)
114
114
 
115
115
  add_desired_state(namespaces, ri, oc_map)
116
+ ob.publish_metrics(ri, QONTRACT_INTEGRATION)
116
117
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size, take_over=take_over)
117
118
 
118
119
  if ri.has_error_registered():
@@ -13,6 +13,7 @@ from typing import (
13
13
 
14
14
  from sretoolbox.utils import threaded
15
15
 
16
+ import reconcile.openshift_base as ob
16
17
  from reconcile.gql_definitions.common.namespaces_minimal import NamespaceV1
17
18
  from reconcile.status import ExitCodes
18
19
  from reconcile.typed_queries.app_interface_vault_settings import (
@@ -176,6 +177,10 @@ def run(
176
177
  if defer:
177
178
  defer(oc_map.cleanup)
178
179
 
180
+ ob.publish_cluster_desired_metrics_from_state(
181
+ desired_state, QONTRACT_INTEGRATION, "Namespace"
182
+ )
183
+
179
184
  results = threaded.run(
180
185
  manage_namespaces,
181
186
  desired_state,
@@ -142,6 +142,7 @@ def run(dry_run, thread_pool_size=10, internal=None, use_jump_host=True, defer=N
142
142
  )
143
143
  defer(oc_map.cleanup)
144
144
  fetch_desired_state(namespaces, ri, oc_map)
145
+ ob.publish_metrics(ri, QONTRACT_INTEGRATION)
145
146
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size)
146
147
 
147
148
  if ri.has_error_registered():
@@ -76,6 +76,7 @@ def run(
76
76
  )
77
77
  defer(oc_map.cleanup)
78
78
  fetch_desired_state(namespaces, ri, oc_map)
79
+ ob.publish_metrics(ri, QONTRACT_INTEGRATION)
79
80
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size)
80
81
 
81
82
  if ri.has_error_registered():
@@ -163,6 +163,7 @@ def run(
163
163
  )
164
164
  defer(oc_map.cleanup)
165
165
  fetch_desired_state(namespaces, ri, oc_map)
166
+ ob.publish_metrics(ri, QONTRACT_INTEGRATION)
166
167
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size)
167
168
  if not dry_run and vault_output_path:
168
169
  write_outputs_to_vault(vault_output_path, ri)
@@ -459,6 +459,8 @@ def run(
459
459
  for desired_resource in desired_resources:
460
460
  ri.add_desired(**desired_resource)
461
461
 
462
+ LOG.debug("Publishing metrics")
463
+ ob.publish_metrics(ri, QONTRACT_INTEGRATION)
462
464
  LOG.debug("Realizing data")
463
465
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size)
464
466
 
@@ -251,6 +251,7 @@ def reconcile(
251
251
  ) -> None:
252
252
  """Realize all skupper resources and create skupper site connections."""
253
253
 
254
+ ob.publish_metrics(ri, integration)
254
255
  # create/update/delete all skupper site resources
255
256
  ob.realize_data(dry_run, oc_map, ri, thread_pool_size)
256
257
 
@@ -363,9 +363,7 @@ def run(
363
363
 
364
364
  cf_clients.populate_resources()
365
365
 
366
- publish_metrics(
367
- cf_clients.resource_spec_inventory, QONTRACT_INTEGRATION.replace("_", "-")
368
- )
366
+ publish_metrics(cf_clients.resource_spec_inventory, QONTRACT_INTEGRATION)
369
367
 
370
368
  ri, oc_map = _build_oc_resources(
371
369
  cloudflare_namespaces,
@@ -400,7 +400,7 @@ def run(
400
400
  account_names,
401
401
  exclude_accounts,
402
402
  )
403
- publish_metrics(resource_specs, QONTRACT_INTEGRATION.replace("_", "-"))
403
+ publish_metrics(resource_specs, QONTRACT_INTEGRATION)
404
404
 
405
405
  if not dry_run and oc_map and defer:
406
406
  defer(oc_map.cleanup)
@@ -442,6 +442,7 @@ def run(
442
442
  # populate the resource inventory with latest output data
443
443
  populate_desired_state(ri, resource_specs)
444
444
 
445
+ ob.publish_metrics(ri, QONTRACT_INTEGRATION)
445
446
  actions = []
446
447
  if oc_map:
447
448
  actions = ob.realize_data(
@@ -1,4 +1,5 @@
1
1
  import copy
2
+ import json
2
3
  import os
3
4
  from collections.abc import (
4
5
  Callable,
@@ -30,7 +31,10 @@ from reconcile.gql_definitions.terraform_cloudflare_dns.terraform_cloudflare_zon
30
31
  CloudflareDnsRecordV1,
31
32
  CloudflareDnsZoneV1,
32
33
  )
33
- from reconcile.integrations_manager import HelmIntegrationSpec
34
+ from reconcile.integrations_manager import (
35
+ INTEGRATION_UPSTREAM_REPOS_PARAM,
36
+ HelmIntegrationSpec,
37
+ )
34
38
  from reconcile.utils.openshift_resource import ResourceInventory
35
39
  from reconcile.utils.runtime.meta import IntegrationMeta
36
40
  from reconcile.utils.runtime.sharding import (
@@ -130,6 +134,38 @@ def test_collect_parameters_image_tag_from_ref(mocker):
130
134
  assert parameters == expected
131
135
 
132
136
 
137
+ def test_collect_parameters_namespace_environment_parameter(mocker):
138
+ upstream = "https://github.com/some-upstream-repo"
139
+ template = {
140
+ "parameters": [
141
+ {
142
+ "name": "IMAGE_TAG",
143
+ "value": "dummy",
144
+ }
145
+ ]
146
+ }
147
+ os.environ["IMAGE_TAG"] = "env override"
148
+ environment = EnvironmentV1(
149
+ name="env",
150
+ parameters=json.dumps(
151
+ {
152
+ "IMAGE_TAG": "env-file-general-override",
153
+ INTEGRATION_UPSTREAM_REPOS_PARAM: [
154
+ {
155
+ "repo": upstream,
156
+ "ref": "master",
157
+ }
158
+ ],
159
+ }
160
+ ),
161
+ )
162
+ mocker.patch(
163
+ "reconcile.integrations_manager.get_image_tag_from_ref", return_value="f44e417"
164
+ )
165
+ parameters = intop.collect_parameters(template, environment, upstream, "", None)
166
+ assert parameters["IMAGE_TAG"] == "f44e417"
167
+
168
+
133
169
  @pytest.fixture
134
170
  def resources() -> dict[str, Any]:
135
171
  return {
@@ -992,3 +992,15 @@ def test_realize_resource_data_3way_diff(
992
992
  assert len(actions) == len_actions
993
993
  assert apply_mock.call_count == apply_calls
994
994
  assert delete_mock.call_count == delete_calls
995
+
996
+
997
+ def test_get_state_count_combinations():
998
+ state = [
999
+ {"cluster": "c1"},
1000
+ {"cluster": "c2"},
1001
+ {"cluster": "c1"},
1002
+ {"cluster": "c3"},
1003
+ {"cluster": "c2"},
1004
+ ]
1005
+ expected = {"c1": 2, "c2": 2, "c3": 1}
1006
+ assert expected == sut.get_state_count_combinations(state)
@@ -83,7 +83,7 @@ def publish_metrics(inventory: ExternalResourceSpecInventory, integration: str)
83
83
  provision_provider, provisioner_name, provider = combination
84
84
  metrics.set_gauge(
85
85
  ExternalResourceInventoryGauge(
86
- integration=integration,
86
+ integration=integration.replace("_", "-"),
87
87
  provision_provider=provision_provider,
88
88
  provisioner_name=provisioner_name,
89
89
  provider=provider,
@@ -1,13 +0,0 @@
1
- from reconcile import openshift_groups as og
2
-
3
-
4
- def test_get_state_count_combinations():
5
- state = [
6
- {"cluster": "c1"},
7
- {"cluster": "c2"},
8
- {"cluster": "c1"},
9
- {"cluster": "c3"},
10
- {"cluster": "c2"},
11
- ]
12
- expected = {"c1": 2, "c2": 2, "c3": 1}
13
- assert expected == og.get_state_count_combinations(state)