qontract-reconcile 0.10.1rc752__py3-none-any.whl → 0.10.1rc753__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.1rc752
3
+ Version: 0.10.1rc753
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
@@ -22,7 +22,7 @@ reconcile/database_access_manager.py,sha256=42dBJyihdwx4WjEBjwi3lUiDzQ1t_2ZFViJr
22
22
  reconcile/deadmanssnitch.py,sha256=n-5W-djUgwzpmdDM4eQIZpkkDmHY0vndt-42LJXI4Y8,7491
23
23
  reconcile/dynatrace_token_provider.py,sha256=P5jvMavremWp64LVknz1kCZI4aagwLrDDfXkmJ9diwY,17212
24
24
  reconcile/email_sender.py,sha256=-5L-Ag_jaEYSzYRoMr52KQBRXz1E8yx9GqLbg2X4XFU,3533
25
- reconcile/gabi_authorized_users.py,sha256=9kpSJGyMe_qYVHIgTFHhYf8E3lKSLO0Ia1WwK9ADNIE,4502
25
+ reconcile/gabi_authorized_users.py,sha256=4jJNtmEwLqg2-keuWZ3sjKV-OMn7C9pfXWWdssVua8Y,4883
26
26
  reconcile/gcr_mirror.py,sha256=PAMnIL7tRTwt8KMZf-wM2k0r_et3LBgyJCEeyuqEM5E,8827
27
27
  reconcile/github_org.py,sha256=0vst4YETf2voTiMHcREngSeuKtG7jOOILfFBQ0AOVQg,13479
28
28
  reconcile/github_owners.py,sha256=s9NDIqTbaqgGE5lj89eh3Sr52B-6SCUWQILzQlzGyxw,2949
@@ -778,8 +778,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
778
778
  tools/test/test_qontract_cli.py,sha256=w2l4BHB09k1d-BGJ1jBUNCqDv7zkqYrMHojQXg-21kQ,4155
779
779
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
780
780
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
781
- qontract_reconcile-0.10.1rc752.dist-info/METADATA,sha256=-pk_8RW3Vy3d6CZqwwtyZx7jMvNTFI0YcXzmgGSuKl4,2382
782
- qontract_reconcile-0.10.1rc752.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
783
- qontract_reconcile-0.10.1rc752.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
784
- qontract_reconcile-0.10.1rc752.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
785
- qontract_reconcile-0.10.1rc752.dist-info/RECORD,,
781
+ qontract_reconcile-0.10.1rc753.dist-info/METADATA,sha256=XxOXxeAxSQyr7D4Nr7l5sIcfOoFqaHHIUydTxR7CrEQ,2382
782
+ qontract_reconcile-0.10.1rc753.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
783
+ qontract_reconcile-0.10.1rc753.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
784
+ qontract_reconcile-0.10.1rc753.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
785
+ qontract_reconcile-0.10.1rc753.dist-info/RECORD,,
@@ -20,6 +20,7 @@ from reconcile import queries
20
20
  from reconcile.status import ExitCodes
21
21
  from reconcile.utils.aggregated_list import RunnerException
22
22
  from reconcile.utils.defer import defer
23
+ from reconcile.utils.disabled_integrations import integration_is_enabled
23
24
  from reconcile.utils.external_resources import get_external_resource_specs
24
25
  from reconcile.utils.openshift_resource import (
25
26
  OpenshiftResource,
@@ -76,6 +77,14 @@ def fetch_desired_state(
76
77
  namespace = i["namespace"]
77
78
  account = i["account"]
78
79
  identifier = i["identifier"]
80
+ cluster = namespace["cluster"]
81
+ if not integration_is_enabled(QONTRACT_INTEGRATION, cluster):
82
+ logging.debug(
83
+ f"For cluster {cluster['name']} the integration "
84
+ f"{QONTRACT_INTEGRATION} is not enabled. Skipping."
85
+ )
86
+ continue
87
+
79
88
  specs = get_external_resource_specs(namespace)
80
89
  found = False
81
90
  for spec in specs:
@@ -90,10 +99,10 @@ def fetch_desired_state(
90
99
  f'for account {account} in namespace {namespace["name"]}. '
91
100
  "If this is a removed read only instance, consider updating the identifier to the source replica."
92
101
  )
93
- users = get_usernames(g["users"], namespace["cluster"])
102
+ users = get_usernames(g["users"], cluster)
94
103
  resource = construct_gabi_oc_resource(g["name"], expiration_date, users)
95
104
  ri.add_desired(
96
- namespace["cluster"]["name"],
105
+ cluster["name"],
97
106
  namespace["name"],
98
107
  resource.kind,
99
108
  resource.name,