qontract-reconcile 0.10.1rc860__py3-none-any.whl → 0.10.1rc861__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.1rc860
3
+ Version: 0.10.1rc861
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
@@ -10,7 +10,7 @@ reconcile/aws_iam_password_reset.py,sha256=NwErtrqgBiXr7eGCAHdtGGOx0S7-4JnSc29Ie
10
10
  reconcile/aws_support_cases_sos.py,sha256=Jk6_XjDeJSYxgRGqcEAOcynt9qJF2r5HPIPcSKmoBv8,2974
11
11
  reconcile/blackbox_exporter_endpoint_monitoring.py,sha256=W_VJagnsJR1v5oqjlI3RJJE0_nhtJ0m81RS8zWA5u5c,3538
12
12
  reconcile/checkpoint.py,sha256=R2WFXUXLTB4sWMi4GeA4eegsuf_1-Q4vH8M0Toh3Ij4,5036
13
- reconcile/cli.py,sha256=F5s-i-OlL6RhqiYkEhXMaNLegiPazbS0ahEtRrO2LeE,104075
13
+ reconcile/cli.py,sha256=1x1ZIR1wKgnGh799yPcV8IQD1RHyHwWlDg9Llh1diOw,104736
14
14
  reconcile/closedbox_endpoint_monitoring_base.py,sha256=SMhkcQqprWvThrIJa3U_3uh5w1h-alleW1QnCJFY4Qw,4909
15
15
  reconcile/cluster_deployment_mapper.py,sha256=2Ah-nu-Mdig0pjuiZl_XLrmVAjYzFjORR3dMlCgkmw0,2352
16
16
  reconcile/dashdotdb_base.py,sha256=R2JuwiXAEYAFiCtnztM_IIr1rtVzPpaWAmgxuDa2FgY,4813
@@ -69,9 +69,10 @@ reconcile/openshift_limitranges.py,sha256=UvCGo_OQ4XoDK55TJmn55qEhhlkhLzhU12tX8n
69
69
  reconcile/openshift_namespace_labels.py,sha256=dLkQgtgsD51WtDHiQOc-lF2yaaFzkiUAZ7ueKUkg-ZM,15669
70
70
  reconcile/openshift_namespaces.py,sha256=nHW1e3dyUWw3JPAzeQeZQ6s2-RuQYaNR7_DUfTP8KOg,5830
71
71
  reconcile/openshift_network_policies.py,sha256=_qqv7yj17OM1J8KJPsFmzFZ85gzESJeBocC672z4_WU,4231
72
+ reconcile/openshift_prometheus_rules.py,sha256=onowXab248zmHH8SbYDTc1W1bl7JiqRFU1xdTkZyLFg,1332
72
73
  reconcile/openshift_resourcequotas.py,sha256=yUi56PiOn3inMMfq_x_FEHmaW-reGipzoorjdar372g,2415
73
- reconcile/openshift_resources.py,sha256=WPnSTftrCCHaCDfwSD0CLvs-7GQqay5B7AtM6Swxy7c,1537
74
- reconcile/openshift_resources_base.py,sha256=1ItnO5hq31PnfvrLBxf30ln_keBZcRiLCKcHfmUhYrQ,40826
74
+ reconcile/openshift_resources.py,sha256=I2nO_C37mG3rfyGrd4cGwN3mVseVGuTAHAyhFzLyqF4,1518
75
+ reconcile/openshift_resources_base.py,sha256=_6jm84W3i9JjHs0Wue1p4cJkBYbHwBTvd5UIWPSLCsQ,40924
75
76
  reconcile/openshift_rolebindings.py,sha256=LlImloBisEqzc36jaatic-TeM3hzqMEfxogF-dM4Yhw,6599
76
77
  reconcile/openshift_routes.py,sha256=fXvuPSjcjVw1X3j2EQvUAdbOepmIFdKk-M3qP8QzPiw,1075
77
78
  reconcile/openshift_saas_deploy.py,sha256=fmhopPEbyZsGQHRPzyzpKEvoBXEGN3aPxFi7Utq0emU,12788
@@ -834,8 +835,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
834
835
  tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
835
836
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
836
837
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
837
- qontract_reconcile-0.10.1rc860.dist-info/METADATA,sha256=4f-gD89LH7FTMjujTGPqMsutWxeDQjvCtGKYLLDvlKY,2273
838
- qontract_reconcile-0.10.1rc860.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
839
- qontract_reconcile-0.10.1rc860.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
840
- qontract_reconcile-0.10.1rc860.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
841
- qontract_reconcile-0.10.1rc860.dist-info/RECORD,,
838
+ qontract_reconcile-0.10.1rc861.dist-info/METADATA,sha256=It9nMQuWCqX18i1qQ8klhL2EgIc89K-bhaa5wy9NeQ8,2273
839
+ qontract_reconcile-0.10.1rc861.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
840
+ qontract_reconcile-0.10.1rc861.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
841
+ qontract_reconcile-0.10.1rc861.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
842
+ qontract_reconcile-0.10.1rc861.dist-info/RECORD,,
reconcile/cli.py CHANGED
@@ -1776,6 +1776,31 @@ def openshift_routes(
1776
1776
  )
1777
1777
 
1778
1778
 
1779
+ @integration.command(short_help="Manages OpenShift Prometheus Rules.")
1780
+ @threaded()
1781
+ @binary(["oc", "ssh"])
1782
+ @binary_version("oc", ["version", "--client"], OC_VERSION_REGEX, OC_VERSIONS)
1783
+ @internal()
1784
+ @use_jump_host()
1785
+ @cluster_name
1786
+ @namespace_name
1787
+ @click.pass_context
1788
+ def openshift_prometheus_rules(
1789
+ ctx, thread_pool_size, internal, use_jump_host, cluster_name, namespace_name
1790
+ ):
1791
+ import reconcile.openshift_prometheus_rules
1792
+
1793
+ run_integration(
1794
+ reconcile.openshift_prometheus_rules,
1795
+ ctx.obj,
1796
+ thread_pool_size,
1797
+ internal,
1798
+ use_jump_host,
1799
+ cluster_name=cluster_name,
1800
+ namespace_name=namespace_name,
1801
+ )
1802
+
1803
+
1779
1804
  @integration.command(short_help="Configures the teams and members in Quay.")
1780
1805
  @click.pass_context
1781
1806
  def quay_membership(ctx):
@@ -0,0 +1,43 @@
1
+ from collections.abc import Iterable
2
+ from typing import Any
3
+
4
+ import reconcile.openshift_resources_base as orb
5
+ from reconcile.utils.runtime.integration import DesiredStateShardConfig
6
+ from reconcile.utils.semver_helper import make_semver
7
+
8
+ QONTRACT_INTEGRATION = "openshift-prometheus-rules"
9
+ QONTRACT_INTEGRATION_VERSION = make_semver(1, 0, 0)
10
+ PROVIDERS = ["prometheus-rule"]
11
+
12
+
13
+ def run(
14
+ dry_run: bool,
15
+ thread_pool_size: int = 10,
16
+ internal: bool | None = None,
17
+ use_jump_host: bool = True,
18
+ cluster_name: Iterable[str] | None = None,
19
+ exclude_cluster: Iterable[str] | None = None,
20
+ namespace_name: str | None = None,
21
+ ) -> None:
22
+ orb.QONTRACT_INTEGRATION = QONTRACT_INTEGRATION
23
+ orb.QONTRACT_INTEGRATION_VERSION = QONTRACT_INTEGRATION_VERSION
24
+
25
+ orb.run(
26
+ dry_run=dry_run,
27
+ thread_pool_size=thread_pool_size,
28
+ internal=internal,
29
+ use_jump_host=use_jump_host,
30
+ providers=PROVIDERS,
31
+ cluster_name=cluster_name,
32
+ exclude_cluster=exclude_cluster,
33
+ namespace_name=namespace_name,
34
+ init_api_resources=True,
35
+ )
36
+
37
+
38
+ def early_exit_desired_state(*args: Any, **kwargs: Any) -> dict[str, Any]:
39
+ return orb.early_exit_desired_state(PROVIDERS)
40
+
41
+
42
+ def desired_state_shard_config() -> DesiredStateShardConfig:
43
+ return orb.desired_state_shard_config()
@@ -8,7 +8,7 @@ from reconcile.utils.semver_helper import make_semver
8
8
 
9
9
  QONTRACT_INTEGRATION = "openshift_resources"
10
10
  QONTRACT_INTEGRATION_VERSION = make_semver(1, 9, 3)
11
- PROVIDERS = ["resource", "resource-template", "prometheus-rule"]
11
+ PROVIDERS = ["resource", "resource-template"]
12
12
 
13
13
 
14
14
  def run(
@@ -835,6 +835,8 @@ def canonicalize_namespaces(
835
835
  override = ["Secret"]
836
836
  elif providers[0] == "route":
837
837
  override = ["Route"]
838
+ elif providers[0] == "prometheus-rule":
839
+ override = ["PrometheusRule"]
838
840
 
839
841
  namespace_info["openshiftResources"] = ors
840
842
  canonicalized_namespaces.append(namespace_info)