qontract-reconcile 0.10.2.dev268__py3-none-any.whl → 0.10.2.dev270__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.
Files changed (60) hide show
  1. {qontract_reconcile-0.10.2.dev268.dist-info → qontract_reconcile-0.10.2.dev270.dist-info}/METADATA +1 -1
  2. {qontract_reconcile-0.10.2.dev268.dist-info → qontract_reconcile-0.10.2.dev270.dist-info}/RECORD +60 -60
  3. reconcile/aws_account_manager/integration.py +1 -1
  4. reconcile/aws_iam_keys.py +2 -1
  5. reconcile/aws_saml_idp/integration.py +2 -1
  6. reconcile/aws_saml_roles/integration.py +2 -1
  7. reconcile/aws_support_cases_sos.py +4 -1
  8. reconcile/cli.py +3 -2
  9. reconcile/dashdotdb_dvo.py +2 -1
  10. reconcile/dashdotdb_slo.py +4 -1
  11. reconcile/endpoints_discovery/integration.py +2 -1
  12. reconcile/gabi_authorized_users.py +2 -1
  13. reconcile/gitlab_owners.py +2 -1
  14. reconcile/gitlab_permissions.py +4 -1
  15. reconcile/glitchtip_project_dsn/integration.py +2 -1
  16. reconcile/integrations_manager.py +2 -1
  17. reconcile/ocm_clusters.py +2 -1
  18. reconcile/ocm_external_configuration_labels.py +2 -1
  19. reconcile/ocm_groups.py +2 -1
  20. reconcile/ocm_upgrade_scheduler_org_updater.py +6 -5
  21. reconcile/openshift_base.py +46 -28
  22. reconcile/openshift_clusterrolebindings.py +20 -6
  23. reconcile/openshift_groups.py +2 -1
  24. reconcile/openshift_limitranges.py +22 -12
  25. reconcile/openshift_namespace_labels.py +21 -5
  26. reconcile/openshift_namespaces.py +2 -1
  27. reconcile/openshift_network_policies.py +25 -6
  28. reconcile/openshift_prometheus_rules.py +2 -1
  29. reconcile/openshift_resourcequotas.py +21 -12
  30. reconcile/openshift_resources.py +2 -1
  31. reconcile/openshift_resources_base.py +3 -2
  32. reconcile/openshift_rhcs_certs.py +2 -1
  33. reconcile/openshift_rolebindings.py +34 -10
  34. reconcile/openshift_routes.py +11 -9
  35. reconcile/openshift_saas_deploy.py +3 -2
  36. reconcile/openshift_saas_deploy_trigger_cleaner.py +2 -1
  37. reconcile/openshift_saas_deploy_trigger_configs.py +2 -1
  38. reconcile/openshift_saas_deploy_trigger_images.py +2 -1
  39. reconcile/openshift_saas_deploy_trigger_moving_commits.py +2 -1
  40. reconcile/openshift_saas_deploy_trigger_upstream_jobs.py +2 -1
  41. reconcile/openshift_serviceaccount_tokens.py +2 -1
  42. reconcile/openshift_tekton_resources.py +2 -1
  43. reconcile/openshift_upgrade_watcher.py +2 -1
  44. reconcile/openshift_users.py +2 -1
  45. reconcile/openshift_vault_secrets.py +11 -9
  46. reconcile/skupper_network/integration.py +2 -1
  47. reconcile/terraform_aws_route53.py +2 -1
  48. reconcile/terraform_resources.py +3 -2
  49. reconcile/terraform_tgw_attachments.py +3 -2
  50. reconcile/terraform_users.py +2 -1
  51. reconcile/terraform_vpc_peerings.py +2 -1
  52. reconcile/utils/aws_api_typed/account.py +40 -8
  53. reconcile/utils/aws_api_typed/iam.py +19 -9
  54. reconcile/utils/constants.py +1 -0
  55. reconcile/utils/jinja2/utils.py +5 -4
  56. reconcile/utils/slo_document_manager.py +1 -1
  57. tools/app_interface_reporter.py +4 -1
  58. tools/cli_commands/container_images_report.py +3 -2
  59. {qontract_reconcile-0.10.2.dev268.dist-info → qontract_reconcile-0.10.2.dev270.dist-info}/WHEEL +0 -0
  60. {qontract_reconcile-0.10.2.dev268.dist-info → qontract_reconcile-0.10.2.dev270.dist-info}/entry_points.txt +0 -0
@@ -1,5 +1,6 @@
1
1
  import datetime
2
2
  import os
3
+ from collections.abc import Mapping
3
4
  from functools import cache
4
5
  from typing import Any, Self
5
6
 
@@ -116,7 +117,7 @@ def lookup_github_file_content(
116
117
  path: str,
117
118
  ref: str,
118
119
  tvars: dict[str, Any] | None = None,
119
- settings: dict[str, Any] | None = None,
120
+ settings: Mapping[str, Any] | None = None,
120
121
  secret_reader: SecretReaderBase | None = None,
121
122
  ) -> str:
122
123
  if tvars is not None:
@@ -194,7 +195,7 @@ def lookup_secret(
194
195
  version: str | None = None,
195
196
  tvars: dict[str, Any] | None = None,
196
197
  allow_not_found: bool = False,
197
- settings: dict[str, Any] | None = None,
198
+ settings: Mapping[str, Any] | None = None,
198
199
  secret_reader: SecretReaderBase | None = None,
199
200
  ) -> str | None:
200
201
  if tvars is not None:
@@ -225,7 +226,7 @@ def process_jinja2_template(
225
226
  body: str,
226
227
  vars: dict[str, Any] | None = None,
227
228
  extra_curly: bool = False,
228
- settings: dict[str, Any] | None = None,
229
+ settings: Mapping[str, Any] | None = None,
229
230
  secret_reader: SecretReaderBase | None = None,
230
231
  template_render_options: TemplateRenderOptions | None = None,
231
232
  ) -> Any:
@@ -276,7 +277,7 @@ def process_extracurlyjinja2_template(
276
277
  body: str,
277
278
  vars: dict[str, Any] | None = None,
278
279
  extra_curly: bool = True, # ignored. Just to be compatible with process_jinja2_template
279
- settings: dict[str, Any] | None = None,
280
+ settings: Mapping[str, Any] | None = None,
280
281
  secret_reader: SecretReaderBase | None = None,
281
282
  template_render_options: TemplateRenderOptions | None = None,
282
283
  ) -> Any:
@@ -14,6 +14,7 @@ from reconcile.gql_definitions.fragments.saas_slo_document import (
14
14
  SLOExternalPrometheusAccessV1,
15
15
  SLONamespacesV1,
16
16
  )
17
+ from reconcile.utils.constants import DEFAULT_THREAD_POOL_SIZE
17
18
  from reconcile.utils.rest_api_base import ApiBase, BearerTokenAuth
18
19
  from reconcile.utils.secret_reader import SecretReaderBase
19
20
 
@@ -21,7 +22,6 @@ PROM_QUERY_URL = "api/v1/query"
21
22
 
22
23
  DEFAULT_READ_TIMEOUT = 30
23
24
  DEFAULT_RETRIES = 3
24
- DEFAULT_THREAD_POOL_SIZE = 10
25
25
 
26
26
 
27
27
  class EmptySLOResultError(Exception):
@@ -28,6 +28,7 @@ from reconcile.cli import (
28
28
  threaded,
29
29
  )
30
30
  from reconcile.jenkins_job_builder import init_jjb
31
+ from reconcile.utils.constants import DEFAULT_THREAD_POOL_SIZE
31
32
  from reconcile.utils.jjb_client import JJB
32
33
  from reconcile.utils.mr import CreateAppInterfaceReporter
33
34
  from reconcile.utils.runtime.environment import init_env
@@ -179,7 +180,9 @@ class Report:
179
180
 
180
181
 
181
182
  def get_apps_data(
182
- date: datetime, month_delta: int = 1, thread_pool_size: int = 10
183
+ date: datetime,
184
+ month_delta: int = 1,
185
+ thread_pool_size: int = DEFAULT_THREAD_POOL_SIZE,
183
186
  ) -> list[dict]:
184
187
  settings = queries.get_app_interface_settings()
185
188
  secret_reader = SecretReader(settings)
@@ -11,6 +11,7 @@ from reconcile.typed_queries.app_interface_vault_settings import (
11
11
  get_app_interface_vault_settings,
12
12
  )
13
13
  from reconcile.typed_queries.namespaces import get_namespaces
14
+ from reconcile.utils.constants import DEFAULT_THREAD_POOL_SIZE
14
15
  from reconcile.utils.oc_filters import filter_namespaces_by_cluster_and_namespace
15
16
  from reconcile.utils.oc_map import OCMap, init_oc_map_from_namespaces
16
17
  from reconcile.utils.secret_reader import create_secret_reader
@@ -30,7 +31,7 @@ class NamespaceImages(BaseModel):
30
31
  def get_all_pods_images(
31
32
  cluster_name: Sequence[str] | None = None,
32
33
  namespace_name: Sequence[str] | None = None,
33
- thread_pool_size: int = 10,
34
+ thread_pool_size: int = DEFAULT_THREAD_POOL_SIZE,
34
35
  use_jump_host: bool = True,
35
36
  include_pattern: str | None = None,
36
37
  exclude_pattern: str | None = None,
@@ -72,7 +73,7 @@ def fetch_pods_images_from_namespaces(
72
73
  oc_map: OCMap,
73
74
  include_pattern: str | None = None,
74
75
  exclude_pattern: str | None = None,
75
- thread_pool_size: int = 10,
76
+ thread_pool_size: int = DEFAULT_THREAD_POOL_SIZE,
76
77
  ) -> list[dict[str, Any]]:
77
78
  all_namespace_images = threaded.run(
78
79
  func=_get_namespace_images,