Skip to content

Commit

Permalink
fix inventory policy and ssa settings
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Oct 17, 2023
1 parent ba77bc8 commit 9173d6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/sync/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (engine *Engine) processItem(item interface{}) error {
ServerSideOptions: common.ServerSideOptions{
// It's supported since Kubernetes 1.16, so there should be no reason not to use it.
// https://kubernetes.io/docs/reference/using-api/server-side-apply/
ServerSideApply: false,
ServerSideApply: true,
// GitOps repository is the source of truth and that's what we are applying, so overwrite any conflicts.
// https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts
ForceConflicts: true,
Expand All @@ -116,7 +116,7 @@ func (engine *Engine) processItem(item interface{}) error {
DryRunStrategy: common.DryRunNone,
PrunePropagationPolicy: metav1.DeletePropagationBackground,
PruneTimeout: time.Duration(0),
InventoryPolicy: inventory.PolicyMustMatch,
InventoryPolicy: inventory.PolicyAdoptIfNoInventory,
})
return engine.UpdateStatus(id, ch, true)
}
Expand Down

0 comments on commit 9173d6a

Please sign in to comment.