Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Permissive mode for MergeTarget? #21

Open
stanistan opened this issue Feb 23, 2022 · 0 comments
Open

Permissive mode for MergeTarget? #21

stanistan opened this issue Feb 23, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@stanistan
Copy link
Collaborator

Currently, once a MergeTarget manages a ConfigMap, any changes to the managed resource will be overwritten by CMMC. It might be useful to allow a permissive mode to the MergeTarget (probably per key), so that a change to the target, as long as it doesn't intersect with anything that CMMC is writing, will be persisted.

Rough notes here on how this could work during reconciliation:

  • we do all target CM data manipulation in MergeTarget.ReduceDataState
  • While the output of the target config map is deterministic generally, the order of the merge depends on the order of the MergeSourceList, and we can make sure that this has a deterministic order as well (a subtask).
  • If that merge order is deterministic, we should be able to do some simpler diffing to see what features has been added/removed given the prior Init state.
  • We probably want to update the Init state to reflect this.
  • If someone appends to the target CM, we currently have only one initial state, not a bunch of patches, so we would (in the current implementation), reorder the target. Does this matter? Would we be able to maintain this order going forward? Probably not since someone can then change contributing sources to add things so we might want to keep the simple thing here.
@stanistan stanistan added the enhancement New feature or request label Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant