Katib manifests v3 version#1124
Conversation
|
Thanks.
Probably easier to do it a follow on PR. Smaller PRs are easier to deal with and this way if the manifest breaks GCP stacks we can just revert that PR and not the full PR.
For clusterDomain I'm not sure we want to make the name application specific. The point of using the same vars across the applications is to allow the values to be defined once and consistently set across all applications. So I think the pattern you want is to have 2 versions of the package
These packages should share resources either through a common base package or by referencing the same YAML files. You can take a look at the jupyter package
How is this being used? Is this internal to the package; i.e. its not being used to allow the user to set something but just a way to force kusotmize to substitute the namespace into a field where otherwise it currently wouldn't get substituted? If it is then this is a good pattern. |
jlewi
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 73 files reviewed, 3 unresolved discussions (waiting on @andreyvelich, @gaocegege, and @richardsliu)
katib/katib-controller/base/kustomization.yaml, line 37 at r1 (raw file):
newName: mysql vars: - name: katib-ui-clusterDomain
This should probably stay with clusterDomain so it can be set once in the stack across all applications
katib/katib-controller/base/kustomization.yaml, line 44 at r1 (raw file):
fieldref: fieldpath: data.katib-ui-clusterDomain - name: katib-ui-namespace
This is largely internal to the project; you are just using
katib/katib-controller/v3/kustomization.yaml, line 37 at r1 (raw file):
commonLabels: app.kubernetes.io/component: katib app.kubernetes.io/instance: katib-controller-0.8.0
Remove version from the instance label and remove version as a common label.
See comment here:
kubeflow/kfctl#304 (comment)
|
How does this relate to @discordianfish's PR #986 ? As discussed in #986 can we split katib into separate kustomize packages for the controller and the DB and then use composition to combine them? So that we can support incluster and external DBs? |
Change katib-ui-clusterDomain to clusterDomain Remove common label version from v3 kustomize
|
@jlewi Thank you for your review.
|
Yes, and it always must be |
We can merge #986 PR first. |
|
If we merge #986 first is that creating more work in the long run? Per the discussion in the review thread The suggestion was to have separate kustomize packages for
And then use a top level package to compose this into a single package. This way the controller and db-manager packages could be reused in the case of a different backend. #985 is making db-manager an overlay. My suggestion would be to do something like the following. In this PR define
Each have these kustomize packages should pull in resources from base (like your v3) package is doing now. You can then change the v3 package to compose these three kustomize packages. (Maybe rename it to something like standalone?). This package should also define a patch for the db-manager as in This would largely cover @discordianfish's changes to support the external DB case. The one other change is you need to change |
| kind: Kustomization | ||
| namespace: kubeflow | ||
| resources: | ||
| - ../base/katib-configmap.yaml |
There was a problem hiding this comment.
So per comment: #1124 (comment)
I think this should be something like
resources:
- ../katib-system
- ../katib-db-manager
- ../katib-mysql
The resources listed here would then move into the respective packages.
patchesStrategicMerge
There was a problem hiding this comment.
Yes I agree, we can use patch here.
What do you think @discordianfish, can you make these changes in #986 PR?
There was a problem hiding this comment.
I think in #986 @discordianfish said he didn't have time to make any additional changes. So maybe @andreyvelich you could just make the changes in this PR? Or a follow on PR?
There was a problem hiding this comment.
I was waiting for you to settle on one way to do it. But now it's probably better to merge this here first. I can look into a new PR to change this.
Yes I think we should go ahead and remove the mutable bits from the commonLabels from the application resource |
I removed versions from Katib controller Application and Katib Crd Application |
|
@jlewi What do you think about |
jlewi
left a comment
There was a problem hiding this comment.
katib-ui-namespace
I think it needs to be "katib-ui-namespace". vars need to be unique globally. So if we use a generic name like namespace it will end up conflicting.
|
/lgtm @andreyvelich On my end I'm happy with this PR as is. I think we still need to refactor the manifests to support external DB but I'm ok with doing that in a follow on PR. Ideally someone focused on katib would LGTM this PR as well. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlewi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sure, I will update it in the following PR. Thank you for the review. |
|
Based on the comment #1124 (comment) , @discordianfish will do it in a new PR. Thanks @discordianfish Merging this /hold cancel |
Fixes: #1092.
For Katib manifest v3 version:
I Created
v3folder for Katib crds and Katib controller.For Katib crds kustomize manifest includes all base resources and application overlay.
Katib crds kustomize has
commonLabelsfor each crd component.For Katib controller kustomize manifests includes all base resources, application and istio overlay.
Katib controller kustomize has
commonLabelsfor each controller component.Katib controller kustomize has
imagesto specify images for Katib controller components.I renamed
clusterDomaintokatib-ui-clusterDomainandnamespacetokatib-ui-namespaceto make these variables unique. @jlewi What do you think about this change?Katib controller kustomize has
configurationsto identifykatib-ui-clusterDomainvariable.I didn't add these params to Katib controller kustomize, as we did here. I am not sure that it is needed.
I didn't add
generatorOptions: disableNameSuffixHash: trueto v3 kustomize manifests. Is it necessary?I added Katib v3 manifest to GCP example stacks. @jlewi Do we need to make it in this PR?
I didn't add ibm-storage-config to v3 manifest, since it is related only to IBM kfdef. We can create this patch later.
/assign @jlewi @johnugeorge
/cc @gaocegege @richardsliu
Checklist:
cd manifests/testsmake generate-changed-onlymake test