qontract-reconcile 0.10.2.dev78__py3-none-any.whl → 0.10.2.dev80__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.dev78.dist-info → qontract_reconcile-0.10.2.dev80.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev78.dist-info → qontract_reconcile-0.10.2.dev80.dist-info}/RECORD +11 -11
- reconcile/fleet_labeler/integration.py +9 -0
- reconcile/fleet_labeler/merge_request.py +11 -3
- reconcile/gql_definitions/common/saas_files.py +1 -25
- reconcile/gql_definitions/introspection.json +0 -12
- reconcile/typed_queries/saas_files.py +1 -5
- reconcile/utils/saasherder/interfaces.py +0 -3
- reconcile/utils/saasherder/saasherder.py +5 -9
- {qontract_reconcile-0.10.2.dev78.dist-info → qontract_reconcile-0.10.2.dev80.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev78.dist-info → qontract_reconcile-0.10.2.dev80.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev78.dist-info → qontract_reconcile-0.10.2.dev80.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.dev80
|
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.dev78.dist-info → qontract_reconcile-0.10.2.dev80.dist-info}/RECORD
RENAMED
@@ -208,8 +208,8 @@ reconcile/external_resources/secrets_sync.py,sha256=50fK4fzgSz-K8uy5_DQQWA_ju_rT
|
|
208
208
|
reconcile/external_resources/state.py,sha256=gF3ACdl7YiUlbQ4uEGrD6i_Txxqr6mT9f8IFlTQ-8dY,13176
|
209
209
|
reconcile/fleet_labeler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
210
210
|
reconcile/fleet_labeler/dependencies.py,sha256=Ta-SLnrHRN4OBAmhE_mTk1P7y1X7AInIiQsIYaY6hY0,2910
|
211
|
-
reconcile/fleet_labeler/integration.py,sha256=
|
212
|
-
reconcile/fleet_labeler/merge_request.py,sha256=
|
211
|
+
reconcile/fleet_labeler/integration.py,sha256=gDK97QvsJ5IEo1t1ci4yxTRM7VSDj4uP9l30zHi_rWo,7700
|
212
|
+
reconcile/fleet_labeler/merge_request.py,sha256=VA_XSIob4LWYb02dRUr9coXjIa8_0prObI1v5Gqi_mY,1513
|
213
213
|
reconcile/fleet_labeler/meta.py,sha256=DF7O4T9wvQ7-xTWXvuNw1OG_F0SBmRrjFBtVy9wWh9U,146
|
214
214
|
reconcile/fleet_labeler/metrics.py,sha256=wx9BmXLsN67m-aSsf81iB7Ehj5SzUsS2WB75isUReZg,662
|
215
215
|
reconcile/fleet_labeler/ocm.py,sha256=GGsz-bq1g8BJVVMCfI2kSwZCyngbQoZ3i3k8fO608KA,2506
|
@@ -224,7 +224,7 @@ reconcile/glitchtip_project_alerts/integration.py,sha256=BgMx-NyV9mTuv7Sotb2OioC
|
|
224
224
|
reconcile/glitchtip_project_dsn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
225
225
|
reconcile/glitchtip_project_dsn/integration.py,sha256=2iugub-kHYkHNK33n0v9_TeWonuxCPah_VkoTPvaajE,8077
|
226
226
|
reconcile/gql_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
227
|
-
reconcile/gql_definitions/introspection.json,sha256=
|
227
|
+
reconcile/gql_definitions/introspection.json,sha256=EtGe57eM0V8WCKw-tzPwCo3EVlhM7EM-qhTlLDu_SzQ,2238029
|
228
228
|
reconcile/gql_definitions/acs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
229
229
|
reconcile/gql_definitions/acs/acs_instances.py,sha256=L91WW9LbhJbBSrECqShQpFtjoBOsmNIYLRpMbx1io5o,2181
|
230
230
|
reconcile/gql_definitions/acs/acs_policies.py,sha256=bN5i4mks10Z23KJSj7jqp966Osq2dps4d-sPH9gjxEA,7008
|
@@ -288,7 +288,7 @@ reconcile/gql_definitions/common/pipeline_providers.py,sha256=9rpsqPuvj82B4ki56x
|
|
288
288
|
reconcile/gql_definitions/common/quay_instances.py,sha256=toBkdYYVTmEafezAHZKgaW-mQ29xEW6jeronzsAlNyI,1786
|
289
289
|
reconcile/gql_definitions/common/quay_orgs.py,sha256=NhA8kqvVUDbrsryEvEL5mlIv5R3T4XNhSRXtfL_yptY,1788
|
290
290
|
reconcile/gql_definitions/common/reserved_networks.py,sha256=yP9qSQCaSQcva-ZgTnZp09qH27ur5_qK080ToIs04MY,2560
|
291
|
-
reconcile/gql_definitions/common/saas_files.py,sha256=
|
291
|
+
reconcile/gql_definitions/common/saas_files.py,sha256=DA6aJspbuoSkVHlFI4HQ-YjdE5iN3eVg1k2lNtW0840,16863
|
292
292
|
reconcile/gql_definitions/common/saas_target_namespaces.py,sha256=4VYP2VbwY8WVwtSFk2-jsUNhSmRD3X4FWKxetOKvmd0,2835
|
293
293
|
reconcile/gql_definitions/common/saasherder_settings.py,sha256=nqQLcMwYxLseqq0BEcVvmrpIj2eQq0h8XDSpLN6GGCw,1793
|
294
294
|
reconcile/gql_definitions/common/slack_workspaces.py,sha256=2o0kgi4QiaRuNmZJnc_By4F6NsKIdRaXkrufRQw7Nok,1753
|
@@ -551,7 +551,7 @@ reconcile/typed_queries/pagerduty_instances.py,sha256=zxCNxMak4iikryePaRi71lTADV
|
|
551
551
|
reconcile/typed_queries/quay.py,sha256=3IMy9jjHF2f9t47EXZOQVA3p0nFkWFhaFhxhvib-71o,644
|
552
552
|
reconcile/typed_queries/repos.py,sha256=8A93dKDt6igT4ClqMjt7YUTsoP4qh1Wnm0W3xsMgj48,824
|
553
553
|
reconcile/typed_queries/reserved_networks.py,sha256=XY9y3amtIQT0n06O0Toubqr_UmylJ2ELAv9-BJCK890,345
|
554
|
-
reconcile/typed_queries/saas_files.py,sha256=
|
554
|
+
reconcile/typed_queries/saas_files.py,sha256=O2kd0nSFfMgnbXvSv9oMIdlBGZg7XlOU3y2CWg1W2DQ,14001
|
555
555
|
reconcile/typed_queries/slack.py,sha256=r30lspctHloyygPn8_DVybxPwUWwiBpvBRRXiTVcQYk,251
|
556
556
|
reconcile/typed_queries/slo_documents.py,sha256=YMdox_-lBRqrdxamPhdnUlRTY_Ro35ptsupq7OaynUQ,362
|
557
557
|
reconcile/typed_queries/smtp.py,sha256=aSLglYa5bHKmlGwKkxq2RZqyMWuAf0a4S_mOuhDa084,542
|
@@ -738,9 +738,9 @@ reconcile/utils/runtime/meta.py,sha256=dWdKS9eHVuowFkTK4lgXJ723vS1y9giOMzePUKnHn
|
|
738
738
|
reconcile/utils/runtime/runner.py,sha256=I30KRrX1UQbHc_Ir1cIZX3OfNSdoHKdnDSPAEB69Ilk,7944
|
739
739
|
reconcile/utils/runtime/sharding.py,sha256=r0ieUtNed7NvknSw6qQrCkKpVXE1shuHGnfFcnpA_k4,16142
|
740
740
|
reconcile/utils/saasherder/__init__.py,sha256=3U8plqMAPRE1kjwZ5YnIsYsggTf4_gS7flRUEuXVBAs,343
|
741
|
-
reconcile/utils/saasherder/interfaces.py,sha256=
|
741
|
+
reconcile/utils/saasherder/interfaces.py,sha256=2Fjc34Us5q166P6bWVmSEBeYNTnWAPrI9EHwYUnEeuw,9098
|
742
742
|
reconcile/utils/saasherder/models.py,sha256=JaOz_DEtudJZhiDe90kaBlJkppFufn81V92oK9PHYx0,10208
|
743
|
-
reconcile/utils/saasherder/saasherder.py,sha256=
|
743
|
+
reconcile/utils/saasherder/saasherder.py,sha256=13LeAw12QR7wg4eU92iDsNXTCSCBrBp6LKvACn8ndp0,86834
|
744
744
|
reconcile/utils/terraform/__init__.py,sha256=zNbiyTWo35AT1sFTElL2j_AA0jJ_yWE_bfFn-nD2xik,250
|
745
745
|
reconcile/utils/terraform/config.py,sha256=5UVrd563TMcvi4ooa5JvWVDW1I3bIWg484u79evfV_8,164
|
746
746
|
reconcile/utils/terraform/config_client.py,sha256=gRL1rQ0AqvShei_rcGqC3HDYGskOFKE1nPrJyJE9yno,4676
|
@@ -786,7 +786,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
786
786
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
|
787
787
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
788
788
|
tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
|
789
|
-
qontract_reconcile-0.10.2.
|
790
|
-
qontract_reconcile-0.10.2.
|
791
|
-
qontract_reconcile-0.10.2.
|
792
|
-
qontract_reconcile-0.10.2.
|
789
|
+
qontract_reconcile-0.10.2.dev80.dist-info/METADATA,sha256=y3d1ijPuxlumADt6r3Yu1YqzS50B3kC5hlk0R5Nn1w8,24565
|
790
|
+
qontract_reconcile-0.10.2.dev80.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
791
|
+
qontract_reconcile-0.10.2.dev80.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
792
|
+
qontract_reconcile-0.10.2.dev80.dist-info/RECORD,,
|
@@ -180,6 +180,15 @@ class FleetLabelerIntegration(QontractReconcileIntegration[NoParams]):
|
|
180
180
|
if not (cluster_ids_to_delete or clusters_to_add):
|
181
181
|
return
|
182
182
|
|
183
|
+
for yaml_cluster in clusters_to_add:
|
184
|
+
logging.info(
|
185
|
+
f"[{spec.name}] Adding cluster '{yaml_cluster.name}' with id '{yaml_cluster.cluster_id}' to inventory with default labels {yaml_cluster.subscription_labels_content}."
|
186
|
+
)
|
187
|
+
for cluster_id in cluster_ids_to_delete:
|
188
|
+
logging.info(
|
189
|
+
f"[{spec.name}] Deleting cluster {cluster_id=} from inventory."
|
190
|
+
)
|
191
|
+
|
183
192
|
current_content = vcs.get_file_content_from_main(path=spec.path)
|
184
193
|
# Lets make sure we are deterministic when adding new clusters
|
185
194
|
# The overhead is neglectable and it makes testing easier
|
@@ -17,6 +17,9 @@ class YamlCluster(BaseModel):
|
|
17
17
|
|
18
18
|
|
19
19
|
class FleetLabelerUpdates(MergeRequestBase):
|
20
|
+
# Note, this name is used for the branch name that is being created.
|
21
|
+
name = "fleet_labeler_updates"
|
22
|
+
|
20
23
|
def __init__(
|
21
24
|
self,
|
22
25
|
path: str,
|
@@ -24,7 +27,6 @@ class FleetLabelerUpdates(MergeRequestBase):
|
|
24
27
|
):
|
25
28
|
self._path = path
|
26
29
|
self._content = content
|
27
|
-
self._title = f"[Fleet Labeler] Update cluster inventory for {path}"
|
28
30
|
|
29
31
|
super().__init__()
|
30
32
|
|
@@ -32,11 +34,17 @@ class FleetLabelerUpdates(MergeRequestBase):
|
|
32
34
|
|
33
35
|
@property
|
34
36
|
def title(self) -> str:
|
35
|
-
return self.
|
37
|
+
return f"[Fleet Labeler] Update cluster inventory for {self._path}"
|
36
38
|
|
37
39
|
@property
|
38
40
|
def description(self) -> str:
|
39
|
-
return
|
41
|
+
return f"""
|
42
|
+
This is an automatically generated MR by the [fleet-labeler](https://github.com/app-sre/qontract-reconcile/tree/master/reconcile/fleet_labeler) integration.
|
43
|
+
|
44
|
+
This MR updates the cluster inventory for the fleet label spec defined at {self._path}.
|
45
|
+
|
46
|
+
Please do not manually change anything in this MR.
|
47
|
+
"""
|
40
48
|
|
41
49
|
def process(self, gitlab_cli: GitLabApi) -> None:
|
42
50
|
msg = "update cluster inventory"
|
@@ -293,15 +293,6 @@ query SaasFiles {
|
|
293
293
|
}
|
294
294
|
name
|
295
295
|
}
|
296
|
-
image {
|
297
|
-
org {
|
298
|
-
name
|
299
|
-
instance {
|
300
|
-
url
|
301
|
-
}
|
302
|
-
}
|
303
|
-
name
|
304
|
-
}
|
305
296
|
images {
|
306
297
|
org {
|
307
298
|
name
|
@@ -517,20 +508,6 @@ class SaasResourceTemplateTargetImageV1(ConfiguredBaseModel):
|
|
517
508
|
name: str = Field(..., alias="name")
|
518
509
|
|
519
510
|
|
520
|
-
class SaasResourceTemplateTargetV2_SaasResourceTemplateTargetImageV1_QuayOrgV1_QuayInstanceV1(ConfiguredBaseModel):
|
521
|
-
url: str = Field(..., alias="url")
|
522
|
-
|
523
|
-
|
524
|
-
class SaasResourceTemplateTargetV2_SaasResourceTemplateTargetImageV1_QuayOrgV1(ConfiguredBaseModel):
|
525
|
-
name: str = Field(..., alias="name")
|
526
|
-
instance: SaasResourceTemplateTargetV2_SaasResourceTemplateTargetImageV1_QuayOrgV1_QuayInstanceV1 = Field(..., alias="instance")
|
527
|
-
|
528
|
-
|
529
|
-
class SaasResourceTemplateTargetV2_SaasResourceTemplateTargetImageV1(ConfiguredBaseModel):
|
530
|
-
org: SaasResourceTemplateTargetV2_SaasResourceTemplateTargetImageV1_QuayOrgV1 = Field(..., alias="org")
|
531
|
-
name: str = Field(..., alias="name")
|
532
|
-
|
533
|
-
|
534
511
|
class SaasResourceTemplateTargetV2(ConfiguredBaseModel):
|
535
512
|
path: Optional[str] = Field(..., alias="path")
|
536
513
|
name: Optional[str] = Field(..., alias="name")
|
@@ -542,8 +519,7 @@ class SaasResourceTemplateTargetV2(ConfiguredBaseModel):
|
|
542
519
|
parameters: Optional[Json] = Field(..., alias="parameters")
|
543
520
|
secret_parameters: Optional[list[SaasResourceTemplateTargetV2_SaasSecretParametersV1]] = Field(..., alias="secretParameters")
|
544
521
|
upstream: Optional[SaasResourceTemplateTargetUpstreamV1] = Field(..., alias="upstream")
|
545
|
-
|
546
|
-
images: Optional[list[SaasResourceTemplateTargetV2_SaasResourceTemplateTargetImageV1]] = Field(..., alias="images")
|
522
|
+
images: Optional[list[SaasResourceTemplateTargetImageV1]] = Field(..., alias="images")
|
547
523
|
disable: Optional[bool] = Field(..., alias="disable")
|
548
524
|
delete: Optional[bool] = Field(..., alias="delete")
|
549
525
|
|
@@ -22391,18 +22391,6 @@
|
|
22391
22391
|
"isDeprecated": false,
|
22392
22392
|
"deprecationReason": null
|
22393
22393
|
},
|
22394
|
-
{
|
22395
|
-
"name": "image",
|
22396
|
-
"description": null,
|
22397
|
-
"args": [],
|
22398
|
-
"type": {
|
22399
|
-
"kind": "OBJECT",
|
22400
|
-
"name": "SaasResourceTemplateTargetImage_v1",
|
22401
|
-
"ofType": null
|
22402
|
-
},
|
22403
|
-
"isDeprecated": false,
|
22404
|
-
"deprecationReason": null
|
22405
|
-
},
|
22406
22394
|
{
|
22407
22395
|
"name": "disable",
|
22408
22396
|
"description": null,
|
@@ -26,7 +26,6 @@ from reconcile.gql_definitions.common.saas_files import (
|
|
26
26
|
SaasResourceTemplateTargetPromotionV1,
|
27
27
|
SaasResourceTemplateTargetUpstreamV1,
|
28
28
|
SaasResourceTemplateTargetV2,
|
29
|
-
SaasResourceTemplateTargetV2_SaasResourceTemplateTargetImageV1,
|
30
29
|
SaasResourceTemplateTargetV2_SaasSecretParametersV1,
|
31
30
|
SaasResourceTemplateV2_SaasSecretParametersV1,
|
32
31
|
SaasSecretParametersV1,
|
@@ -65,10 +64,7 @@ class SaasResourceTemplateTarget(ConfiguredBaseModel):
|
|
65
64
|
list[SaasResourceTemplateTargetV2_SaasSecretParametersV1] | None
|
66
65
|
) = Field(..., alias="secretParameters")
|
67
66
|
upstream: SaasResourceTemplateTargetUpstreamV1 | None = Field(..., alias="upstream")
|
68
|
-
|
69
|
-
images: (
|
70
|
-
list[SaasResourceTemplateTargetV2_SaasResourceTemplateTargetImageV1] | None
|
71
|
-
) = Field(..., alias="images")
|
67
|
+
images: list[SaasResourceTemplateTargetImageV1] | None = Field(..., alias="images")
|
72
68
|
disable: bool | None = Field(..., alias="disable")
|
73
69
|
delete: bool | None = Field(..., alias="delete")
|
74
70
|
|
@@ -323,9 +323,6 @@ class SaasResourceTemplateTarget(HasParameters, HasSecretParameters, Protocol):
|
|
323
323
|
@property
|
324
324
|
def upstream(self) -> SaasResourceTemplateTargetUpstream | None: ...
|
325
325
|
|
326
|
-
@property
|
327
|
-
def image(self) -> SaasResourceTemplateTargetImage | None: ...
|
328
|
-
|
329
326
|
@property
|
330
327
|
def images(self) -> Sequence[SaasResourceTemplateTargetImage] | None: ...
|
331
328
|
|
@@ -560,7 +560,7 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
560
560
|
resource_template_name: str,
|
561
561
|
target: SaasResourceTemplateTarget,
|
562
562
|
) -> None:
|
563
|
-
if target.
|
563
|
+
if target.images and target.upstream:
|
564
564
|
logging.error(
|
565
565
|
f"[{saas_file_name}/{resource_template_name}] image used with upstream"
|
566
566
|
)
|
@@ -572,7 +572,7 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
572
572
|
resource_template_name: str,
|
573
573
|
target: SaasResourceTemplateTarget,
|
574
574
|
) -> None:
|
575
|
-
if target.
|
575
|
+
if target.images and is_commit_sha(target.ref):
|
576
576
|
logging.error(
|
577
577
|
f"[{saas_file_name}/{resource_template_name}] "
|
578
578
|
f'Attempt to use the "image" directive with commit sha: {target.ref}. '
|
@@ -1440,7 +1440,7 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
1440
1440
|
for target in rt.targets:
|
1441
1441
|
try:
|
1442
1442
|
# don't trigger if there is a linked upstream job or container image
|
1443
|
-
if target.upstream or target.
|
1443
|
+
if target.upstream or target.images:
|
1444
1444
|
continue
|
1445
1445
|
|
1446
1446
|
desired_commit_sha = self._get_commit_sha(
|
@@ -1620,12 +1620,8 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
1620
1620
|
for rt in saas_file.resource_templates:
|
1621
1621
|
for target in rt.targets:
|
1622
1622
|
try:
|
1623
|
-
if not
|
1623
|
+
if not target.images:
|
1624
1624
|
continue
|
1625
|
-
if target.image and target.images:
|
1626
|
-
raise TriggerSpecContainerImageError(
|
1627
|
-
'"image" and "images" are mutually exclusive. Do not set both in the same saas target.'
|
1628
|
-
)
|
1629
1625
|
commit_sha = self._get_commit_sha(
|
1630
1626
|
url=rt.url,
|
1631
1627
|
ref=target.ref,
|
@@ -1634,7 +1630,7 @@ class SaasHerder: # pylint: disable=too-many-public-methods
|
|
1634
1630
|
image_auth = self._initiate_image_auth(saas_file)
|
1635
1631
|
desired_image_tag = commit_sha[: rt.hash_length or self.hash_length]
|
1636
1632
|
|
1637
|
-
all_images =
|
1633
|
+
all_images = target.images or []
|
1638
1634
|
image_registries = [
|
1639
1635
|
f"{image.org.instance.url}/{image.org.name}/{image.name}"
|
1640
1636
|
for image in all_images
|
{qontract_reconcile-0.10.2.dev78.dist-info → qontract_reconcile-0.10.2.dev80.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|