qontract-reconcile 0.10.1rc157__py3-none-any.whl → 0.10.1rc159__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.1rc157
3
+ Version: 0.10.1rc159
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
@@ -270,18 +270,18 @@ reconcile/oum/standalone.py,sha256=tMR2-njle_Mqm2nxewkm9kQKZDqZ_Aqd4rL_Ltm4SRs,7
270
270
  reconcile/prometheus_rules_tester/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
271
271
  reconcile/prometheus_rules_tester/integration.py,sha256=Sn6mjzC2lJQVcETS1J2Z3tOwm8M3DDW-1GVT-5ccNuA,8860
272
272
  reconcile/rhidp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
273
- reconcile/rhidp/common.py,sha256=Btx7mRsSe3MOG0d7PqT2kyKVpw1-xiTDUIDDXje-iV4,5531
274
- reconcile/rhidp/metrics.py,sha256=ope0a78IekJQkLcLRSC5878fGsuLohyZJAA_hWINHnQ,392
273
+ reconcile/rhidp/common.py,sha256=g_5OlPkdgXf6ioC6DKMXxVN5K8epJikhSVk8nWAPWA0,5606
274
+ reconcile/rhidp/metrics.py,sha256=Yp0GtpjhieEdru0qkG3osBTJiKUzg6CAjwPoFTQDnCg,417
275
275
  reconcile/rhidp/ocm_oidc_idp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
276
- reconcile/rhidp/ocm_oidc_idp/base.py,sha256=Y1kDC0NEfUT1pxkL9VtK2Aecy8eGymDOcvYUE41Rpgw,7001
277
- reconcile/rhidp/ocm_oidc_idp/integration.py,sha256=zdJdxVE1EUzwwQT3iQ8-hEic8AFKywIPj_yE4QnTVxY,1790
278
- reconcile/rhidp/ocm_oidc_idp/metrics.py,sha256=D2g8GRC-EfbhTIiQ2HtfOJ_fDJTI03DnHAiW3uFnJE8,539
279
- reconcile/rhidp/ocm_oidc_idp/standalone.py,sha256=gPJ2Bvab_ro0wdNuRk8wiLQRXNmykTdpn0h3kGIaeBQ,3485
276
+ reconcile/rhidp/ocm_oidc_idp/base.py,sha256=RP0tox_p3HL-LftUtyTcwqKPF9STQ99EjVyXoFunOsM,7200
277
+ reconcile/rhidp/ocm_oidc_idp/integration.py,sha256=YXhvTLDQr1GoAja6plXg1LXWDJ_YAFbmpoMGuN2omME,1789
278
+ reconcile/rhidp/ocm_oidc_idp/metrics.py,sha256=mfk4grSmH8zfA6Oz5Q4L76Uh1Ip6HlqUl23ap2vWlRE,591
279
+ reconcile/rhidp/ocm_oidc_idp/standalone.py,sha256=DZA2m7se5vG3m05DFtUTRjD0lSfY1OQx2evG2kXi9Zc,3494
280
280
  reconcile/rhidp/sso_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
281
- reconcile/rhidp/sso_client/base.py,sha256=Ig-Atk2im851hTgWC8XN398ybaI9R7Y36SgExa7Q1j8,8158
282
- reconcile/rhidp/sso_client/integration.py,sha256=vk70unZ26VK2fykkegS5LMl9aGwVOF7gxJ6OBWVa7sQ,2024
281
+ reconcile/rhidp/sso_client/base.py,sha256=QpQKrphmlyMT3EQUHj2RmCDjSQNTrBPKoi9fKrL09Mg,8463
282
+ reconcile/rhidp/sso_client/integration.py,sha256=oXpO2G4vM74pr0NS4XSUJb1vRKRDOyXmWAhG5v3-IHE,2023
283
283
  reconcile/rhidp/sso_client/metrics.py,sha256=Tq7tSOsqL3XdcPUdozxqzSPIodUeOV87UCTqpuuqqhw,1013
284
- reconcile/rhidp/sso_client/standalone.py,sha256=SZkZtZ9N3xV4VoE17fNkIdq78AIoc3utDdVr7JkBS6U,3106
284
+ reconcile/rhidp/sso_client/standalone.py,sha256=Iv3HA0RdUn8WIs4XVlb0ZVjJ_H2zrXJMts_RILdvGqE,3115
285
285
  reconcile/saas_auto_promotions_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
286
286
  reconcile/saas_auto_promotions_manager/integration.py,sha256=hmRWva3_ZEO845wMkttEt4X6Izl5p8ZKs09NXWp8mkY,5609
287
287
  reconcile/saas_auto_promotions_manager/publisher.py,sha256=Oi7QMlxY56NXO2W4NnB7kSeL-7Ef3oY75mIccoLWBwg,1980
@@ -607,8 +607,8 @@ tools/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
607
607
  tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
608
608
  tools/test/test_sd_app_sre_alert_report.py,sha256=JeLhgzpKCPgLvptwg_4ZvJHLVWKNG1T5845HXTkMBxA,1826
609
609
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
610
- qontract_reconcile-0.10.1rc157.dist-info/METADATA,sha256=rVw_r3e244-qMSSHqRsrRqLk_s7YZa7rTKcm13WLn0Q,2320
611
- qontract_reconcile-0.10.1rc157.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
612
- qontract_reconcile-0.10.1rc157.dist-info/entry_points.txt,sha256=Af70EWPJxsTiCNF6gA-pWdw1A0Heqn-PZF-oBc5NmiU,302
613
- qontract_reconcile-0.10.1rc157.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
614
- qontract_reconcile-0.10.1rc157.dist-info/RECORD,,
610
+ qontract_reconcile-0.10.1rc159.dist-info/METADATA,sha256=tzOkoQAZ_OVFLtEUa2h4bnNm5zKcN-ELZAD6VCU5G3I,2320
611
+ qontract_reconcile-0.10.1rc159.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
612
+ qontract_reconcile-0.10.1rc159.dist-info/entry_points.txt,sha256=Af70EWPJxsTiCNF6gA-pWdw1A0Heqn-PZF-oBc5NmiU,302
613
+ qontract_reconcile-0.10.1rc159.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
614
+ qontract_reconcile-0.10.1rc159.dist-info/RECORD,,
reconcile/rhidp/common.py CHANGED
@@ -154,6 +154,7 @@ def cluster_vault_secret(
154
154
  def expose_base_metrics(
155
155
  metrics_container: MetricsContainer,
156
156
  integration_name: str,
157
+ ocm_environment: str,
157
158
  clusters: Iterable[ClusterV1],
158
159
  ) -> None:
159
160
  clusters_per_org: Counter[str] = Counter()
@@ -168,6 +169,7 @@ def expose_base_metrics(
168
169
  metrics_container.set_gauge(
169
170
  RhIdpClusterCounter(
170
171
  integration=integration_name,
172
+ ocm_environment=ocm_environment,
171
173
  org_id=org_id,
172
174
  ),
173
175
  value=count,
@@ -7,6 +7,7 @@ class RhIdpBaseMetric(BaseModel):
7
7
  """Base class for RhIdp metrics"""
8
8
 
9
9
  integration: str
10
+ ocm_environment: str
10
11
 
11
12
 
12
13
  class RhIdpClusterCounter(RhIdpBaseMetric, GaugeMetric):
@@ -33,16 +33,18 @@ DEFAULT_GROUPS_CLAIMS: list[str] = []
33
33
 
34
34
  def run(
35
35
  integration_name: str,
36
- flavor: str,
36
+ ocm_environment: str,
37
37
  clusters: Iterable[ClusterV1],
38
38
  secret_reader: SecretReaderBase,
39
39
  vault_input_path: str,
40
40
  dry_run: bool,
41
41
  managed_idps: Optional[list[str]] = None,
42
42
  ) -> None:
43
- with metrics.transactional_metrics(flavor) as metrics_container:
43
+ with metrics.transactional_metrics(ocm_environment) as metrics_container:
44
44
  # metrics
45
- expose_base_metrics(metrics_container, integration_name, clusters)
45
+ expose_base_metrics(
46
+ metrics_container, integration_name, ocm_environment, clusters
47
+ )
46
48
 
47
49
  # APIs
48
50
  settings = queries.get_app_interface_settings()
@@ -66,11 +68,15 @@ def run(
66
68
  managed_idps=managed_idps or [],
67
69
  )
68
70
  metrics_container.inc_counter(
69
- RhIdpOCMOidcIdpReconcileCounter(integration=integration_name)
71
+ RhIdpOCMOidcIdpReconcileCounter(
72
+ integration=integration_name, ocm_environment=ocm_environment
73
+ )
70
74
  )
71
75
  except Exception:
72
76
  metrics_container.inc_counter(
73
- RhIdpOCMOidcIdpReconcileErrorCounter(integration=integration_name)
77
+ RhIdpOCMOidcIdpReconcileErrorCounter(
78
+ integration=integration_name, ocm_environment=ocm_environment
79
+ )
74
80
  )
75
81
  raise
76
82
 
@@ -45,7 +45,7 @@ class OCMOidcIdpIntegration(
45
45
 
46
46
  run(
47
47
  integration_name=self.name,
48
- flavor="app-interface",
48
+ ocm_environment="all",
49
49
  clusters=clusters,
50
50
  secret_reader=self.secret_reader,
51
51
  vault_input_path=self.params.vault_input_path,
@@ -5,6 +5,8 @@ from reconcile.utils.metrics import CounterMetric
5
5
  class RhIdpOCMOidcIdpReconcileErrorCounter(RhIdpBaseMetric, CounterMetric):
6
6
  """Counter for the failed reconcile runs."""
7
7
 
8
+ ocm_environment: str
9
+
8
10
  @classmethod
9
11
  def name(cls) -> str:
10
12
  return "rhidp_ocm_oidc_idp_reconcile_errors"
@@ -13,6 +15,8 @@ class RhIdpOCMOidcIdpReconcileErrorCounter(RhIdpBaseMetric, CounterMetric):
13
15
  class RhIdpOCMOidcIdpReconcileCounter(RhIdpBaseMetric, CounterMetric):
14
16
  """Counter for successful reconcile runs."""
15
17
 
18
+ ocm_environment: str
19
+
16
20
  @classmethod
17
21
  def name(cls) -> str:
18
22
  return "rhidp_ocm_oidc_idp_reconciled"
@@ -66,7 +66,7 @@ class OCMOidcIdpStandalone(QontractReconcileIntegration[OCMOidcIdpStandalonePara
66
66
 
67
67
  run(
68
68
  integration_name=self.name,
69
- flavor=ocm_env.name,
69
+ ocm_environment=ocm_env.name,
70
70
  clusters=clusters,
71
71
  secret_reader=self.secret_reader,
72
72
  vault_input_path=f"{self.params.vault_input_path}/{ocm_env.name}",
@@ -43,7 +43,7 @@ def console_url_to_oauth_url(console_url: str, auth_name: str) -> str:
43
43
 
44
44
  def run(
45
45
  integration_name: str,
46
- flavor: str,
46
+ ocm_environment: str,
47
47
  clusters: Iterable[ClusterV1],
48
48
  secret_reader: VaultSecretReader,
49
49
  keycloak_vault_paths: Iterable[str],
@@ -51,9 +51,11 @@ def run(
51
51
  contacts: Sequence[str],
52
52
  dry_run: bool,
53
53
  ) -> None:
54
- with metrics.transactional_metrics(flavor) as metrics_container:
54
+ with metrics.transactional_metrics(ocm_environment) as metrics_container:
55
55
  # metrics
56
- expose_base_metrics(metrics_container, integration_name, clusters)
56
+ expose_base_metrics(
57
+ metrics_container, integration_name, ocm_environment, clusters
58
+ )
57
59
 
58
60
  # APIs
59
61
  keycloak_instances: list[KeycloakInstance] = []
@@ -69,6 +71,7 @@ def run(
69
71
  metrics_container.set_gauge(
70
72
  RhIdpSSOClientIatExpiration(
71
73
  integration=integration_name,
74
+ ocm_environment=ocm_environment,
72
75
  path=path,
73
76
  ),
74
77
  value=token["exp"],
@@ -89,6 +92,7 @@ def run(
89
92
  metrics_container.set_gauge(
90
93
  RhIdpSSOClientCounter(
91
94
  integration=integration_name,
95
+ ocm_environment=ocm_environment,
92
96
  ),
93
97
  value=len(existing_sso_client_ids),
94
98
  )
@@ -103,11 +107,15 @@ def run(
103
107
  dry_run=dry_run,
104
108
  )
105
109
  metrics_container.inc_counter(
106
- RhIdpSSOClientReconcileCounter(integration=integration_name)
110
+ RhIdpSSOClientReconcileCounter(
111
+ integration=integration_name, ocm_environment=ocm_environment
112
+ )
107
113
  )
108
114
  except Exception:
109
115
  metrics_container.inc_counter(
110
- RhIdpSSOClientReconcileErrorCounter(integration=integration_name)
116
+ RhIdpSSOClientReconcileErrorCounter(
117
+ integration=integration_name, ocm_environment=ocm_environment
118
+ )
111
119
  )
112
120
  raise
113
121
 
@@ -48,7 +48,7 @@ class SSOClientIntegration(
48
48
 
49
49
  run(
50
50
  integration_name=self.name,
51
- flavor="app-interface",
51
+ ocm_environment="all",
52
52
  clusters=clusters,
53
53
  secret_reader=VaultSecretReader(),
54
54
  keycloak_vault_paths=self.params.keycloak_vault_paths,
@@ -50,7 +50,7 @@ class SSOClientStandalone(QontractReconcileIntegration[SSOClientStandaloneParams
50
50
 
51
51
  run(
52
52
  integration_name=self.name,
53
- flavor=ocm_env.name,
53
+ ocm_environment=ocm_env.name,
54
54
  clusters=clusters,
55
55
  secret_reader=secret_reader,
56
56
  keycloak_vault_paths=self.params.keycloak_vault_paths,