|
34 | 34 | class KatibClient(object):
|
35 | 35 | def __init__(
|
36 | 36 | self,
|
37 |
| - config_file: str = None, |
38 |
| - context: str = None, |
39 |
| - client_configuration: client.Configuration = None, |
| 37 | + config_file: Optional[str] = None, |
| 38 | + context: Optional[str] = None, |
| 39 | + client_configuration: Optional[client.Configuration] = None, |
40 | 40 | namespace: str = utils.get_default_target_namespace(),
|
41 | 41 | ):
|
42 |
| - """KatibClient constructor. |
| 42 | + """KatibClient constructor. Configure logging in your application |
| 43 | + as follows to see detailed information from the KatibClient APIs: |
| 44 | + .. code-block:: python |
| 45 | + import logging |
| 46 | + logging.basicConfig() |
| 47 | + log = logging.getLogger("kubeflow.katib.api.katib_client") |
| 48 | + log.setLevel(logging.DEBUG) |
43 | 49 |
|
44 | 50 | Args:
|
45 | 51 | config_file: Path to the kube-config file. Defaults to ~/.kube/config.
|
46 | 52 | context: Set the active context. Defaults to current_context from the kube-config.
|
47 | 53 | client_configuration: Client configuration for cluster authentication.
|
48 | 54 | You have to provide valid configuration with Bearer token or
|
49 |
| - with username and password. |
50 |
| - You can find an example here: https://github.com/kubernetes-client/python/blob/67f9c7a97081b4526470cad53576bc3b71fa6fcc/examples/remote_cluster.py#L31 |
51 |
| - namespace: Target Kubernetes namespace. Can be overridden during method invocations. |
| 55 | + with username and password. You can find an example here: |
| 56 | + https://github.com/kubernetes-client/python/blob/67f9c7a97081b4526470cad53576bc3b71fa6fcc/examples/remote_cluster.py#L31 |
| 57 | + namespace: Target Kubernetes namespace. By default it takes namespace |
| 58 | + from `/var/run/secrets/kubernetes.io/serviceaccount/namespace` location |
| 59 | + or set as `default`. Namespace can be overridden during method invocations. |
52 | 60 | """
|
53 | 61 |
|
54 | 62 | self.in_cluster = False
|
|
0 commit comments