qontract-reconcile 0.10.2.dev88__py3-none-any.whl → 0.10.2.dev90__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qontract-reconcile
3
- Version: 0.10.2.dev88
3
+ Version: 0.10.2.dev90
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
@@ -198,7 +198,7 @@ reconcile/external_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
198
198
  reconcile/external_resources/aws.py,sha256=wzN3GHxyqVa4Lqqg5HdogqNW2RM532t0ZiKaQeVGOL4,10968
199
199
  reconcile/external_resources/factories.py,sha256=C0QHT0soEv6z99-ELAAE19S5MaMHhV0t1fSiQn0Coc4,5970
200
200
  reconcile/external_resources/integration.py,sha256=JF38M7R0Z4ADUTx57TZqSZH9k_xpPlbAxQAcGyIISuM,6925
201
- reconcile/external_resources/integration_secrets_sync.py,sha256=dX09O3r6KURziUYYfiki10orNjOGVma-XojhVqd0ww4,1667
201
+ reconcile/external_resources/integration_secrets_sync.py,sha256=CImwt_tyS3MMGpkjI_0gZqYt4XgqIw4BtdJiDH2xrCk,1700
202
202
  reconcile/external_resources/manager.py,sha256=mvFfcXPzvNqDWDgKTK8eiSe6C_FUvBtben3bSqrqSoc,18246
203
203
  reconcile/external_resources/meta.py,sha256=noaytFzmShpzLA_ebGh7wuP45mOfHIOnnoUxivjDa1I,672
204
204
  reconcile/external_resources/metrics.py,sha256=KiBjMUaN_z0cSkF_7Ar_a8RiuiwVqjyMcVdISlxhzXE,3898
@@ -208,11 +208,11 @@ reconcile/external_resources/secrets_sync.py,sha256=ZDxzGZ6wC4zxLhA7-L39xDRH6rzU
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=ZOpmtwgxEPBWU2yHRc6rhPwlvqhwYSsNMJQ_jVq1dLI,2993
211
- reconcile/fleet_labeler/integration.py,sha256=jm2wvkxsxqGLsX_vE874crgce_YsDWyggL3Q3olMNJM,8753
212
- reconcile/fleet_labeler/merge_request.py,sha256=VA_XSIob4LWYb02dRUr9coXjIa8_0prObI1v5Gqi_mY,1513
211
+ reconcile/fleet_labeler/integration.py,sha256=GR-LUDfDp29VNy1aSLun1UwEOQ1AAXXC18ZdngdCsRg,8976
212
+ reconcile/fleet_labeler/merge_request.py,sha256=SfGxXInxeJzVnsTtO0ZC9-PesUJMdpKxKY9eCB6ms-g,1538
213
213
  reconcile/fleet_labeler/meta.py,sha256=DF7O4T9wvQ7-xTWXvuNw1OG_F0SBmRrjFBtVy9wWh9U,146
214
214
  reconcile/fleet_labeler/metrics.py,sha256=wx9BmXLsN67m-aSsf81iB7Ehj5SzUsS2WB75isUReZg,662
215
- reconcile/fleet_labeler/ocm.py,sha256=GGsz-bq1g8BJVVMCfI2kSwZCyngbQoZ3i3k8fO608KA,2506
215
+ reconcile/fleet_labeler/ocm.py,sha256=25UVRQDcbcJFQgg4WDXvUI5M8w9yqr0noiy90-sbQjY,2699
216
216
  reconcile/fleet_labeler/validate.py,sha256=gzc2tt7h9F60h7dcyJfEmsnjnfuux5Jtc_WzrIqr-5k,2541
217
217
  reconcile/fleet_labeler/vcs.py,sha256=6UHUQ08AGAHXF7629I6X-T_E1pvx96LxjS66EeOzve4,1108
218
218
  reconcile/glitchtip/README.md,sha256=rfXT6jNP9khJW65jL7I2PgoxvxgcGGuJF8NpbzufEQ4,4335
@@ -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=fhnOfg-0gFKOL6yrnI5JJE0w9khgA8ivmEzH_gmDajw,2238549
227
+ reconcile/gql_definitions/introspection.json,sha256=nBoWZM_ilrKlbCUF9cbRe7D1jsTqHqfGkLQW2gbleBM,2239254
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
@@ -314,7 +314,7 @@ reconcile/gql_definitions/external_resources/external_resources_settings.py,sha2
314
314
  reconcile/gql_definitions/external_resources/fragments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
315
315
  reconcile/gql_definitions/external_resources/fragments/external_resources_module_overrides.py,sha256=T_qWCRtzU8F9frebBXG9TkeQdrKGt3R9YinSngPoFqM,1262
316
316
  reconcile/gql_definitions/fleet_labeler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
317
- reconcile/gql_definitions/fleet_labeler/fleet_labels.py,sha256=TGpc-NYm2qnURHigCppUZRY1WWaIqA3E_69BWyni1RQ,4323
317
+ reconcile/gql_definitions/fleet_labeler/fleet_labels.py,sha256=rII_VzEfjGibY1lJXMBMKdCeV7kaNyRXk9-J9-neBoU,4412
318
318
  reconcile/gql_definitions/fragments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
319
319
  reconcile/gql_definitions/fragments/aus_organization.py,sha256=uBKbTuBa3CZmTXR5HOcGhRcu2U9kM93KbYmoWTxcpB0,4767
320
320
  reconcile/gql_definitions/fragments/aws_account_common.py,sha256=3-7ZAP6GSff7Z2Syz2VQCLY4IySqBOSVmceaRiVNQpw,2385
@@ -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.dev88.dist-info/METADATA,sha256=4n5vQregAp6JSzC4Vf3G7tXclpo0M-GHu_k5hbidAcY,24565
790
- qontract_reconcile-0.10.2.dev88.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
791
- qontract_reconcile-0.10.2.dev88.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
792
- qontract_reconcile-0.10.2.dev88.dist-info/RECORD,,
789
+ qontract_reconcile-0.10.2.dev90.dist-info/METADATA,sha256=ITNNwFXdctUPEAooDO8HTV-cc3Z7izzfNugSWuoAFwU,24565
790
+ qontract_reconcile-0.10.2.dev90.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
791
+ qontract_reconcile-0.10.2.dev90.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
792
+ qontract_reconcile-0.10.2.dev90.dist-info/RECORD,,
@@ -27,7 +27,10 @@ def run(dry_run: bool, thread_pool_size: int) -> None:
27
27
  secret_reader = create_secret_reader(use_vault=vault_settings.vault)
28
28
  er_settings = get_settings()
29
29
 
30
- namespaces = [ns for ns in get_namespaces() if ns.external_resources]
30
+ namespaces = [
31
+ ns for ns in get_namespaces() if not ns.delete and ns.external_resources
32
+ ]
33
+
31
34
  er_inventory = ExternalResourcesInventory(namespaces)
32
35
  m_inventory = load_module_inventory(get_modules())
33
36
 
@@ -104,6 +104,7 @@ class FleetLabelerIntegration(QontractReconcileIntegration[NoParams]):
104
104
  {
105
105
  "name": cluster.name,
106
106
  "clusterId": cluster.cluster_id,
107
+ "subscriptionId": cluster.subscription_id,
107
108
  "serverUrl": cluster.server_url,
108
109
  "subscriptionLabels": cluster.subscription_labels_content,
109
110
  }
@@ -128,6 +129,7 @@ class FleetLabelerIntegration(QontractReconcileIntegration[NoParams]):
128
129
 
129
130
  name: str
130
131
  server_url: str
132
+ subscription_id: str
131
133
  label_default: FleetLabelDefaultV1
132
134
 
133
135
  all_current_cluster_ids = {cluster.cluster_id for cluster in spec.clusters}
@@ -145,6 +147,7 @@ class FleetLabelerIntegration(QontractReconcileIntegration[NoParams]):
145
147
  clusters[cluster.cluster_id].append(
146
148
  ClusterData(
147
149
  label_default=label_default,
150
+ subscription_id=cluster.subscription_id,
148
151
  name=cluster.name,
149
152
  server_url=cluster.server_url,
150
153
  )
@@ -172,6 +175,7 @@ class FleetLabelerIntegration(QontractReconcileIntegration[NoParams]):
172
175
  clusters_to_add = [
173
176
  YamlCluster(
174
177
  cluster_id=cluster_id,
178
+ subscription_id=cluster_info.subscription_id,
175
179
  name=cluster_info.name,
176
180
  server_url=cluster_info.server_url,
177
181
  subscription_labels_content=self._render_default_labels(
@@ -13,6 +13,7 @@ class YamlCluster(BaseModel):
13
13
  name: str
14
14
  server_url: str
15
15
  cluster_id: str
16
+ subscription_id: str
16
17
  subscription_labels_content: Any
17
18
 
18
19
 
@@ -26,16 +26,20 @@ class Cluster(BaseModel):
26
26
  cluster_id: str
27
27
  server_url: str
28
28
  name: str
29
+ subscription_id: str
29
30
  subscription_labels: dict[str, str]
30
31
 
31
32
  @staticmethod
32
33
  def from_cluster_details(cluster: ClusterDetails) -> Cluster:
33
- server_url = (
34
+ console_url = (
34
35
  cluster.ocm_cluster.console.url if cluster.ocm_cluster.console else ""
35
36
  )
37
+ api_url = cluster.ocm_cluster.api_url or ""
38
+ server_url = api_url or console_url or ""
36
39
 
37
40
  return Cluster(
38
41
  cluster_id=cluster.ocm_cluster.id,
42
+ subscription_id=cluster.ocm_cluster.subscription.id,
39
43
  server_url=server_url,
40
44
  name=cluster.ocm_cluster.name,
41
45
  subscription_labels={
@@ -58,6 +58,7 @@ query FleetLabelSpecs {
58
58
  clusters {
59
59
  name
60
60
  serverUrl
61
+ subscriptionId
61
62
  clusterId
62
63
  subscriptionLabels
63
64
  }
@@ -103,6 +104,7 @@ class FleetLabelDefaultV1(ConfiguredBaseModel):
103
104
  class FleetClusterV1(ConfiguredBaseModel):
104
105
  name: str = Field(..., alias="name")
105
106
  server_url: str = Field(..., alias="serverUrl")
107
+ subscription_id: str = Field(..., alias="subscriptionId")
106
108
  cluster_id: str = Field(..., alias="clusterId")
107
109
  subscription_labels: Json = Field(..., alias="subscriptionLabels")
108
110
 
@@ -34632,6 +34632,22 @@
34632
34632
  "isDeprecated": false,
34633
34633
  "deprecationReason": null
34634
34634
  },
34635
+ {
34636
+ "name": "subscriptionId",
34637
+ "description": null,
34638
+ "args": [],
34639
+ "type": {
34640
+ "kind": "NON_NULL",
34641
+ "name": null,
34642
+ "ofType": {
34643
+ "kind": "SCALAR",
34644
+ "name": "String",
34645
+ "ofType": null
34646
+ }
34647
+ },
34648
+ "isDeprecated": false,
34649
+ "deprecationReason": null
34650
+ },
34635
34651
  {
34636
34652
  "name": "subscriptionLabels",
34637
34653
  "description": null,