Skip to content

Use kustomization namespace for empty dependency source namespace#897

Merged
stefanprodan merged 1 commit intofluxcd:mainfrom
devholic:fix-implicit-src-namespace
Jun 23, 2023
Merged

Use kustomization namespace for empty dependency source namespace#897
stefanprodan merged 1 commit intofluxcd:mainfrom
devholic:fix-implicit-src-namespace

Conversation

@devholic
Copy link
Copy Markdown
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
Copy Markdown
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