qontract-reconcile 0.10.1rc859__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.
- {qontract_reconcile-0.10.1rc859.dist-info → qontract_reconcile-0.10.1rc861.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc859.dist-info → qontract_reconcile-0.10.1rc861.dist-info}/RECORD +9 -8
- reconcile/cli.py +25 -0
- reconcile/openshift_prometheus_rules.py +43 -0
- reconcile/openshift_resources.py +1 -1
- reconcile/openshift_resources_base.py +23 -1
- {qontract_reconcile-0.10.1rc859.dist-info → qontract_reconcile-0.10.1rc861.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc859.dist-info → qontract_reconcile-0.10.1rc861.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc859.dist-info → qontract_reconcile-0.10.1rc861.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc859.dist-info → qontract_reconcile-0.10.1rc861.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.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
|
{qontract_reconcile-0.10.1rc859.dist-info → qontract_reconcile-0.10.1rc861.dist-info}/RECORD
RENAMED
@@ -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=
|
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=
|
74
|
-
reconcile/openshift_resources_base.py,sha256=
|
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.
|
838
|
-
qontract_reconcile-0.10.
|
839
|
-
qontract_reconcile-0.10.
|
840
|
-
qontract_reconcile-0.10.
|
841
|
-
qontract_reconcile-0.10.
|
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()
|
reconcile/openshift_resources.py
CHANGED
@@ -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"
|
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)
|
@@ -1203,6 +1205,7 @@ def early_exit_monkey_patch() -> Generator:
|
|
1203
1205
|
url_makes_sense=DEFAULT,
|
1204
1206
|
lookup_s3_object=DEFAULT,
|
1205
1207
|
) as mocks:
|
1208
|
+
# mock lookup_secret
|
1206
1209
|
mocks["lookup_secret"].side_effect = (
|
1207
1210
|
lambda path,
|
1208
1211
|
key,
|
@@ -1212,6 +1215,11 @@ def early_exit_monkey_patch() -> Generator:
|
|
1212
1215
|
settings=None,
|
1213
1216
|
secret_reader=None: f"vault({path}, {key}, {version}"
|
1214
1217
|
)
|
1218
|
+
# needed for jinja2 `is_safe_callable`
|
1219
|
+
mocks["lookup_secret"].unsafe_callable = False
|
1220
|
+
mocks["lookup_secret"].alters_data = False
|
1221
|
+
|
1222
|
+
# mock lookup_github_file_content
|
1215
1223
|
mocks["lookup_github_file_content"].side_effect = (
|
1216
1224
|
lambda repo,
|
1217
1225
|
path,
|
@@ -1220,13 +1228,27 @@ def early_exit_monkey_patch() -> Generator:
|
|
1220
1228
|
settings=None,
|
1221
1229
|
secret_reader=None: f"github({repo}, {path}, {ref})"
|
1222
1230
|
)
|
1223
|
-
|
1231
|
+
# needed for jinja2 `is_safe_callable`
|
1232
|
+
mocks["lookup_github_file_content"].unsafe_callable = False
|
1233
|
+
mocks["lookup_github_file_content"].alters_data = False
|
1234
|
+
|
1235
|
+
# mock url_makes_sense
|
1236
|
+
mocks["url_makes_sense"].side_effect = lambda url: False
|
1237
|
+
# needed for jinja2 `is_safe_callable`
|
1238
|
+
mocks["url_makes_sense"].unsafe_callable = False
|
1239
|
+
mocks["url_makes_sense"].alters_data = False
|
1240
|
+
|
1241
|
+
# mock lookup_s3_object
|
1224
1242
|
mocks["lookup_s3_object"].side_effect = (
|
1225
1243
|
lambda account_name,
|
1226
1244
|
bucket_name,
|
1227
1245
|
path,
|
1228
1246
|
region_name=None: f"lookup_s3_object({account_name}, {bucket_name}, {path}, {region_name})"
|
1229
1247
|
)
|
1248
|
+
# needed for jinja2 `is_safe_callable`
|
1249
|
+
mocks["lookup_s3_object"].unsafe_callable = False
|
1250
|
+
mocks["lookup_s3_object"].alters_data = False
|
1251
|
+
|
1230
1252
|
with patch(
|
1231
1253
|
"reconcile.openshift_resources_base.check_alertmanager_config",
|
1232
1254
|
return_value=True,
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc859.dist-info → qontract_reconcile-0.10.1rc861.dist-info}/top_level.txt
RENAMED
File without changes
|