-
Notifications
You must be signed in to change notification settings - Fork 896
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
Katib move db to overlay disable loadrestrictions #986
Katib move db to overlay disable loadrestrictions #986
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
9eb235f
to
659b16a
Compare
659b16a
to
c27bd36
Compare
/assign @yanniszark Since this disables the load restrictions, it probably makes sense for @jlewi to approve this. Hope doing this here is fine, given that it seems to be the only solution and http://bit.ly/kf_kustomize_v3 suggestes doing this in the future anyways |
@discordianfish Where are you disabling the load restrictor? In the tests? That seems fine to me. Someone on the Katib team should review overall layout of the katib package. |
btw, this is based upon #1055 - so we can either merge this as is or that one first and I'll rebase, up to you. |
Thanks. I LGTM'd #1055. |
c27bd36
to
7f32bd6
Compare
@jlewi Yes, that created a mess on this PR that failed tests. |
No tests? Hrm.. /retest |
Ok, tests passed. @yanniszark can you review? |
/assign @gaocegege @gaocegege Does someone from Katib want to take a look at this? |
@@ -24,14 +24,6 @@ spec: | |||
- name: katib-db-manager | |||
image: gcr.io/kubeflow-images-public/katib/v1alpha3/katib-db-manager | |||
imagePullPolicy: IfNotPresent | |||
env: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure that we can move Katib mysql DB to the overlay currently.
Katib db manager will not work without running Katib mysql deployment.
In that case, if user wants to deploy Katib using the base from manifests repository without other Kubeflow components and overlays, how he can do it?
What do you think @gaocegege @johnugeorge @richardsliu ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreyvelich I'm following the same pattern here as in #673 - if this isn't a problem there, why is is a problem here?
Yes, the/some db overlay is required but this is required in many other manifests as well. What is the problem with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am no sure how metadata connects with the DB, but Katib DB Manager can't work without mysql DB.
If users want to use their own DB (not mysql), they must create custom DB manager.
@johnugeorge @jlewi Do we have use-case when user deploys Katib from Manifest repository from the base folder, or in that case user will use manifest folder from the Katib repository?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreyvelich Yes, that's true. A user either needs to use the db overlay here, to get the bundled database, or a custom overlay for their custom database setup.
Maybe it helps to clarify by providing our overlay as example (it uses RDS but that shouldn't matter):
kustomization.yaml:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base
patchesStrategicMerge:
- katib-db-manager-deployment.yaml
katib-db-manager-deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: katib-db-manager
spec:
template:
spec:
containers:
- name: katib-db-manager
env:
- name: DB_NAME
value: mysql
- name: KATIB_MYSQL_DB_DATABASE
value: katib_production
- name: KATIB_MYSQL_DB_HOST
valueFrom:
secretKeyRef:
name: db-secrets
key: MYSQL_HOST
- name: DB_USER
valueFrom:
secretKeyRef:
name: db-secrets
key: MYSQL_USER_NAME
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-secrets
key: MYSQL_ROOT_PASSWORD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, should we also move Katib DB Manager to the overlay?
For example, if user wants to use not mysql DB ? How he can do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a composition pattern work better here? It looks like we have three sub-applications
- Katib controller (+ associated resources) e.g. RBAC
- DB manager
- A MySQL itself.
What if each of those components was their own Kustomize package and then we used Kustomize to compose those applications into different configurations so we'd have
- One for standalone - Which would combine all three and add an overlays to configure DB Manager to work with MySQL
- One for an external DB which would combine the first two
- I'm guessing user would have to add in their own overlays to specify custom information
To put this another way, with these changes why is the MySQL DB an overlay on the "base" package? With the changes in this PR the base package is defining the controller and some other core resources. It doesn't look like the MySQL DB is actually modifying any of those resources.
Should we do the composition in KFDefs or should we define a new kustomize package e.g. "standalone" which combines istio, application, db-manager, and db-mysql packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jlewi If we create three sub-application, each of them will have base, right?
Like we did with crd: https://github.com/kubeflow/manifests/tree/master/katib/katib-crds.
In that case, how user can install Katib standalone?
Run kustomize build
in each folder:
- katib-controller
- db-manager
- db-mysql
- katib-crds
Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know what you decide, until then I'll put this on hold and and we'll change our strategy to maintaining a fork of manifests instead of just adding our overlays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreyvelich You can use kustomize to compose kustomize packages. A resource can be a path to a folder containing a kustomization.yaml file. You can have multiple such folders listed in resources provided each unique resource is defined only in folder. (You would use patches to modify a resource).
So you can define a standalone package that would incorporate the other three.
The kustomize would look like
resources:
- <path>/<to>/katib-controller
- <path>/<to>/db-manager
- <path>/<to>/db-mysql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jlewi I am fine with this approach. Then as @jlewi mentioned before, we can create overlays to patch DB Manager deployment with appropriate DB.
What do you think @johnugeorge @richardsliu @gaocegege ?
7f32bd6
to
734b896
Compare
e019c9e
to
4bb8130
Compare
Now the tests fail. Hopefully #1104 will fix this. Can we avoid broaden the scope of a two month old PR every time? This doesn't seem to be a good strategy, given how much in flux everything else it. |
similar to kubeflow#673, this allows users to create their own overlay to use external databases.
We need to base katib-db-manager's ibm-storage overlay on the db overlay. This is prevented by RestrictionRootOnly, so this lifts this restriction.
fee1427
to
3476c3c
Compare
@discordianfish: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Replaced by #1141 |
Which issue is resolved by this Pull Request:
Resolves #904
Description of your changes:
This is an alternative to #910 but I can't get the tests to pass because some assumptions on how the tests are built. If this is the preferred way over #910, please advise on how to change the test generation etc to make it work.
Checklist:
cd manifests/tests
make generate-changed-only
make test
This change is