qontract-reconcile 0.10.1rc903__py3-none-any.whl → 0.10.1rc905__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.1rc903
3
+ Version: 0.10.1rc905
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
@@ -10,7 +10,7 @@ reconcile/aws_iam_password_reset.py,sha256=q96mwr2KeEQ5bpNniGlgIMZTxiuLSodcYfX-t
10
10
  reconcile/aws_support_cases_sos.py,sha256=Jk6_XjDeJSYxgRGqcEAOcynt9qJF2r5HPIPcSKmoBv8,2974
11
11
  reconcile/blackbox_exporter_endpoint_monitoring.py,sha256=O1wFp52EyF538c6txaWBs8eMtUIy19gyHZ6VzJ6QXS8,3512
12
12
  reconcile/checkpoint.py,sha256=_JhMxrye5BgkRMxWYuf7Upli6XayPINKSsuo3ynHTRc,5010
13
- reconcile/cli.py,sha256=YHpIxOaOuRlpBCXtlbiJR2fRjAMK0_4vJULYnRO9CS4,105636
13
+ reconcile/cli.py,sha256=W4lRKuz6Z_EHXLf-mQLb3mVdcAr23H4JrY-R8UUPBbs,105862
14
14
  reconcile/closedbox_endpoint_monitoring_base.py,sha256=rLh16BOlBOxTmJ8Si3wWyyEpmMlhh4Znx1Gc36qsmOc,4865
15
15
  reconcile/cluster_deployment_mapper.py,sha256=5gumAaRCcFXsabUJ1dnuUy9WrP_FEEM5JnOnE8ch9sE,2326
16
16
  reconcile/dashdotdb_base.py,sha256=4gJ_VXOOPXPNrJIkSlOr8N1PD60ciZZqSBobNPhXvUA,4768
@@ -460,10 +460,10 @@ reconcile/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
460
460
  reconcile/templates/aws_access_key_email.j2,sha256=2MUr1ERmyISzKgHqsWYLd-1Wbl-peUa-FsGUS-JLUFc,238
461
461
  reconcile/templates/email.yml.j2,sha256=OZgczNRgXPj2gVYTgwQyHAQrMGu7xp-e4W1rX19GcrU,690
462
462
  reconcile/templates/jira-checkpoint-missinginfo.j2,sha256=c_Vvg-lEENsB3tgxm9B6Y9igCUQhCnFDYh6xw-zcIbU,570
463
- reconcile/templates/rosa-classic-cluster-creation.sh.j2,sha256=0UHfYtXRVJqP07VJQx456cRI6EbZNBgamtP_8nb4WPY,2353
464
- reconcile/templates/rosa-hcp-cluster-creation.sh.j2,sha256=O7Bf3WQIJhsZoEqaYA0wRktUO4yXXCb4BQkuvvp-C80,2385
463
+ reconcile/templates/rosa-classic-cluster-creation.sh.j2,sha256=FVBmnR2FmVModhqOYNBInhF8zk0Qnj9og9KHK5-X9v0,2361
464
+ reconcile/templates/rosa-hcp-cluster-creation.sh.j2,sha256=2wTdv9qvapCvT8NSi_hq8sXhpFSaxRX-V6Cao1diCI8,2393
465
465
  reconcile/templating/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
466
- reconcile/templating/renderer.py,sha256=nras4EkJeyMwJ86R4FB0xGX0TcLfjYxT4bTuA3Glfx0,11773
466
+ reconcile/templating/renderer.py,sha256=VQVsQxMjKfftpsgzpd1jJ-bhrsgi8zjDYXYzMfI4vZA,12104
467
467
  reconcile/templating/validator.py,sha256=L_5kvY1LJTNQUmhPZZoB62NBiTKFIjlia0j6jZGdvh8,4660
468
468
  reconcile/templating/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
469
469
  reconcile/templating/lib/merge_request_manager.py,sha256=4oe3EwQOP7CZSraocivbRzzOuVb0ooElaUS2_DGsF50,5603
@@ -844,8 +844,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
844
844
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
845
845
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
846
846
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
847
- qontract_reconcile-0.10.1rc903.dist-info/METADATA,sha256=QgYM0oAbfqU7mww6y7jdutLhODRmNRu-4lObfhbELWw,2273
848
- qontract_reconcile-0.10.1rc903.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
849
- qontract_reconcile-0.10.1rc903.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
850
- qontract_reconcile-0.10.1rc903.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
851
- qontract_reconcile-0.10.1rc903.dist-info/RECORD,,
847
+ qontract_reconcile-0.10.1rc905.dist-info/METADATA,sha256=t9W3lYOhQs8JRlCCTLY5vOjOq9a873n2cSf7oLNSFrg,2273
848
+ qontract_reconcile-0.10.1rc905.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
849
+ qontract_reconcile-0.10.1rc905.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
850
+ qontract_reconcile-0.10.1rc905.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
851
+ qontract_reconcile-0.10.1rc905.dist-info/RECORD,,
reconcile/cli.py CHANGED
@@ -2083,8 +2083,15 @@ def template_validator(ctx):
2083
2083
  help="Path to a folder app-interface repo should be cloned to. Use this for regular integration run.",
2084
2084
  default=False,
2085
2085
  )
2086
+ @click.option(
2087
+ "--template-collection-name",
2088
+ help="specific template collection name to render",
2089
+ required=False,
2090
+ )
2086
2091
  @click.pass_context
2087
- def template_renderer(ctx, app_interface_data_path, clone_repo):
2092
+ def template_renderer(
2093
+ ctx, app_interface_data_path, clone_repo, template_collection_name
2094
+ ):
2088
2095
  from reconcile.templating.renderer import (
2089
2096
  TemplateRendererIntegration,
2090
2097
  TemplateRendererIntegrationParams,
@@ -2095,6 +2102,7 @@ def template_renderer(ctx, app_interface_data_path, clone_repo):
2095
2102
  TemplateRendererIntegrationParams(
2096
2103
  app_interface_data_path=app_interface_data_path,
2097
2104
  clone_repo=clone_repo,
2105
+ template_collection_name=template_collection_name,
2098
2106
  )
2099
2107
  ),
2100
2108
  ctx=ctx.obj,
@@ -50,7 +50,7 @@ rosa create cluster -y --cluster-name={{ cluster_name }} \
50
50
  --operator-roles-prefix {{ cluster_name }} \
51
51
  --subnet-ids {{ cluster.spec.subnet_ids | join(",") }} \
52
52
  --region {{ cluster.spec.region }} \
53
- --version {{ cluster.spec.version }} \
53
+ --version {{ cluster.spec.initial_version }} \
54
54
  --machine-cidr {{ cluster.network.vpc }} \
55
55
  --service-cidr {{ cluster.network.service }} \
56
56
  --pod-cidr {{ cluster.network.pod }} \
@@ -44,7 +44,7 @@ rosa create cluster --cluster-name={{ cluster_name }} \
44
44
  --operator-roles-prefix {{ cluster_name }} \
45
45
  --subnet-ids {{ cluster.spec.subnet_ids | join(",") }} \
46
46
  --region {{ cluster.spec.region }} \
47
- --version {{ cluster.spec.version }} \
47
+ --version {{ cluster.spec.initial_version }} \
48
48
  --machine-cidr {{ cluster.network.vpc }} \
49
49
  --service-cidr {{ cluster.network.service }} \
50
50
  --pod-cidr {{ cluster.network.pod }} \
@@ -46,11 +46,14 @@ APP_INTERFACE_PATH_SEPERATOR = "/"
46
46
 
47
47
 
48
48
  def get_template_collections(
49
- query_func: Callable | None = None,
49
+ query_func: Callable | None = None, template_collection_name: str | None = None
50
50
  ) -> list[TemplateCollectionV1]:
51
+ variables: dict[str, Any] = {"filter": {}}
52
+ if template_collection_name:
53
+ variables["filter"]["name"] = template_collection_name
51
54
  if not query_func:
52
55
  query_func = gql.get_api().query
53
- return query(query_func).template_collection_v1 or []
56
+ return query(query_func, variables=variables).template_collection_v1 or []
54
57
 
55
58
 
56
59
  class FilePersistence(ABC):
@@ -193,6 +196,7 @@ def calc_template_hash(c: TemplateCollectionV1, variables: dict[str, Any]) -> st
193
196
  class TemplateRendererIntegrationParams(PydanticRunParams):
194
197
  clone_repo: bool = False
195
198
  app_interface_data_path: str | None
199
+ template_collection_name: str | None
196
200
 
197
201
 
198
202
  def join_path(base: str, sub: str) -> str:
@@ -284,8 +288,9 @@ class TemplateRendererIntegration(QontractReconcileIntegration):
284
288
  ruamel_instance: yaml.YAML,
285
289
  ) -> None:
286
290
  gql_no_validation = init_from_config(validate_schemas=False)
287
-
288
- for c in get_template_collections():
291
+ for c in get_template_collections(
292
+ template_collection_name=self.params.template_collection_name
293
+ ):
289
294
  for_each_items: list[dict[str, Any]] = [{}]
290
295
  if c.for_each and c.for_each.items:
291
296
  for_each_items = c.for_each.items