qontract-reconcile 0.10.1rc858__py3-none-any.whl → 0.10.1rc860__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.1rc858.dist-info → qontract_reconcile-0.10.1rc860.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc858.dist-info → qontract_reconcile-0.10.1rc860.dist-info}/RECORD +10 -10
- reconcile/gql_definitions/common/aws_vpc_requests.py +1 -0
- reconcile/gql_definitions/fragments/aws_vpc_request.py +1 -0
- reconcile/openshift_resources_base.py +21 -1
- reconcile/terraform_vpc_resources/integration.py +4 -8
- reconcile/utils/terrascript_aws_client.py +3 -0
- {qontract_reconcile-0.10.1rc858.dist-info → qontract_reconcile-0.10.1rc860.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc858.dist-info → qontract_reconcile-0.10.1rc860.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc858.dist-info → qontract_reconcile-0.10.1rc860.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc858.dist-info → qontract_reconcile-0.10.1rc860.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.1rc860
|
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.1rc858.dist-info → qontract_reconcile-0.10.1rc860.dist-info}/RECORD
RENAMED
@@ -71,7 +71,7 @@ reconcile/openshift_namespaces.py,sha256=nHW1e3dyUWw3JPAzeQeZQ6s2-RuQYaNR7_DUfTP
|
|
71
71
|
reconcile/openshift_network_policies.py,sha256=_qqv7yj17OM1J8KJPsFmzFZ85gzESJeBocC672z4_WU,4231
|
72
72
|
reconcile/openshift_resourcequotas.py,sha256=yUi56PiOn3inMMfq_x_FEHmaW-reGipzoorjdar372g,2415
|
73
73
|
reconcile/openshift_resources.py,sha256=WPnSTftrCCHaCDfwSD0CLvs-7GQqay5B7AtM6Swxy7c,1537
|
74
|
-
reconcile/openshift_resources_base.py,sha256=
|
74
|
+
reconcile/openshift_resources_base.py,sha256=1ItnO5hq31PnfvrLBxf30ln_keBZcRiLCKcHfmUhYrQ,40826
|
75
75
|
reconcile/openshift_rolebindings.py,sha256=LlImloBisEqzc36jaatic-TeM3hzqMEfxogF-dM4Yhw,6599
|
76
76
|
reconcile/openshift_routes.py,sha256=fXvuPSjcjVw1X3j2EQvUAdbOepmIFdKk-M3qP8QzPiw,1075
|
77
77
|
reconcile/openshift_saas_deploy.py,sha256=fmhopPEbyZsGQHRPzyzpKEvoBXEGN3aPxFi7Utq0emU,12788
|
@@ -238,7 +238,7 @@ reconcile/gql_definitions/common/app_interface_dms_settings.py,sha256=h-N7-XGpmH
|
|
238
238
|
reconcile/gql_definitions/common/app_interface_repo_settings.py,sha256=rud0rz9NIFF-h1fFdk3MnwGmx73rhwrn1taN_HefvyU,1754
|
239
239
|
reconcile/gql_definitions/common/app_interface_state_settings.py,sha256=VXIK0Hmyv6GTShI86IGkjxyHGwufqUBAh617XKUAKaI,2507
|
240
240
|
reconcile/gql_definitions/common/app_interface_vault_settings.py,sha256=w8quvdG0cSq71ZyJokPPp7MyMpoDb6-HLQ3o9JHVGRQ,1771
|
241
|
-
reconcile/gql_definitions/common/aws_vpc_requests.py,sha256=
|
241
|
+
reconcile/gql_definitions/common/aws_vpc_requests.py,sha256=7i9t4R2hoF9NQaFXUjTmMxXDTcDKrUNDen0mQA0bFgY,2278
|
242
242
|
reconcile/gql_definitions/common/aws_vpcs.py,sha256=Dss9dQ3xagnz3Ltg1e9mtG2PAmQGBbUzKCmmzvuN28s,1892
|
243
243
|
reconcile/gql_definitions/common/clusters.py,sha256=lIBA_wgwOTdcQgkFJ7EU23e9mlln-7WgstB_2psxZA4,21624
|
244
244
|
reconcile/gql_definitions/common/clusters_minimal.py,sha256=JYrJV_aStmryiiGKyiXhj47qpF_8KilCqy-d9CofBCo,4635
|
@@ -283,7 +283,7 @@ reconcile/gql_definitions/fragments/aws_account_managed.py,sha256=zXbux0Bb7QZ37f
|
|
283
283
|
reconcile/gql_definitions/fragments/aws_account_sso.py,sha256=ITR3PLz4Iq1SiWAoYGWPDuHJnAmTyZ0QQqs2Zsi8pxA,979
|
284
284
|
reconcile/gql_definitions/fragments/aws_infra_management_account.py,sha256=uAmALVRF2gBM3p_Dmez_ew6KVAtetamwOPkRIPZAlGc,1254
|
285
285
|
reconcile/gql_definitions/fragments/aws_vpc.py,sha256=T2egTwi2Rb0IRBBmsyag8xKpu_m6GbIAy80fhZNZwk8,1434
|
286
|
-
reconcile/gql_definitions/fragments/aws_vpc_request.py,sha256=
|
286
|
+
reconcile/gql_definitions/fragments/aws_vpc_request.py,sha256=HgFg6MGxKg_FwbWT6SV11hY2aMitO2ieLYb-NL2n2_Q,2102
|
287
287
|
reconcile/gql_definitions/fragments/aws_vpc_request_subnet.py,sha256=qaTFT8cGzEslw51nUeb45Nfnv6kFxUm4CWrRR3xfBvA,760
|
288
288
|
reconcile/gql_definitions/fragments/deplopy_resources.py,sha256=0u3xYqL5NpMf149BJLfPhHqAOWu06aLULdNk_2Mulxg,1089
|
289
289
|
reconcile/gql_definitions/fragments/disable.py,sha256=Ojw98OSxcovrtmw_aAyhaVHhIa1MSUbBfKX4i2IpI74,715
|
@@ -470,7 +470,7 @@ reconcile/terraform_init/integration.py,sha256=xcFKTc_or3xB3kE_I3OECNkkgbwALIwwd
|
|
470
470
|
reconcile/terraform_init/merge_request.py,sha256=3CYtgSd7Q9zjKg4wsDz437EPCRfGeZZ8fZ0Y-ChKXJY,1475
|
471
471
|
reconcile/terraform_init/merge_request_manager.py,sha256=fMcT6hbdEF3nFATJpvr8BedvQHq_MzFkgVJSloBNwOQ,3101
|
472
472
|
reconcile/terraform_vpc_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
473
|
-
reconcile/terraform_vpc_resources/integration.py,sha256=
|
473
|
+
reconcile/terraform_vpc_resources/integration.py,sha256=bqEq3qHaUVQkbGt100Fa7ZwNvo1Fu77QHOFTeW8YbTQ,7784
|
474
474
|
reconcile/terraform_vpc_resources/merge_request.py,sha256=loRymUigCIvaaT0s_NzktZchh-DGRQnCICdBSCAcFPY,1503
|
475
475
|
reconcile/terraform_vpc_resources/merge_request_manager.py,sha256=Vj2nuQbQyrL4q_il1My-bLxYNh_r3YXqX45P8fwtP6Q,3259
|
476
476
|
reconcile/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -700,7 +700,7 @@ reconcile/utils/state.py,sha256=DRxzuOw3Iha-b2esBMjZTZ5K-OxfrGbkyEvpTT5xHTs,1636
|
|
700
700
|
reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
|
701
701
|
reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
|
702
702
|
reconcile/utils/terraform_client.py,sha256=mZEKpu6nbfiQd60wRkc8-5sljBTUTOgaAKnF89itMzU,32085
|
703
|
-
reconcile/utils/terrascript_aws_client.py,sha256=
|
703
|
+
reconcile/utils/terrascript_aws_client.py,sha256=msKley24-PiYt3lsPUNzKh2tpMj4MpGjF7lXFr0sBM0,276187
|
704
704
|
reconcile/utils/three_way_diff_strategy.py,sha256=Jo0M42zvG_K6ygJOSAZZTAPxF2Fkr247O1YsmDbi0TA,4641
|
705
705
|
reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
|
706
706
|
reconcile/utils/vault.py,sha256=AYGG5aDJ7CSVhTFdZowfEg3iSQWenoAt676aGjHQMX8,14978
|
@@ -834,8 +834,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
834
834
|
tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
|
835
835
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
836
836
|
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.
|
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,,
|
@@ -50,6 +50,7 @@ class VPCRequestSubnetsListsV1(ConfiguredBaseModel):
|
|
50
50
|
|
51
51
|
class VPCRequest(ConfiguredBaseModel):
|
52
52
|
identifier: str = Field(..., alias="identifier")
|
53
|
+
delete: Optional[bool] = Field(..., alias="delete")
|
53
54
|
account: AWSAccountV1 = Field(..., alias="account")
|
54
55
|
region: str = Field(..., alias="region")
|
55
56
|
cidr_block: NetworkV1 = Field(..., alias="cidr_block")
|
@@ -1203,6 +1203,7 @@ def early_exit_monkey_patch() -> Generator:
|
|
1203
1203
|
url_makes_sense=DEFAULT,
|
1204
1204
|
lookup_s3_object=DEFAULT,
|
1205
1205
|
) as mocks:
|
1206
|
+
# mock lookup_secret
|
1206
1207
|
mocks["lookup_secret"].side_effect = (
|
1207
1208
|
lambda path,
|
1208
1209
|
key,
|
@@ -1212,6 +1213,11 @@ def early_exit_monkey_patch() -> Generator:
|
|
1212
1213
|
settings=None,
|
1213
1214
|
secret_reader=None: f"vault({path}, {key}, {version}"
|
1214
1215
|
)
|
1216
|
+
# needed for jinja2 `is_safe_callable`
|
1217
|
+
mocks["lookup_secret"].unsafe_callable = False
|
1218
|
+
mocks["lookup_secret"].alters_data = False
|
1219
|
+
|
1220
|
+
# mock lookup_github_file_content
|
1215
1221
|
mocks["lookup_github_file_content"].side_effect = (
|
1216
1222
|
lambda repo,
|
1217
1223
|
path,
|
@@ -1220,13 +1226,27 @@ def early_exit_monkey_patch() -> Generator:
|
|
1220
1226
|
settings=None,
|
1221
1227
|
secret_reader=None: f"github({repo}, {path}, {ref})"
|
1222
1228
|
)
|
1223
|
-
|
1229
|
+
# needed for jinja2 `is_safe_callable`
|
1230
|
+
mocks["lookup_github_file_content"].unsafe_callable = False
|
1231
|
+
mocks["lookup_github_file_content"].alters_data = False
|
1232
|
+
|
1233
|
+
# mock url_makes_sense
|
1234
|
+
mocks["url_makes_sense"].side_effect = lambda url: False
|
1235
|
+
# needed for jinja2 `is_safe_callable`
|
1236
|
+
mocks["url_makes_sense"].unsafe_callable = False
|
1237
|
+
mocks["url_makes_sense"].alters_data = False
|
1238
|
+
|
1239
|
+
# mock lookup_s3_object
|
1224
1240
|
mocks["lookup_s3_object"].side_effect = (
|
1225
1241
|
lambda account_name,
|
1226
1242
|
bucket_name,
|
1227
1243
|
path,
|
1228
1244
|
region_name=None: f"lookup_s3_object({account_name}, {bucket_name}, {path}, {region_name})"
|
1229
1245
|
)
|
1246
|
+
# needed for jinja2 `is_safe_callable`
|
1247
|
+
mocks["lookup_s3_object"].unsafe_callable = False
|
1248
|
+
mocks["lookup_s3_object"].alters_data = False
|
1249
|
+
|
1230
1250
|
with patch(
|
1231
1251
|
"reconcile.openshift_resources_base.check_alertmanager_config",
|
1232
1252
|
return_value=True,
|
@@ -47,10 +47,6 @@ class TerraformVpcResourcesParams(PydanticRunParams):
|
|
47
47
|
enable_deletion: bool = False
|
48
48
|
|
49
49
|
|
50
|
-
class NoManagedVPCForAccount(Exception):
|
51
|
-
pass
|
52
|
-
|
53
|
-
|
54
50
|
class TerraformVpcResources(QontractReconcileIntegration[TerraformVpcResourcesParams]):
|
55
51
|
@property
|
56
52
|
def name(self) -> str:
|
@@ -129,11 +125,11 @@ class TerraformVpcResources(QontractReconcileIntegration[TerraformVpcResourcesPa
|
|
129
125
|
if data:
|
130
126
|
accounts = self._filter_accounts(data, account_name)
|
131
127
|
if account_name and not accounts:
|
132
|
-
|
133
|
-
logging.
|
134
|
-
|
128
|
+
msg = f"The account {account_name} doesn't have any managed vpc. Verify your input"
|
129
|
+
logging.debug(msg)
|
130
|
+
sys.exit(ExitCodes.SUCCESS)
|
135
131
|
else:
|
136
|
-
logging.
|
132
|
+
logging.debug("No VPC requests found, nothing to do.")
|
137
133
|
sys.exit(ExitCodes.SUCCESS)
|
138
134
|
|
139
135
|
accounts_untyped: list[dict] = [acc.dict(by_alias=True) for acc in accounts]
|
@@ -1189,6 +1189,9 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
1189
1189
|
self, vpc_requests: Iterable[VPCRequest], aws_provider_version: str
|
1190
1190
|
) -> None:
|
1191
1191
|
for request in vpc_requests:
|
1192
|
+
# skiping deleted requests
|
1193
|
+
if request.delete:
|
1194
|
+
continue
|
1192
1195
|
# The default values here come from infra repo's module configuration
|
1193
1196
|
values = {
|
1194
1197
|
"source": "terraform-aws-modules/vpc/aws",
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc858.dist-info → qontract_reconcile-0.10.1rc860.dist-info}/top_level.txt
RENAMED
File without changes
|