qontract-reconcile 0.10.1rc749__py3-none-any.whl → 0.10.1rc751__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.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc749
3
+ Version: 0.10.1rc751
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
@@ -109,7 +109,7 @@ reconcile/sql_query.py,sha256=zZkihfI-f0JjMez9A83HGTlVwqqbkP8lLjRg-z7sOUU,25878
109
109
  reconcile/status.py,sha256=cY4IJFXemhxptRJqR4qaaOWqei9e4jgLXuVSGajMsjg,544
110
110
  reconcile/status_board.py,sha256=nA74_133jukxVShjPKJpkXOA3vggDTTEhYTegoXbN1M,8632
111
111
  reconcile/terraform_aws_route53.py,sha256=R8eZHlvP368nvtmLd_cMSK3RGxD7jso9qE7NP92iniU,9986
112
- reconcile/terraform_cloudflare_dns.py,sha256=auU4bzeLwd4S8D8oqpqJbrCUoEdELXrgi7vHOedjYFk,13332
112
+ reconcile/terraform_cloudflare_dns.py,sha256=MZO3_2Hb0BhNkOTWIm2UHvR-SPKvLsk2l_fHNk4WOrk,13471
113
113
  reconcile/terraform_cloudflare_resources.py,sha256=EbQQaoDnZ7brvRCpbFtwlD7KLk2hDVNcjhrJGaAywEk,15023
114
114
  reconcile/terraform_cloudflare_users.py,sha256=1EbTHwJgiPkJpMP-Ag340QNgGK3mXn3dcC3DpLakudM,13987
115
115
  reconcile/terraform_repo.py,sha256=tQkMUEDEB6QfuWYwiW7H-NnX4SHxYK7mLZYZffKj-hE,16301
@@ -621,7 +621,7 @@ reconcile/utils/jenkins_api.py,sha256=MyJSB_S3uYf3sXnt9t03-gZNQ7tbdd7Wusv3MoF2fR
621
621
  reconcile/utils/jira_client.py,sha256=sCswWH-SctzPSElI9_oHv9LKuNnPfjP_FIOizxqh6nE,7693
622
622
  reconcile/utils/jjb_client.py,sha256=Pdy0dLCFvD6GPCaC0tZydYgkVJPOxYXIiwWECZaFJBU,14551
623
623
  reconcile/utils/jsonpath.py,sha256=NRpAEijKN4cMDjo7qivNPqpm0__GQQ1TiE0PBEBO45s,5572
624
- reconcile/utils/jump_host.py,sha256=AdwmCZYNhRe53VwV2iAsUdVyUdVtSd4REmdThJDkM5w,4973
624
+ reconcile/utils/jump_host.py,sha256=ovcJ0quuHW-yxuSXvyzmOdTs4pkGZEhYfy6jIRMz9HU,5209
625
625
  reconcile/utils/keycloak.py,sha256=UqOsAcHKmmIunroWB5YzC1fUZ3S3aq6L7trn6vLRmXY,3395
626
626
  reconcile/utils/ldap_client.py,sha256=ho4veSrHqQWs0YhLFyKeD-duCwY8Nc5gUIA5qLENuMY,2502
627
627
  reconcile/utils/lean_terraform_client.py,sha256=zReyNPJbr2uOdrdh8Qfe-OZQBoRwxb5Za_ddeoUCYVk,4064
@@ -778,8 +778,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
778
778
  tools/test/test_qontract_cli.py,sha256=w2l4BHB09k1d-BGJ1jBUNCqDv7zkqYrMHojQXg-21kQ,4155
779
779
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
780
780
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
781
- qontract_reconcile-0.10.1rc749.dist-info/METADATA,sha256=GRynYliT4W9vldAPG4g1WPRh010gG9Zk7BAX643Wico,2382
782
- qontract_reconcile-0.10.1rc749.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
783
- qontract_reconcile-0.10.1rc749.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
784
- qontract_reconcile-0.10.1rc749.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
785
- qontract_reconcile-0.10.1rc749.dist-info/RECORD,,
781
+ qontract_reconcile-0.10.1rc751.dist-info/METADATA,sha256=siqrJyv1zzhjJ0bILXpBrFQywzS0NHPrPjwPEOPCshs,2382
782
+ qontract_reconcile-0.10.1rc751.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
783
+ qontract_reconcile-0.10.1rc751.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
784
+ qontract_reconcile-0.10.1rc751.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
785
+ qontract_reconcile-0.10.1rc751.dist-info/RECORD,,
@@ -10,6 +10,8 @@ from typing import (
10
10
  Sequence,
11
11
  )
12
12
 
13
+ from deepdiff import DeepHash
14
+
13
15
  from reconcile.gql_definitions.terraform_cloudflare_dns import (
14
16
  app_interface_cloudflare_dns_settings,
15
17
  terraform_cloudflare_zones,
@@ -204,13 +206,17 @@ class TerraformCloudflareDNSIntegration(
204
206
  ) -> dict[str, Any]:
205
207
  desired_state = self._get_cloudflare_desired_state()
206
208
 
207
- # return {"zones":desired_state.zones}
208
- return desired_state.dict()
209
+ return {
210
+ "state": {
211
+ z.identifier: {"shard": z.identifier, "hash": DeepHash(z).get(z)}
212
+ for z in desired_state.zones or []
213
+ }
214
+ }
209
215
 
210
216
  def get_desired_state_shard_config(self) -> DesiredStateShardConfig:
211
217
  return DesiredStateShardConfig(
212
218
  shard_arg_name="selected_zone",
213
- shard_path_selectors={"zones[*].identifier"},
219
+ shard_path_selectors={"state.*.shard"},
214
220
  sharded_run_review=lambda proposal: len(proposal.proposed_shards) <= 2,
215
221
  )
216
222
 
@@ -128,12 +128,14 @@ class JumpHostSSH(JumpHostBase):
128
128
  if self._local_port not in JumpHostSSH.bastion_tunnel:
129
129
  # Hide connect messages from sshtunnel
130
130
  with toggle_logger():
131
+ # equivalent to: ssh -i identity_file -L localhost:local_port:localhost:remote_port user@bastion
132
+ # localhost:local_port -> bastion:22 -> bastion_localhost:remote_port(tinyproxy) -> cluster_host:6443
131
133
  tunnel = SSHTunnelForwarder(
132
134
  ssh_address_or_host=self._hostname,
133
135
  ssh_port=self._port,
134
136
  ssh_username=self._user,
135
137
  ssh_pkey=self._identity_file,
136
- remote_bind_address=(self._hostname, self._remote_port),
138
+ remote_bind_address=("localhost", self._remote_port),
137
139
  local_bind_address=("localhost", self._local_port),
138
140
  )
139
141
  tunnel.start()