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

Use kustomization namespace for empty dependency source namespace #897

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

devholic
Copy link
Contributor

Kustomize controller uses the namespace of the kustomization resource if the sourceRef is empty. However, this policy doesn't applied to dependencies. This can be problematic if the same named Sources without explicit namespace is in different namespace.

This commit fixes this issue by using kustomization's namespace when checking dependencies if the namespace in sourceRef is empty.

Kustomize controller uses the namespace of the kustomization resource
if the sourceRef is empty. However, this policy doesn't applied to
dependencies. This can be problematic if the same named `Sources`
without explicit namespace is in different namespace.

This commit fixes this issue by using kustomization's namespace when
checking dependencies if the namespace in sourceRef is empty.

Signed-off-by: Sunghoon Kang <me@hoon.dev>
@stefanprodan stefanprodan added the bug Something isn't working label Jun 23, 2023
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Great find, thanks @devholic for the fix 🥇

@stefanprodan stefanprodan merged commit 5216920 into fluxcd:main Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants