Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssa: Align ResourceManager.Diff skipping resources with ResourceManager.Apply #862

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

YvanGuidoin
Copy link

@YvanGuidoin YvanGuidoin commented Jan 30, 2025

Solving: fluxcd/flux2#5163

Aligns ssa DiffOptions to ApplyOptions when diffing with ResourceManager

Will allow to modify diffing behavior in https://github.com/fluxcd/flux2/blob/e09ba7a8e60eb5f7be633acfee7b6c265244dc09/internal/build/diff.go#L100
to:

diffOptions := ssa.DiffOptions{
	Exclusions: map[string]string{
		"kustomize.toolkit.fluxcd.io/reconcile": "disabled",
		"kustomize.toolkit.fluxcd.io/ssa":       "ignore",
	},
	IfNotPresentSelector: map[string]string{
		"kustomize.toolkit.fluxcd.io/ssa": "ifnotpresent",
	},
}

to align to kustomize-controller behavior
https://github.com/fluxcd/kustomize-controller/blob/59676860b8cb5bb25db94efc7dea8b75f5966998/internal/controller/kustomization_controller.go#L678

@YvanGuidoin YvanGuidoin force-pushed the rework-ssa-diffoptions branch from 6e7b935 to 0c1bb57 Compare January 30, 2025 16:33
@YvanGuidoin YvanGuidoin force-pushed the rework-ssa-diffoptions branch from 6986ef5 to 53daa30 Compare January 30, 2025 17:41
@YvanGuidoin YvanGuidoin marked this pull request as ready for review January 30, 2025 17:54
@YvanGuidoin YvanGuidoin changed the title ssa: Align ResourceManager.Diff Skipping resources with ResourceManager.Apply ssa: Align ResourceManager.Diff skipping resources with ResourceManager.Apply Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant