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

Fix custom Katib DB Manager env variables #1102

Merged

Conversation

andreyvelich
Copy link
Member

Fixes this comment: #981 (comment).

If users want to use their own DB Manager, they must specify these env variables in Katib controller and Katib UI manifests:

KATIB_DB_MANAGER_SERVICE_NAMESPACE = <db manager namespace>
KATIB_DB_MANAGER_SERVICE_IP = <db manager ip (service name)>
KATIB_DB_MANAGER_SERVICE_PORT = <db manager port>

Also, if user specifies KATIB_DB_MANAGER_SERVICE_NAMESPACE='', we will use KATIB_DB_MANAGER_SERVICE_IP:KATIB_DB_MANAGER_SERVICE_PORT for DB manager address .

This might be useful, if user needs to send metrics to DataBase which is not deployed in Kubernetes.

I tried to deploy katib-db-manager in the different namespace than katib-controller. After set correct env, metrics got collected.

In the next PR I will create doc about all env variables that can be specifying in the manifest.

What do you think @johnugeorge @gaocegege @hougangliu ?

/cc @kunalyogenshah

@k8s-ci-robot
Copy link

@andreyvelich: GitHub didn't allow me to request PR reviews from the following users: kunalyogenshah.

Note that only kubeflow members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Fixes this comment: #981 (comment).

If users want to use their own DB Manager, they must specify these env variables in Katib controller and Katib UI manifests:

KATIB_DB_MANAGER_SERVICE_NAMESPACE = <db manager namespace>
KATIB_DB_MANAGER_SERVICE_IP = <db manager ip (service name)>
KATIB_DB_MANAGER_SERVICE_PORT = <db manager port>

Also, if user specifies KATIB_DB_MANAGER_SERVICE_NAMESPACE='', we will use KATIB_DB_MANAGER_SERVICE_IP:KATIB_DB_MANAGER_SERVICE_PORT for DB manager address .

This might be useful, if user needs to send metrics to DataBase which is not deployed in Kubernetes.

I tried to deploy katib-db-manager in the different namespace than katib-controller. After set correct env, metrics got collected.

In the next PR I will create doc about all env variables that can be specifying in the manifest.

What do you think @johnugeorge @gaocegege @hougangliu ?

/cc @kunalyogenshah

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.

@kubeflow-bot
Copy link

This change is Reviewable

}

return dbManagerIP + ":" + dbManagerPort
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this logic be used anytime?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be used when namespace is explicitly set to empty,

@johnugeorge
Copy link
Member

/lgtm

@johnugeorge
Copy link
Member

/cc @gaocegege

@@ -126,4 +135,11 @@ var (
DefaultKatibNamespace = env.GetEnvOrDefault(DefaultKatibNamespaceEnvName, "kubeflow")
// DefaultComposer is the default composer of katib suggestion.
DefaultComposer = env.GetEnvOrDefault(DefaultKatibComposerEnvName, "General")

// DefaultKatibDBManagerServiceNamespace is the default namespace of Katib DB Manager
DefaultKatibDBManagerServiceNamespace = env.GetEnvOrDefault(DefaultKatibDBManagerServiceNamespaceEnvName, DefaultKatibNamespace)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I think we should illustrate the relationship between DefaultKatibNamespace and DefaultKatibDBManagerServiceNamespace in the doc in the future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I will create doc about all env variables in Katib components today

Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gaocegege

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 367841b into kubeflow:master Mar 24, 2020
sperlingxx pushed a commit to sperlingxx/katib that referenced this pull request Jul 9, 2020
* Fix custom Katib DB Manager info

* Change names for Katib db manager env
@andreyvelich andreyvelich deleted the issue-981-fix-custom-db-manager-port branch October 6, 2021 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants