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

Same app name for different Kinds #1409

Open
devdattakulkarni opened this issue Mar 9, 2025 · 1 comment
Open

Same app name for different Kinds #1409

devdattakulkarni opened this issue Mar 9, 2025 · 1 comment

Comments

@devdattakulkarni
Copy link
Contributor

devdattakulkarni commented Mar 9, 2025

How does Kubeplus handle the case where there are two Kinds and we try to create app instances with the same name for both the Kinds?

Given that we are using app name as the name of application's namespace, do we have to enforce unique app name in a cluster constraint?

Note that just checking if namespace with the provided app name exists or not is not enough. This is because if the NS exists, we treat customer action as an update operation. We have to check the meta.helm.sh/release-name annotation. Get the Kind name from the annotation. If the Kind name is different than the Kind name in app instance, then we can conclude that an app instance cannot be created with that name as an app instance with that name already exists in the cluster, and it belongs to a different Kind than the Kind provided in the app yaml.

@devdattakulkarni
Copy link
Contributor Author

devdattakulkarni commented Mar 10, 2025

Another way to handle this issue can be to change the logic of naming namespaces to use "kindname-appname" as the namespace name than just "appname". In fact, this will be also line up with how we are naming the underlying helm releases.

If we go with this change then everywhere where we are using the Namespace name as the app name, such as in kubectl plugins, we will have to update the code.

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

No branches or pull requests

1 participant