qontract-reconcile 0.10.2.dev309__py3-none-any.whl → 0.10.2.dev311__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.2.dev309.dist-info → qontract_reconcile-0.10.2.dev311.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev309.dist-info → qontract_reconcile-0.10.2.dev311.dist-info}/RECORD +9 -9
- reconcile/gql_definitions/common/aws_vpc_requests.py +4 -1
- reconcile/gql_definitions/fragments/aws_vpc_request.py +3 -0
- reconcile/gql_definitions/introspection.json +36 -12
- reconcile/terraform_vpc_resources/integration.py +19 -1
- reconcile/utils/terrascript_aws_client.py +35 -24
- {qontract_reconcile-0.10.2.dev309.dist-info → qontract_reconcile-0.10.2.dev311.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev309.dist-info → qontract_reconcile-0.10.2.dev311.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev309.dist-info → qontract_reconcile-0.10.2.dev311.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.2.
|
3
|
+
Version: 0.10.2.dev311
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
|
6
6
|
Project-URL: repository, https://github.com/app-sre/qontract-reconcile
|
{qontract_reconcile-0.10.2.dev309.dist-info → qontract_reconcile-0.10.2.dev311.dist-info}/RECORD
RENAMED
@@ -213,7 +213,7 @@ reconcile/glitchtip_project_alerts/integration.py,sha256=d3PMy-mQSbSZdIGAVaZCA2U
|
|
213
213
|
reconcile/glitchtip_project_dsn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
214
214
|
reconcile/glitchtip_project_dsn/integration.py,sha256=3GgcqUM6hWhLpo9Yx5Xr9vrdexF-WNevVCNL9bJ0Upc,8162
|
215
215
|
reconcile/gql_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
216
|
-
reconcile/gql_definitions/introspection.json,sha256=
|
216
|
+
reconcile/gql_definitions/introspection.json,sha256=iXV6SKgNQpvwFvnRTqJsXVPN70Pv4pFTrbNQ-nADp6Y,2359857
|
217
217
|
reconcile/gql_definitions/acs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
218
218
|
reconcile/gql_definitions/acs/acs_instances.py,sha256=L91WW9LbhJbBSrECqShQpFtjoBOsmNIYLRpMbx1io5o,2181
|
219
219
|
reconcile/gql_definitions/acs/acs_policies.py,sha256=Ygpfl2-VkYLSlJvHgp_dJBfb66K_Rwfdfpsa18w1v1s,4338
|
@@ -258,7 +258,7 @@ reconcile/gql_definitions/common/app_interface_state_settings.py,sha256=VXIK0Hmy
|
|
258
258
|
reconcile/gql_definitions/common/app_interface_vault_settings.py,sha256=w8quvdG0cSq71ZyJokPPp7MyMpoDb6-HLQ3o9JHVGRQ,1771
|
259
259
|
reconcile/gql_definitions/common/app_quay_repos_escalation_policies.py,sha256=ckdoGse7O5uAWdZdNinkWicA2EflUb5pe8jWEBtflE8,3236
|
260
260
|
reconcile/gql_definitions/common/apps.py,sha256=lC7uZjyHAvJXhCDPJJ-dQJInBJkUCNZoe129XMa67wo,1868
|
261
|
-
reconcile/gql_definitions/common/aws_vpc_requests.py,sha256=
|
261
|
+
reconcile/gql_definitions/common/aws_vpc_requests.py,sha256=_KhmxOfUhSWdUMGxFzrwlIq5mZHzNqvDBZv5Hgku8mU,2423
|
262
262
|
reconcile/gql_definitions/common/aws_vpcs.py,sha256=Dss9dQ3xagnz3Ltg1e9mtG2PAmQGBbUzKCmmzvuN28s,1892
|
263
263
|
reconcile/gql_definitions/common/clusters.py,sha256=j646LA-vlHbA131OrCF13g8rPPrBPWL3PLrvqWLZs58,21979
|
264
264
|
reconcile/gql_definitions/common/clusters_minimal.py,sha256=JYrJV_aStmryiiGKyiXhj47qpF_8KilCqy-d9CofBCo,4635
|
@@ -318,7 +318,7 @@ reconcile/gql_definitions/fragments/aws_account_managed.py,sha256=V_9pH0wVza2sPy
|
|
318
318
|
reconcile/gql_definitions/fragments/aws_account_sso.py,sha256=ITR3PLz4Iq1SiWAoYGWPDuHJnAmTyZ0QQqs2Zsi8pxA,979
|
319
319
|
reconcile/gql_definitions/fragments/aws_infra_management_account.py,sha256=uAmALVRF2gBM3p_Dmez_ew6KVAtetamwOPkRIPZAlGc,1254
|
320
320
|
reconcile/gql_definitions/fragments/aws_vpc.py,sha256=T2egTwi2Rb0IRBBmsyag8xKpu_m6GbIAy80fhZNZwk8,1434
|
321
|
-
reconcile/gql_definitions/fragments/aws_vpc_request.py,sha256=
|
321
|
+
reconcile/gql_definitions/fragments/aws_vpc_request.py,sha256=RJRNicxHzwrIqPUSjDvtIt9JGu9lov4n3xOVRx8AlVY,2682
|
322
322
|
reconcile/gql_definitions/fragments/aws_vpc_request_subnet.py,sha256=qaTFT8cGzEslw51nUeb45Nfnv6kFxUm4CWrRR3xfBvA,760
|
323
323
|
reconcile/gql_definitions/fragments/container_image_mirror.py,sha256=qyfQlnKUCzFEPgUJ9VGmDYFmiGHR7VZ_YJNd4KeoolM,968
|
324
324
|
reconcile/gql_definitions/fragments/deploy_resources.py,sha256=0u3xYqL5NpMf149BJLfPhHqAOWu06aLULdNk_2Mulxg,1089
|
@@ -518,7 +518,7 @@ reconcile/terraform_init/integration.py,sha256=pPi4YAjbEE8vDaaRizGf-d-PewqqSJmjc
|
|
518
518
|
reconcile/terraform_init/merge_request.py,sha256=3CYtgSd7Q9zjKg4wsDz437EPCRfGeZZ8fZ0Y-ChKXJY,1475
|
519
519
|
reconcile/terraform_init/merge_request_manager.py,sha256=TQmtHq4DH-xgyYvuRyGu7VEgjPU2Yjj-uexIy-L7i88,3098
|
520
520
|
reconcile/terraform_vpc_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
521
|
-
reconcile/terraform_vpc_resources/integration.py,sha256=
|
521
|
+
reconcile/terraform_vpc_resources/integration.py,sha256=Gn98Gt1YqghnkxX2Bs6Q4GAT2H8KhRJsLFf-NnALs8o,8995
|
522
522
|
reconcile/terraform_vpc_resources/merge_request.py,sha256=loRymUigCIvaaT0s_NzktZchh-DGRQnCICdBSCAcFPY,1503
|
523
523
|
reconcile/terraform_vpc_resources/merge_request_manager.py,sha256=6jfwgbqXEFQlgLM6zmModpOkQX8wqddpoE0pZJL1Acc,3256
|
524
524
|
reconcile/typed_queries/__init__.py,sha256=rRk4CyslLsBr4vAh1pIPgt6s3P4R1M9NSEPLnyQgBpk,61
|
@@ -658,7 +658,7 @@ reconcile/utils/sqs_gateway.py,sha256=XNIf3PY4UCPNufP2Ul0UJj3fKlt5larBba-VTT-41F
|
|
658
658
|
reconcile/utils/state.py,sha256=vCHYIfrWLfPyIWEHSaADWlc4OqhwcOiqM3Egqvw-lfo,16372
|
659
659
|
reconcile/utils/structs.py,sha256=P57POzpEntu8ZoZDnsOdni9qUuBDWknmw0iinznxXoY,386
|
660
660
|
reconcile/utils/terraform_client.py,sha256=VP5Bd9Eto-To45TV08SmhhXTB3j-i2Ld3Nnvh2tkcjw,37393
|
661
|
-
reconcile/utils/terrascript_aws_client.py,sha256=
|
661
|
+
reconcile/utils/terrascript_aws_client.py,sha256=KxraVMhv_RcolHthAxucQeb3x0zFD2CCk3gVMjQ_ero,302090
|
662
662
|
reconcile/utils/three_way_diff_strategy.py,sha256=oQcHXd9LVhirJfoaOBoHUYuZVGfyL2voKr6KVI34zZE,4833
|
663
663
|
reconcile/utils/throughput.py,sha256=KNDCVsCLSp89V4pO3sEUd7bJUuh6gNfsxsc_18rEv_Y,357
|
664
664
|
reconcile/utils/vault.py,sha256=6V15LByFghp-U3k0N4lum6V7qt2EAlRfcAxjy5e-FAU,15146
|
@@ -796,7 +796,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
796
796
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=uQv2QJAmUXP1g2GPIH30WTlvL9soY6m9lefpZEVDM5w,3965
|
797
797
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
798
798
|
tools/sre_checkpoints/util.py,sha256=KcYVfa3UmJHVP_ocgrKe8NkrO5IDB9aWEDydSokPcRk,975
|
799
|
-
qontract_reconcile-0.10.2.
|
800
|
-
qontract_reconcile-0.10.2.
|
801
|
-
qontract_reconcile-0.10.2.
|
802
|
-
qontract_reconcile-0.10.2.
|
799
|
+
qontract_reconcile-0.10.2.dev311.dist-info/METADATA,sha256=bbWjHaGf7oxXQzuibAvxZGmAYZWXdFjO11qBSsPhHlE,24916
|
800
|
+
qontract_reconcile-0.10.2.dev311.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
801
|
+
qontract_reconcile-0.10.2.dev311.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
802
|
+
qontract_reconcile-0.10.2.dev311.dist-info/RECORD,,
|
@@ -54,6 +54,8 @@ class VPCRequestSubnetsListsV1(ConfiguredBaseModel):
|
|
54
54
|
private: Optional[list[str]] = Field(..., alias="private")
|
55
55
|
public: Optional[list[str]] = Field(..., alias="public")
|
56
56
|
availability_zones: Optional[list[str]] = Field(..., alias="availability_zones")
|
57
|
+
private_subnet_tags: Optional[Json] = Field(..., alias="private_subnet_tags")
|
58
|
+
public_subnet_tags: Optional[Json] = Field(..., alias="public_subnet_tags")
|
57
59
|
|
58
60
|
|
59
61
|
class VPCRequest(ConfiguredBaseModel):
|
@@ -62,4 +64,5 @@ class VPCRequest(ConfiguredBaseModel):
|
|
62
64
|
account: AWSAccountV1 = Field(..., alias="account")
|
63
65
|
region: str = Field(..., alias="region")
|
64
66
|
cidr_block: NetworkV1 = Field(..., alias="cidr_block")
|
67
|
+
vpc_tags: Optional[Json] = Field(..., alias="vpc_tags")
|
65
68
|
subnets: Optional[VPCRequestSubnetsListsV1] = Field(..., alias="subnets")
|
@@ -10948,18 +10948,6 @@
|
|
10948
10948
|
"isDeprecated": false,
|
10949
10949
|
"deprecationReason": null
|
10950
10950
|
},
|
10951
|
-
{
|
10952
|
-
"name": "slack_username",
|
10953
|
-
"description": null,
|
10954
|
-
"args": [],
|
10955
|
-
"type": {
|
10956
|
-
"kind": "SCALAR",
|
10957
|
-
"name": "String",
|
10958
|
-
"ofType": null
|
10959
|
-
},
|
10960
|
-
"isDeprecated": false,
|
10961
|
-
"deprecationReason": null
|
10962
|
-
},
|
10963
10951
|
{
|
10964
10952
|
"name": "pagerduty_username",
|
10965
10953
|
"description": null,
|
@@ -27860,6 +27848,18 @@
|
|
27860
27848
|
},
|
27861
27849
|
"isDeprecated": false,
|
27862
27850
|
"deprecationReason": null
|
27851
|
+
},
|
27852
|
+
{
|
27853
|
+
"name": "vpc_tags",
|
27854
|
+
"description": null,
|
27855
|
+
"args": [],
|
27856
|
+
"type": {
|
27857
|
+
"kind": "SCALAR",
|
27858
|
+
"name": "JSON",
|
27859
|
+
"ofType": null
|
27860
|
+
},
|
27861
|
+
"isDeprecated": false,
|
27862
|
+
"deprecationReason": null
|
27863
27863
|
}
|
27864
27864
|
],
|
27865
27865
|
"inputFields": null,
|
@@ -28089,6 +28089,30 @@
|
|
28089
28089
|
},
|
28090
28090
|
"isDeprecated": false,
|
28091
28091
|
"deprecationReason": null
|
28092
|
+
},
|
28093
|
+
{
|
28094
|
+
"name": "private_subnet_tags",
|
28095
|
+
"description": null,
|
28096
|
+
"args": [],
|
28097
|
+
"type": {
|
28098
|
+
"kind": "SCALAR",
|
28099
|
+
"name": "JSON",
|
28100
|
+
"ofType": null
|
28101
|
+
},
|
28102
|
+
"isDeprecated": false,
|
28103
|
+
"deprecationReason": null
|
28104
|
+
},
|
28105
|
+
{
|
28106
|
+
"name": "public_subnet_tags",
|
28107
|
+
"description": null,
|
28108
|
+
"args": [],
|
28109
|
+
"type": {
|
28110
|
+
"kind": "SCALAR",
|
28111
|
+
"name": "JSON",
|
28112
|
+
"ofType": null
|
28113
|
+
},
|
28114
|
+
"isDeprecated": false,
|
28115
|
+
"deprecationReason": null
|
28092
28116
|
}
|
28093
28117
|
],
|
28094
28118
|
"inputFields": null,
|
@@ -31,7 +31,11 @@ from reconcile.utils.runtime.integration import (
|
|
31
31
|
from reconcile.utils.secret_reader import create_secret_reader
|
32
32
|
from reconcile.utils.semver_helper import make_semver
|
33
33
|
from reconcile.utils.terraform_client import TerraformClient
|
34
|
-
from reconcile.utils.terrascript_aws_client import
|
34
|
+
from reconcile.utils.terrascript_aws_client import (
|
35
|
+
VPC_REQUEST_DEFAULT_PRIVATE_SUBNET_TAGS,
|
36
|
+
VPC_REQUEST_DEFAULT_PUBLIC_SUBNET_TAGS,
|
37
|
+
TerrascriptClient,
|
38
|
+
)
|
35
39
|
from reconcile.utils.vcs import VCS
|
36
40
|
|
37
41
|
QONTRACT_INTEGRATION = "terraform_vpc_resources"
|
@@ -90,14 +94,28 @@ class TerraformVpcResources(QontractReconcileIntegration[TerraformVpcResourcesPa
|
|
90
94
|
f"{request.identifier}-public_subnets", {}
|
91
95
|
).get("value", [])
|
92
96
|
|
97
|
+
if request.subnets:
|
98
|
+
private_subnet_tags = VPC_REQUEST_DEFAULT_PRIVATE_SUBNET_TAGS | (
|
99
|
+
request.subnets.private_subnet_tags or {}
|
100
|
+
)
|
101
|
+
public_subnet_tags = VPC_REQUEST_DEFAULT_PUBLIC_SUBNET_TAGS | (
|
102
|
+
request.subnets.public_subnet_tags or {}
|
103
|
+
)
|
104
|
+
else:
|
105
|
+
private_subnet_tags = VPC_REQUEST_DEFAULT_PRIVATE_SUBNET_TAGS
|
106
|
+
public_subnet_tags = VPC_REQUEST_DEFAULT_PUBLIC_SUBNET_TAGS
|
107
|
+
|
93
108
|
values = {
|
94
109
|
"static": {
|
95
110
|
"vpc_id": outputs_per_account.get(
|
96
111
|
f"{request.identifier}-vpc_id", {}
|
97
112
|
).get("value"),
|
113
|
+
"vpc_tags": request.vpc_tags or {},
|
98
114
|
"subnets": {
|
99
115
|
"private": private_subnets,
|
100
116
|
"public": public_subnets,
|
117
|
+
"private_subnet_tags": private_subnet_tags,
|
118
|
+
"public_subnet_tags": public_subnet_tags,
|
101
119
|
},
|
102
120
|
"account_name": request.account.name,
|
103
121
|
"region": request.region,
|
@@ -321,6 +321,9 @@ AWS_US_GOV_ELB_ACCOUNT_IDS = {
|
|
321
321
|
"us-gov-east-1": "190560391635",
|
322
322
|
}
|
323
323
|
|
324
|
+
VPC_REQUEST_DEFAULT_PRIVATE_SUBNET_TAGS = {"kubernetes.io/role/internal-elb": "1"}
|
325
|
+
VPC_REQUEST_DEFAULT_PUBLIC_SUBNET_TAGS = {"kubernetes.io/role/elb": "1"}
|
326
|
+
|
324
327
|
|
325
328
|
class OutputResourceNameNotUniqueError(Exception):
|
326
329
|
def __init__(self, namespace: str | None, duplicates: Iterable[str]) -> None:
|
@@ -1327,25 +1330,32 @@ class TerrascriptClient:
|
|
1327
1330
|
"version": vpc_module_version,
|
1328
1331
|
"name": request.identifier,
|
1329
1332
|
"cidr": request.cidr_block.network_address,
|
1330
|
-
"private_subnet_tags": {"kubernetes.io/role/internal-elb": "1"},
|
1331
|
-
"public_subnet_tags": {"kubernetes.io/role/elb": "1"},
|
1332
1333
|
"create_database_subnet_group": False,
|
1333
1334
|
"enable_dns_hostnames": True,
|
1335
|
+
"vpc_tags": request.vpc_tags or {},
|
1334
1336
|
"tags": {
|
1335
1337
|
"managed_by_integration": self.integration,
|
1336
1338
|
},
|
1337
1339
|
}
|
1338
1340
|
|
1339
|
-
if request.subnets
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1341
|
+
if request.subnets:
|
1342
|
+
if request.subnets.public:
|
1343
|
+
vpc_module_values["public_subnets"] = request.subnets.public
|
1344
|
+
vpc_module_values["public_subnet_tags"] = (
|
1345
|
+
VPC_REQUEST_DEFAULT_PUBLIC_SUBNET_TAGS
|
1346
|
+
| (request.subnets.public_subnet_tags or {})
|
1347
|
+
)
|
1348
|
+
if request.subnets.private:
|
1349
|
+
vpc_module_values["private_subnets"] = request.subnets.private
|
1350
|
+
vpc_module_values["private_subnet_tags"] = (
|
1351
|
+
VPC_REQUEST_DEFAULT_PRIVATE_SUBNET_TAGS
|
1352
|
+
| (request.subnets.private_subnet_tags or {})
|
1353
|
+
)
|
1354
|
+
if request.subnets.availability_zones:
|
1355
|
+
vpc_module_values["azs"] = request.subnets.availability_zones
|
1356
|
+
# We only want to enable nat_gateway if we have public and private subnets
|
1357
|
+
if request.subnets.public and request.subnets.private:
|
1358
|
+
vpc_module_values["enable_nat_gateway"] = True
|
1349
1359
|
|
1350
1360
|
aws_account = request.account.name
|
1351
1361
|
vpc_module = Module(request.identifier, **vpc_module_values)
|
@@ -1386,19 +1396,20 @@ class TerrascriptClient:
|
|
1386
1396
|
)
|
1387
1397
|
self.add_resource(aws_account, vpc_cidr_block_output)
|
1388
1398
|
|
1389
|
-
if request.subnets
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1399
|
+
if request.subnets:
|
1400
|
+
if request.subnets.private:
|
1401
|
+
private_subnets_output = Output(
|
1402
|
+
f"{request.identifier}-private_subnets",
|
1403
|
+
value=f"${{module.{request.identifier}.private_subnets}}",
|
1404
|
+
)
|
1405
|
+
self.add_resource(aws_account, private_subnets_output)
|
1395
1406
|
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1407
|
+
if request.subnets.public:
|
1408
|
+
public_subnets_output = Output(
|
1409
|
+
f"{request.identifier}-public_subnets",
|
1410
|
+
value=f"${{module.{request.identifier}.public_subnets}}",
|
1411
|
+
)
|
1412
|
+
self.add_resource(aws_account, public_subnets_output)
|
1402
1413
|
|
1403
1414
|
def populate_tgw_attachments(
|
1404
1415
|
self, desired_state: Iterable[DesiredStateItem]
|
{qontract_reconcile-0.10.2.dev309.dist-info → qontract_reconcile-0.10.2.dev311.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|