qontract-reconcile 0.10.2.dev478__py3-none-any.whl → 0.10.2.dev479__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.dev478
3
+ Version: 0.10.2.dev479
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
@@ -190,10 +190,10 @@ reconcile/external_resources/cloudflare.py,sha256=7Yq31L_enR-iyAAsVx_Z-QVbRjh_Gm
190
190
  reconcile/external_resources/factories.py,sha256=52GzEmEaLhriG0AQzHh0R8n3IwnGvwpxVCv8U0glGC4,8506
191
191
  reconcile/external_resources/integration.py,sha256=Fcc7MjixGx6bE6K4fgXx6yFomVoJavsOLhhDgL7VJgg,7040
192
192
  reconcile/external_resources/integration_secrets_sync.py,sha256=M2uOFi2JXWhiw3hQyE_4NVPQmPIYGHlghRti5eLWhkw,1738
193
- reconcile/external_resources/manager.py,sha256=dwDFqvN5GDnmSKBHVxQt2Wb4hspJQiS7gyITylA2Y8U,18856
193
+ reconcile/external_resources/manager.py,sha256=xf_FGCtgVHN8DnWUwMTX781E06Jnc1mxEce_qoii3Is,18757
194
194
  reconcile/external_resources/meta.py,sha256=RM8qGE6UoJR58nLqABReIJrrdmx4Tqt_OcdlT-QygGs,620
195
195
  reconcile/external_resources/metrics.py,sha256=ahvlgrc48B214NwBq-G6ncwQE3Qrtif61jtOrklfylQ,3903
196
- reconcile/external_resources/model.py,sha256=8kw2-Y0DxHpdNxaxdfM6xD_cyS40MElTHgfD-Sm2j2E,15405
196
+ reconcile/external_resources/model.py,sha256=XxdIpf4uznYaZzoO_9SYL3x73vFanUi1tAkWOjfzR_g,15503
197
197
  reconcile/external_resources/reconciler.py,sha256=-jXny_rFnUpPs_VFbA0Iig37-icOu-9i6R-KXjPuWb8,10150
198
198
  reconcile/external_resources/secrets_sync.py,sha256=vdcy2Ydz67pKkSHT2U0-Ucu9cxMr99r15RovLTxmoZU,16162
199
199
  reconcile/external_resources/state.py,sha256=zWla2_j6BI1FBrSPqRRfuo55bXK0QWAxtEeafb8ffTg,13811
@@ -803,7 +803,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
803
803
  tools/saas_promotion_state/saas_promotion_state.py,sha256=uQv2QJAmUXP1g2GPIH30WTlvL9soY6m9lefpZEVDM5w,3965
804
804
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
805
805
  tools/sre_checkpoints/util.py,sha256=KcYVfa3UmJHVP_ocgrKe8NkrO5IDB9aWEDydSokPcRk,975
806
- qontract_reconcile-0.10.2.dev478.dist-info/METADATA,sha256=vyQsjxw1NoAHqnLG1q2_-8QMpttGry95GFqp6ZdtNJc,24948
807
- qontract_reconcile-0.10.2.dev478.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
808
- qontract_reconcile-0.10.2.dev478.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
809
- qontract_reconcile-0.10.2.dev478.dist-info/RECORD,,
806
+ qontract_reconcile-0.10.2.dev479.dist-info/METADATA,sha256=S8y7PdpWCuc852MqrZRmjaXKWpQ-grJVtnuqlbn3NiI,24948
807
+ qontract_reconcile-0.10.2.dev479.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
808
+ qontract_reconcile-0.10.2.dev479.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
809
+ qontract_reconcile-0.10.2.dev479.dist-info/RECORD,,
@@ -318,6 +318,8 @@ class ExternalResourcesManager:
318
318
  if r.action == Action.APPLY:
319
319
  reconciliation_status.resource_status = (
320
320
  ResourceStatus.PENDING_SECRET_SYNC
321
+ if r.module_configuration.outputs_secret_sync
322
+ else ResourceStatus.CREATED
321
323
  )
322
324
  elif r.action == Action.DESTROY:
323
325
  reconciliation_status.resource_status = ResourceStatus.DELETED
@@ -377,13 +379,6 @@ class ExternalResourcesManager:
377
379
  state.reconciliation = r
378
380
  self.state_mgr.set_external_resource_state(state)
379
381
 
380
- def _need_secret_sync(
381
- self, r: Reconciliation, state: ExternalResourceState
382
- ) -> bool:
383
- return (
384
- r.action == Action.APPLY and state.resource_status == ResourceStatus.CREATED
385
- )
386
-
387
382
  def _sync_secrets(
388
383
  self,
389
384
  to_sync_keys: Iterable[ExternalResourceKey],
@@ -269,6 +269,7 @@ class ExternalResourceModuleConfiguration(BaseModel, frozen=True):
269
269
  version: str = ""
270
270
  reconcile_drift_interval_minutes: int = 1440
271
271
  reconcile_timeout_minutes: int = 1440 # same as https://developer.hashicorp.com/terraform/enterprise/application-administration/general#terraform-run-timeout-settings
272
+ outputs_secret_sync: bool = False
272
273
  outputs_secret_image: str = ""
273
274
  outputs_secret_version: str = ""
274
275
  resources: Resources = Resources()
@@ -335,6 +336,7 @@ class ExternalResourceModuleConfiguration(BaseModel, frozen=True):
335
336
  reconcile_drift_interval_minutes=module.reconcile_drift_interval_minutes,
336
337
  reconcile_timeout_minutes=module_overrides.reconcile_timeout_minutes
337
338
  or module.reconcile_timeout_minutes,
339
+ outputs_secret_sync=module.outputs_secret_sync,
338
340
  outputs_secret_image=module_overrides.outputs_secret_image
339
341
  or module.outputs_secret_image
340
342
  or settings.outputs_secret_image,