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

Add support for Kustomize components #412

Merged
merged 1 commit into from
Dec 2, 2022
Merged

Add support for Kustomize components #412

merged 1 commit into from
Dec 2, 2022

Conversation

klausenbusk
Copy link
Contributor

Ref: fluxcd/kustomize-controller#753

Signed-off-by: Kristian Klausen [email protected]

@stefanprodan
Copy link
Member

Hey @klausenbusk can you please add here the tests you wrote.

@klausenbusk
Copy link
Contributor Author

Hey @klausenbusk can you please add here the tests you wrote.

I have added the test back. I'm not sure if we want to use interface{}? If we want to use kustypes.Kustomization we need to do some PR juggling.

@stefanprodan
Copy link
Member

stefanprodan commented Nov 18, 2022

We can't use the API types in pkg, that would get us to cyclic dependency between the controller and pkg which would break go.mod.

@stefanprodan stefanprodan added area/kustomize Kustomize related issues and pull requests enhancement New feature or request labels Nov 23, 2022
@klausenbusk
Copy link
Contributor Author

I'm not sure the fuzz failure is related to this change:

+ cd addimport
/src/build.sh: line 38: cd: addimport: No such file or directory
+ cleanup

@stefanprodan
Copy link
Member

@klausenbusk we can ignore the fuzzers, these were broken upstream and we're going to fix them in a different PR.

@stefanprodan stefanprodan requested a review from souleb November 23, 2022 08:57
@souleb
Copy link
Member

souleb commented Nov 23, 2022

I have run the tests in flux2 with this PR, and it passes successfully.

@stefanprodan
Copy link
Member

Fuzzing has been fixed in main, please rebase.

@klausenbusk
Copy link
Contributor Author

Any idea why the test is failing on macos-12 https://github.com/fluxcd/pkg/actions/runs/3539040439/jobs/5940762510?

@stefanprodan
Copy link
Member

@klausenbusk use:

func testTempDir(t *testing.T) (string, error) {
	tmpDir := t.TempDir()

	tmpDir, err := filepath.EvalSymlinks(tmpDir)
	if err != nil {
		return "", fmt.Errorf("error evaluating symlink: '%w'", err)
	}

	return tmpDir, err
}

instead of t.TempDir()

Copy link
Member

@souleb souleb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @klausenbusk for the PR 🙇‍♂️

@klausenbusk
Copy link
Contributor Author

Do you need more from me, before this can be merged? :)

@pjbgf
Copy link
Member

pjbgf commented Dec 2, 2022

@klausenbusk please rebase so we can go ahead with the merge.

@klausenbusk
Copy link
Contributor Author

Rebased :)

Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @klausenbusk! 🙇

@pjbgf pjbgf merged commit fa4f4c7 into fluxcd:main Dec 2, 2022
@klausenbusk klausenbusk deleted the components branch December 2, 2022 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kustomize Kustomize related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants