qontract-reconcile 0.10.2.dev114__py3-none-any.whl → 0.10.2.dev116__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.dev114
3
+ Version: 0.10.2.dev116
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
@@ -61,7 +61,7 @@ reconcile/ocm_groups.py,sha256=nz6n4a0ZVDClpm1HbPfcwJ8fw3AYg7o4DCH-SBItVbs,3389
61
61
  reconcile/ocm_machine_pools.py,sha256=iiqReJMdzmvl9Ae0X1nT48WyROAoLS4pcI4Wk9NdWE0,16637
62
62
  reconcile/ocm_update_recommended_version.py,sha256=Vi3Y2sX-OQxx1mv_xiPQXnmrpsZzGIE38No0yBcTaD4,4204
63
63
  reconcile/ocm_upgrade_scheduler_org_updater.py,sha256=aLgyInt9oIWAg0XtCiwJRUSwdPx3masKV8kHzkyEEOQ,4282
64
- reconcile/openshift_base.py,sha256=A_QP43K0S8W8YcA7C3g5d0VGZ6GZAH_4Q7Sl62J9zOo,52606
64
+ reconcile/openshift_base.py,sha256=u8txhSciKi0ptsjzDplNMa4ykUcdlDu5gG-qU04Qiwc,52829
65
65
  reconcile/openshift_cluster_bots.py,sha256=AmCLCrlsZ_Wd5qMPzlv-O01i47WGJuojEc-Jgt2n77c,10942
66
66
  reconcile/openshift_clusterrolebindings.py,sha256=sDgHi_t2ayE3O6zZ5CLao7uBmihxRK8K70w2GSADz-w,5822
67
67
  reconcile/openshift_groups.py,sha256=2crqdhTOMw-21VMNhsOnKySyAWLxqAwGfiVLxL7ejx8,9329
@@ -769,7 +769,7 @@ tools/sd_app_sre_alert_report.py,sha256=jQpJdXVID68bSNtJNOGDh0-ei1CfEUS4Itr4MAaB
769
769
  tools/template_validation.py,sha256=qpKYaTgk0GOPGa2Ct5_5sKdwIHtCAKIBGzsMPuJU5fw,3371
770
770
  tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
771
771
  tools/cli_commands/container_images_report.py,sha256=SXh6sZ1dXXzd-2R5eeBufCtW3J4-Y55--0MZLdo4lr8,5409
772
- tools/cli_commands/erv2.py,sha256=VxUlNXllo947UwmtvS-42IeI9x_t_X3MHrrSI3K_GRo,23274
772
+ tools/cli_commands/erv2.py,sha256=qojYCTope8ao-NBQVITs5Kd4mJBjRLNZwfvrV-Eov9w,23770
773
773
  tools/cli_commands/gpg_encrypt.py,sha256=JWwds_Qg7KhSJMIGUh8TfI5-Jf17iUtmaEi4kWJxfVE,4907
774
774
  tools/cli_commands/systems_and_tools.py,sha256=EMHOF1AtUDaoSk0bbjl6oUKYAz4rTZjIBaF-6E6GspM,16816
775
775
  tools/cli_commands/cost_report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -791,7 +791,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
791
791
  tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
792
792
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
793
793
  tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
794
- qontract_reconcile-0.10.2.dev114.dist-info/METADATA,sha256=47y9PHHGLYoNtOBWDmFYOIpvSOOtwueDj-VZZ5_dRt8,24566
795
- qontract_reconcile-0.10.2.dev114.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
796
- qontract_reconcile-0.10.2.dev114.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
797
- qontract_reconcile-0.10.2.dev114.dist-info/RECORD,,
794
+ qontract_reconcile-0.10.2.dev116.dist-info/METADATA,sha256=MlYTARHmyM7Bmlh6v0xryMyrI4J5ggUbY_I9vlBYjpM,24566
795
+ qontract_reconcile-0.10.2.dev116.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
796
+ qontract_reconcile-0.10.2.dev116.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
797
+ qontract_reconcile-0.10.2.dev116.dist-info/RECORD,,
@@ -443,6 +443,11 @@ def apply(
443
443
  # spec.selector changes
444
444
  current_resource = oc.get(namespace, resource_type, resource.name)
445
445
 
446
+ if current_resource["spec"]["strategy"]["type"] == "Recreate":
447
+ oc.delete(namespace, resource_type, resource.name)
448
+ oc.create(namespace, resource=annotated)
449
+ return
450
+
446
451
  # check update strategy
447
452
  if current_resource["spec"]["strategy"]["type"] != "RollingUpdate":
448
453
  logging.error(
@@ -266,6 +266,12 @@ class Erv2Cli:
266
266
  [
267
267
  "docker",
268
268
  "run",
269
+ "-e",
270
+ "TERRAFORM_MODULE_WORK_DIR=/tmp/migration",
271
+ "-e",
272
+ "BACKEND_TF_FILE=/tmp/migration/backend.tf",
273
+ "-e",
274
+ "TF_VARS_FILE=/tmp/migration/terraform.tfvars.json",
269
275
  "--name",
270
276
  "erv2-unlock",
271
277
  "--rm",
@@ -279,7 +285,11 @@ class Erv2Cli:
279
285
  "/bin/bash",
280
286
  self.image,
281
287
  "-c",
282
- f"cdktf synth && cd cdktf.out/stacks/CDKTF/ && terraform init && terraform force-unlock -force '{lock_id}'",
288
+ "mkdir -p $TERRAFORM_MODULE_WORK_DIR;"
289
+ "cp -rf module/* $TERRAFORM_MODULE_WORK_DIR;"
290
+ "generate-tf-config && "
291
+ "terraform -chdir=$TERRAFORM_MODULE_WORK_DIR init && "
292
+ f"terraform -chdir=$TERRAFORM_MODULE_WORK_DIR force-unlock -force '{lock_id}'",
283
293
  ],
284
294
  check=True,
285
295
  )