qontract-reconcile 0.10.1rc452__py3-none-any.whl → 0.10.1rc454__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.1rc452.dist-info → qontract_reconcile-0.10.1rc454.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc452.dist-info → qontract_reconcile-0.10.1rc454.dist-info}/RECORD +11 -11
- reconcile/ocm/types.py +1 -0
- reconcile/ocm_clusters.py +13 -0
- reconcile/queries.py +1 -0
- reconcile/test/test_ocm_clusters.py +19 -0
- reconcile/test/test_terraform_vpc_peerings.py +5 -5
- reconcile/utils/ocm/ocm.py +5 -0
- {qontract_reconcile-0.10.1rc452.dist-info → qontract_reconcile-0.10.1rc454.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc452.dist-info → qontract_reconcile-0.10.1rc454.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc452.dist-info → qontract_reconcile-0.10.1rc454.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc452.dist-info → qontract_reconcile-0.10.1rc454.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.1rc454
|
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.1rc452.dist-info → qontract_reconcile-0.10.1rc454.dist-info}/RECORD
RENAMED
@@ -52,7 +52,7 @@ reconcile/ocm_additional_routers.py,sha256=KfcFDVbNoc6n5dHWjYdAf1_DiVqVG6Tw23WLK
|
|
52
52
|
reconcile/ocm_addons.py,sha256=qqAyqRBRbdZQvAcjb-QlSVyRAyQBZk6iVlgnI4jyi7s,3353
|
53
53
|
reconcile/ocm_addons_upgrade_tests_trigger.py,sha256=L1ktYynIR7pmHiYtdCTdLGJRKX72B54KUAuPLOccXzo,3995
|
54
54
|
reconcile/ocm_aws_infrastructure_access.py,sha256=iq6Rj5SgF7yIMvBhukTuy-KcrFsvLs1ATG6-dyiArqY,6960
|
55
|
-
reconcile/ocm_clusters.py,sha256=
|
55
|
+
reconcile/ocm_clusters.py,sha256=Bw6F5GBQmdwWacXgZ2OzN1v7Mu4TRQ4k7ToZ02hnvoQ,13900
|
56
56
|
reconcile/ocm_external_configuration_labels.py,sha256=imEpDv1RBpCSj8tHDv0R76hmNCFtcUzVNgS1yOVl8vs,3870
|
57
57
|
reconcile/ocm_github_idp.py,sha256=IlSpoUlUhYOahqWee6azJiN-N5EZNxNAWh-lrPXTfEc,3946
|
58
58
|
reconcile/ocm_groups.py,sha256=_kiMUndKc6as6cbbvXxVnq8V_Lj7X5lxMJVCuRWuUFE,2888
|
@@ -90,7 +90,7 @@ reconcile/quay_mirror.py,sha256=Ru9_KKODCqUea85QDxdDpiONqr6T2CCw_btxRiKuQ1U,1411
|
|
90
90
|
reconcile/quay_mirror_org.py,sha256=8PV_LDSPqvFyOAguxe4bk4yrszNwAk2jd9cwKeluluE,10319
|
91
91
|
reconcile/quay_permissions.py,sha256=9KOutS1w4RFQqkvMSy54VtsKNx56-phzP6yI_rEW-B8,4244
|
92
92
|
reconcile/quay_repos.py,sha256=cuEYG0HUe0ut5yvLdEwOF5-CmccpXQHRb_wDazvDrvQ,6895
|
93
|
-
reconcile/queries.py,sha256=
|
93
|
+
reconcile/queries.py,sha256=fQ7PII4j8zzXwGeTQzCKRG05-Wk9H7oQyhtSeISEyU0,49190
|
94
94
|
reconcile/query_validator.py,sha256=BAjGrU8_VhzTOv5k0-uz0hY9ziZyconv8VAhgre1Auc,1497
|
95
95
|
reconcile/requests_sender.py,sha256=914iluuF4UVgG3VyxxtnHOu4yf6YKS2fIy6PViSsFTQ,3875
|
96
96
|
reconcile/resource_scraper.py,sha256=vo1N9vLJCYWvXlTwFRIpEuWjx_39ZV9zxJlpoPq4g3U,2330
|
@@ -311,7 +311,7 @@ reconcile/jenkins/types.py,sha256=0UlyJxv3KY1WXHkfI_ghUI6FAwRJTL4EwvLg-62tNcg,30
|
|
311
311
|
reconcile/ldap_groups/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
312
312
|
reconcile/ldap_groups/integration.py,sha256=II5f1yt6TypG4upmzHO1jcVrn8DcYsi9cj2l4fHolmc,7734
|
313
313
|
reconcile/ocm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
314
|
-
reconcile/ocm/types.py,sha256=
|
314
|
+
reconcile/ocm/types.py,sha256=Q9vPQI3LpLajGtPqks7i36AV6CjRho96mmsTkdJrEWM,2477
|
315
315
|
reconcile/ocm_labels/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
316
316
|
reconcile/ocm_labels/integration.py,sha256=SqIgCYhlHEeoH2YXJ8kWIxCo9S3fzzAlZGxt9KCnJ1s,14792
|
317
317
|
reconcile/ocm_labels/label_sources.py,sha256=z5Rg5uMTfRkTi3QbEQK1P82LLciWrSnp65XBEpZf2-o,1877
|
@@ -390,7 +390,7 @@ reconcile/test/test_jump_host.py,sha256=ZrsdafquKYXFyGSZFH86aVtF-BsLnYdW1FGH3l5Q
|
|
390
390
|
reconcile/test/test_ldap_users.py,sha256=8jjzVgoiRRylGad6-TvkugoFGXt3eko--zVVKjmZDn4,3812
|
391
391
|
reconcile/test/test_make.py,sha256=zTdjgq-3idFlec_0qJenk9wWw0QMLvSpJfPsptXmync,677
|
392
392
|
reconcile/test/test_ocm_additional_routers.py,sha256=dtbpUnD5un6Q3VoLbuFRb_njmt5SSCnBzvSSBcO_Xxs,4248
|
393
|
-
reconcile/test/test_ocm_clusters.py,sha256=
|
393
|
+
reconcile/test/test_ocm_clusters.py,sha256=NOxhJnlgOlRZF0-sfXCiRP0aiNiBiMl35MTCCh_Ff5s,23130
|
394
394
|
reconcile/test/test_ocm_clusters_manifest_updates.py,sha256=jFRVfc5jby1kI2x_gT6wcqPPgkav1et9wZH6JqQbNSY,3278
|
395
395
|
reconcile/test/test_ocm_machine_pools.py,sha256=3qo6t2Jfr1Wee0NUacyLTDmatp0o7CUNpkVOpHiOiGk,29737
|
396
396
|
reconcile/test/test_ocm_update_recommended_version.py,sha256=iA4BVirTGVXlwcOyeR52IuNO81X_8NR6ZNd7ZFE7igs,4328
|
@@ -427,7 +427,7 @@ reconcile/test/test_terraform_repo.py,sha256=e9mxguROC8xG-zXQojwW-agbfsuBXjYc1wy
|
|
427
427
|
reconcile/test/test_terraform_resources.py,sha256=1ny_QSFuRjV9jxZY8EeT4NVJ5dMv7cLrEEIx_cBpjgk,9075
|
428
428
|
reconcile/test/test_terraform_tgw_attachments.py,sha256=DLZ4OhqJanUvcLMXTzf3NLpZBPDr0qUre-Xx2pP-l2E,35287
|
429
429
|
reconcile/test/test_terraform_users.py,sha256=Xn4y6EcxnNQb6XcPoOhz_Ikxmh9Nrsu88OM1scN9hzY,5434
|
430
|
-
reconcile/test/test_terraform_vpc_peerings.py,sha256=
|
430
|
+
reconcile/test/test_terraform_vpc_peerings.py,sha256=YBab2Y9oJhnk2DO0hMueMYUew77md5OwyNqNYWrewB0,19639
|
431
431
|
reconcile/test/test_terraform_vpc_peerings_build_desired_state.py,sha256=vAWmvFqlCe-usEYueYjFFNq2bsDdxILmLwIdGvA2VE4,37002
|
432
432
|
reconcile/test/test_three_way_diff_strategy.py,sha256=2fjEqE2w4pIzKq18PRcADTSe01aGwsZfMGloU8xfNaE,3346
|
433
433
|
reconcile/test/test_unleash.py,sha256=c1s_FRAZrAzzd3FbZrzHYjJzHELhoxPHBZnEzqsfMQg,6416
|
@@ -600,7 +600,7 @@ reconcile/utils/ocm/cluster_groups.py,sha256=F8oqVqN_4QUnGL0K61zZhoYIzJeP57EcmZp
|
|
600
600
|
reconcile/utils/ocm/clusters.py,sha256=Q6g5kGSNfxZUZ56LPFAYjOz8xJ2c6QG76V78GvyLxB0,7448
|
601
601
|
reconcile/utils/ocm/identity_providers.py,sha256=dKed09N8iWmn39tI_MpwgVe47x23eLsknGbjMUxtwr4,2175
|
602
602
|
reconcile/utils/ocm/labels.py,sha256=pRzTE506hKAgVbBNO51IBlGOuCbJmTYDMsL0pWBEwp8,5945
|
603
|
-
reconcile/utils/ocm/ocm.py,sha256=
|
603
|
+
reconcile/utils/ocm/ocm.py,sha256=drUa6n57YMc4JIrnJOOr3dp4YBFUw0wjVJ8u8mT2Iks,57904
|
604
604
|
reconcile/utils/ocm/search_filters.py,sha256=zExZpYBh7_tucG-xKoPHUxz1b_6l9qwbEMpMihQg7nA,15043
|
605
605
|
reconcile/utils/ocm/service_log.py,sha256=XmGOP6hwhKwMEMeD0GhErTGzdgk1IHaKs-QatL1mAdY,2052
|
606
606
|
reconcile/utils/ocm/sre_capability_labels.py,sha256=-TUmTzvK5yu7qY8SUMGj6-684wa8ZVYbjrJ6X3M7z-o,1576
|
@@ -646,8 +646,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
646
646
|
tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
|
647
647
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
648
648
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
649
|
-
qontract_reconcile-0.10.
|
650
|
-
qontract_reconcile-0.10.
|
651
|
-
qontract_reconcile-0.10.
|
652
|
-
qontract_reconcile-0.10.
|
653
|
-
qontract_reconcile-0.10.
|
649
|
+
qontract_reconcile-0.10.1rc454.dist-info/METADATA,sha256=ItStqIoJC2xrXjkt-YcNnXzj0-_eRxT4Yy1Hml6t_HY,2348
|
650
|
+
qontract_reconcile-0.10.1rc454.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
651
|
+
qontract_reconcile-0.10.1rc454.dist-info/entry_points.txt,sha256=rTjAv28I_CHLM8ID3OPqMI_suoQ9s7tFbim4aYjn9kk,376
|
652
|
+
qontract_reconcile-0.10.1rc454.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
653
|
+
qontract_reconcile-0.10.1rc454.dist-info/RECORD,,
|
reconcile/ocm/types.py
CHANGED
reconcile/ocm_clusters.py
CHANGED
@@ -15,6 +15,7 @@ from reconcile import (
|
|
15
15
|
from reconcile.ocm.types import (
|
16
16
|
OCMSpec,
|
17
17
|
ROSAClusterAWSAccount,
|
18
|
+
ROSAClusterSpec,
|
18
19
|
ROSAOcmAwsAttrs,
|
19
20
|
ROSAOcmAwsStsAttrs,
|
20
21
|
)
|
@@ -174,6 +175,18 @@ def get_app_interface_spec_updates(
|
|
174
175
|
ocmmod.SPEC_ATTR_PROVISION_SHARD_ID
|
175
176
|
] = current_spec.spec.provision_shard_id
|
176
177
|
|
178
|
+
if isinstance(current_spec.spec, ROSAClusterSpec) and isinstance(
|
179
|
+
desired_spec.spec, ROSAClusterSpec
|
180
|
+
):
|
181
|
+
if (
|
182
|
+
current_spec.spec.oidc_endpoint_url
|
183
|
+
and desired_spec.spec.oidc_endpoint_url
|
184
|
+
!= current_spec.spec.oidc_endpoint_url
|
185
|
+
):
|
186
|
+
ocm_spec_updates[
|
187
|
+
ocmmod.SPEC_ATTR_OIDC_ENDPONT_URL
|
188
|
+
] = current_spec.spec.oidc_endpoint_url
|
189
|
+
|
177
190
|
if current_spec.server_url and desired_spec.server_url != current_spec.server_url:
|
178
191
|
root_updates[ocmmod.SPEC_ATTR_SERVER_URL] = current_spec.server_url
|
179
192
|
|
reconcile/queries.py
CHANGED
@@ -602,6 +602,25 @@ def test_ocm_rosa_update_cluster(
|
|
602
602
|
assert cluster_updates_mr_mock.call_count == 0
|
603
603
|
|
604
604
|
|
605
|
+
def test_ocm_rosa_update_cluster_dont_update_ocm_on_oidc_drift(
|
606
|
+
get_json_mock,
|
607
|
+
queries_mock,
|
608
|
+
ocm_mock,
|
609
|
+
cluster_updates_mr_mock,
|
610
|
+
ocm_rosa_cluster_raw_spec,
|
611
|
+
ocm_rosa_cluster_ai_spec,
|
612
|
+
):
|
613
|
+
ocm_rosa_cluster_ai_spec["spec"]["oidc_endpoint_url"] = "some-other-oidc-url"
|
614
|
+
get_json_mock.return_value = {"items": [ocm_rosa_cluster_raw_spec]}
|
615
|
+
queries_mock[1].return_value = [ocm_rosa_cluster_ai_spec]
|
616
|
+
with pytest.raises(SystemExit):
|
617
|
+
occ.run(dry_run=False)
|
618
|
+
_post, _patch = ocm_mock
|
619
|
+
assert _post.call_count == 0
|
620
|
+
assert _patch.call_count == 0
|
621
|
+
assert cluster_updates_mr_mock.call_count == 1
|
622
|
+
|
623
|
+
|
605
624
|
def test_ocm_rosa_update_cluster_with_machine_pools_change(
|
606
625
|
get_json_mock,
|
607
626
|
queries_mock,
|
@@ -189,7 +189,7 @@ def test_c2c_vpc_peering_assume_role_accepter_connection_acc_overwrite(mocker):
|
|
189
189
|
requester_cluster,
|
190
190
|
accepter_connection,
|
191
191
|
accepter_cluster,
|
192
|
-
ocm,
|
192
|
+
ocm,
|
193
193
|
)
|
194
194
|
|
195
195
|
expected_req_aws = {
|
@@ -240,7 +240,7 @@ def test_c2c_vpc_peering_assume_role_acc_overwrite_fail(mocker):
|
|
240
240
|
requester_cluster,
|
241
241
|
accepter_connection,
|
242
242
|
accepter_cluster,
|
243
|
-
ocm,
|
243
|
+
ocm,
|
244
244
|
)
|
245
245
|
assert str(ex.value).startswith("[account_not_allowed]")
|
246
246
|
|
@@ -269,7 +269,7 @@ def test_c2c_vpc_peering_assume_role_accepter_cluster_account(mocker):
|
|
269
269
|
requester_cluster,
|
270
270
|
accepter_connection,
|
271
271
|
accepter_cluster,
|
272
|
-
ocm,
|
272
|
+
ocm,
|
273
273
|
)
|
274
274
|
|
275
275
|
expected_req_aws = {
|
@@ -313,7 +313,7 @@ def test_c2c_vpc_peering_missing_ocm_assume_role(mocker):
|
|
313
313
|
requester_cluster,
|
314
314
|
accepter_connection,
|
315
315
|
accepter_cluster,
|
316
|
-
ocm,
|
316
|
+
ocm,
|
317
317
|
)
|
318
318
|
assert str(ex.value).startswith("[assume_role_not_found]")
|
319
319
|
|
@@ -335,7 +335,7 @@ def test_c2c_vpc_peering_missing_account(mocker):
|
|
335
335
|
requester_cluster,
|
336
336
|
accepter_connection,
|
337
337
|
accepter_cluster,
|
338
|
-
ocm,
|
338
|
+
ocm,
|
339
339
|
)
|
340
340
|
assert str(ex.value).startswith("[no_account_available]")
|
341
341
|
|
reconcile/utils/ocm/ocm.py
CHANGED
@@ -85,6 +85,7 @@ SPEC_ATTR_LOAD_BALANCERS = "load_balancers"
|
|
85
85
|
SPEC_ATTR_STORAGE = "storage"
|
86
86
|
SPEC_ATTR_ID = "id"
|
87
87
|
SPEC_ATTR_EXTERNAL_ID = "external_id"
|
88
|
+
SPEC_ATTR_OIDC_ENDPONT_URL = "oidc_endpoint_url"
|
88
89
|
SPEC_ATTR_PROVISION_SHARD_ID = "provision_shard_id"
|
89
90
|
SPEC_ATTR_VERSION = "version"
|
90
91
|
SPEC_ATTR_INITIAL_VERSION = "initial_version"
|
@@ -341,6 +342,7 @@ class OCMProductRosa(OCMProduct):
|
|
341
342
|
SPEC_ATTR_HYPERSHIFT,
|
342
343
|
SPEC_ATTR_SUBNET_IDS,
|
343
344
|
SPEC_ATTR_AVAILABILITY_ZONES,
|
345
|
+
SPEC_ATTR_OIDC_ENDPONT_URL,
|
344
346
|
}
|
345
347
|
|
346
348
|
@staticmethod
|
@@ -380,6 +382,7 @@ class OCMProductRosa(OCMProduct):
|
|
380
382
|
provision_shard_id = None
|
381
383
|
|
382
384
|
sts = None
|
385
|
+
oidc_endpoint_url = None
|
383
386
|
if cluster["aws"].get("sts", None):
|
384
387
|
sts = ROSAOcmAwsStsAttrs(
|
385
388
|
installer_role_arn=cluster["aws"]["sts"]["role_arn"],
|
@@ -391,6 +394,7 @@ class OCMProductRosa(OCMProduct):
|
|
391
394
|
"worker_role_arn"
|
392
395
|
],
|
393
396
|
)
|
397
|
+
oidc_endpoint_url = cluster["aws"]["sts"]["oidc_endpoint_url"]
|
394
398
|
account = ROSAClusterAWSAccount(
|
395
399
|
uid=cluster["properties"]["rosa_creator_arn"].split(":")[4],
|
396
400
|
rosa=ROSAOcmAwsAttrs(
|
@@ -417,6 +421,7 @@ class OCMProductRosa(OCMProduct):
|
|
417
421
|
hypershift=cluster["hypershift"]["enabled"],
|
418
422
|
subnet_ids=cluster["aws"].get("subnet_ids"),
|
419
423
|
availability_zones=cluster["nodes"].get("availability_zones"),
|
424
|
+
oidc_endpoint_url=oidc_endpoint_url,
|
420
425
|
)
|
421
426
|
|
422
427
|
machine_pools = [
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc452.dist-info → qontract_reconcile-0.10.1rc454.dist-info}/top_level.txt
RENAMED
File without changes
|