-
Notifications
You must be signed in to change notification settings - Fork 2
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
[profile-controller] Move away from using namePrefix in kustomization #40
Comments
Shall we move this issue to kubeflow/kubeflow repo, because profile controller code is there? but anyway, I feel namePrefix is generally bad, will manifest WG be interested in enforcing everyone to not use it. |
It makes sense, let me move this issue to kubeflow/kubeflow repo. I agree that namePrefix is generally creating difficulty in terms of down stream kustomization. However, the scope of the issue will become too big if we want to fix everything https://github.com/kubeflow/manifests/search?p=1&q=namePrefix in KF 1.3 release. Therefore we will focus our scope to blocking item (profile controller) in this issue. And following up with other working group later on. |
Tagging the leads of Notebooks (who own profile controller) @kubeflow/wg-notebooks-leads |
@zijianjoy @Bobgy thanks for the report! I tried to reproduce such an issue locally, but couldn't.
Here is my example: https://github.com/yanniszark/tmp/tree/feature-kustomize-nameprefix |
Thank you @yanniszark for trying the patching! This issue happens under our existing profile manifest structure, so it doesn't necessary happen in a simple case. I would like to share minimal example with explanation about scenario of this issue. You can pull the minimal example here: Command to build (kustomize v4): Error: If I change https://github.com/zijianjoy/tmp/blob/jamxl-profiles/profiles/kustomization.yaml#L19 from Explanation My guess is that the namespaces are different in multiple overlay levels (kubeflow vs profiles-system namespace), which cause kustomize to act strangely to find the configMap target with namePrefix. Suggestion The fact that we need a minimal version to debug this issue also indicates that current profile manifest is complicated to debug and kustomize. Also note from the issue description that having namePrefix increase complexity to search the target resource in IDE, not to mention there are different namespaces in the overlay. Therefore avoid using |
Just wanted to mention that This indicates that there are 2 situations that would need addressing if
I'm willing to put in the effort to do this if we agree on the solution. |
@zijianjoy thanks for providing an example! I will try to reproduce. For 1.3, I don't think it's a blocking issue, would you agree? So in total two things:
|
Thank you Yannis! I agree it is not a blocking issue for Kubeflow 1.3. We should follow up on the right behavior later on. |
/priority p2 |
@jbottum: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
/transfer dashboard |
Higher KF 1.3 distribution issue: kubeflow/manifests#1798
Currently profile controller uses
profiles-
in its namePrefix to apply this prefix to all resources. See https://github.com/kubeflow/manifests/blob/master/apps/profiles/upstream/default/kustomization.yaml#L9.It creates difficulty and confusion to downstream kustomization, because the downstream patches will need to use the name without prefix while patching and using such resource, but the generated resource has name with prefix. The namePrefix notation is hidden in upstream manifest, and isolated from the resource definition, which creates difficulty when we want to search manifest using the complete resource name.
Example
Patch: See https://github.com/zijianjoy/gcp-blueprints/blob/match-upstream-share/apps/profiles/kustomization.yaml#L56. I want to replace the
profiles-config
configMap, but I need to call itconfig
instead. Because the upstream hasprofiles-
as namePrefix.Usage: Same as Patch, but it is even harder to locate the target resource because the usage itself is not kustomization.yaml, but namePrefix is in ancestor's kustomization.yaml, see PR: zijianjoy/gcp-blueprints@ef32634
Solution
Move away from using
namePrefix
, or applyprofiles-
prefix manually to all resources in the profile-controller manifests. Clear naming helps with downstream kustomization and resource keyword searching.cc @yanniszark @Bobgy
The text was updated successfully, but these errors were encountered: