-
Notifications
You must be signed in to change notification settings - Fork 885
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
PSS labels for the profile controller #2778
Conversation
@biswajit-9776 where is profiles-system coming from? The patch should touch only the in the Kubeflow namespace at build time and you need to keep the existing labels https://github.com/kubeflow/manifests/blob/60348d70f1614d1661d365ae868c844f7bca5e3d/apps/profiles/upstream/base/namespace-labels.yaml#L15C1-L18C46 . When the cluster is running and new namespaces are generated dynamically, the labels from this file will be applied to each. |
No, it works differently. Please check out https://github.com/kubeflow/manifests/blob/60348d70f1614d1661d365ae868c844f7bca5e3d/apps/profiles/upstream/base/kustomization.yaml#L17C1-L20C26 to understand how the configuration map is created for the profile controller. You have to patch the config map for the dynamic stuff. At runtime the profile controller will use this configmap to create namespace of yet unknown names based on Profile CRs. The static patch for the kubeflow namespace is something completely different and belongs to the static folder. |
Okay I will push a commit later to this PR |
Okay so if our kustomize component is going to patch the https://github.com/kubeflow/manifests/blob/60348d70f1614d1661d365ae868c844f7bca5e3d/apps/profiles/upstream/base/namespace-labels.yaml with out PSS labels, can we do it by providing the path as resources to our kustomize component?
If not this then may I know which namespace the configmap namespace-labels-data is mounted to, in which case I can just patch the configmap with PSS labels to that namespace? |
Always consider that gpt4 or Gemini can guide you a bit on such general ideas ;-) Yes just try it and the profile controller and therefore the configmap is in the kubeflow namespace. |
Yeah it works now, but I'd also like to point out a few things that occurs with the above changes |
So, we have to use the below change in the base kustomization:
I tried without it and as a result the configMap instead of getting overridden, still exists along with a new configMap with our changes. |
After making the above change, I tried commenting the unrequired section of namespacea-labels.yam and after applying our component, I discovered this:
what I believe is that instead of adding the uncommented stuff, it replaced the everything else with the new stuff we tried to add. To deal with this temporarily, I wish to have an exact copy of base namespace-label.yaml in my component's directory along with PSS labels. |
Please investigate the officially documented behavior of merge in the configmapgenerator. We need to be sure. |
Signed-off-by: biswajit-9776 <[email protected]>
…ple.yaml Signed-off-by: biswajit-9776 <[email protected]>
Signed-off-by: biswajit-9776 <[email protected]>
Signed-off-by: biswajit-9776 <[email protected]>
Signed-off-by: biswajit-9776 <[email protected]>
Signed-off-by: biswajit-9776 <[email protected]>
Signed-off-by: biswajit-9776 <[email protected]>
Signed-off-by: biswajit-9776 <[email protected]>
548d511
to
cacf9bd
Compare
/hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: juliusvonkohout The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Should I rebase my branch locally and push it? |
/unhold |
* Patched PSS labels with profiles Signed-off-by: biswajit-9776 <[email protected]> * Patched profiles/upstream/base/namespace-labels.yaml and updated example.yaml Signed-off-by: biswajit-9776 <[email protected]> * Tried to override the base configMap Signed-off-by: biswajit-9776 <[email protected]> * Made changes for overriding base configMap with kustomize component Signed-off-by: biswajit-9776 <[email protected]> * Undone changes to profiles/upstream/base Signed-off-by: biswajit-9776 <[email protected]> * Added comments for duplicated file Signed-off-by: biswajit-9776 <[email protected]> * Resolved conflict Signed-off-by: biswajit-9776 <[email protected]> * Fixed yaml lint to example Signed-off-by: biswajit-9776 <[email protected]> --------- Signed-off-by: biswajit-9776 <[email protected]> Signed-off-by: Patrick Schönthaler <[email protected]>
Pull Request Template for Kubeflow manifests Issues
✏️ A brief description of the changes
📦 List any dependencies that are required for this change
🐛 If this PR is related to an issue, please put the link of the issue here.
✅ Unit Test Checklist
✅ Contributor checklist
DCO
check)cla/google
check)