2019-02-22 11:27:11 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
# Copyright: (c) 2018, Red Hat | Ansible
|
|
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
2017-12-24 22:50:07 +00:00
|
|
|
|
|
|
|
# Options for authenticating with the API.
|
|
|
|
|
|
|
|
|
|
|
|
class ModuleDocFragment(object):
|
|
|
|
|
2019-02-22 11:27:11 +00:00
|
|
|
DOCUMENTATION = r'''
|
2017-12-24 22:50:07 +00:00
|
|
|
options:
|
|
|
|
host:
|
|
|
|
description:
|
|
|
|
- Provide a URL for accessing the API. Can also be specified via K8S_AUTH_HOST environment variable.
|
2019-02-22 11:27:11 +00:00
|
|
|
type: str
|
2017-12-24 22:50:07 +00:00
|
|
|
api_key:
|
|
|
|
description:
|
|
|
|
- Token used to authenticate with the API. Can also be specified via K8S_AUTH_API_KEY environment variable.
|
2019-02-22 11:27:11 +00:00
|
|
|
type: str
|
2017-12-24 22:50:07 +00:00
|
|
|
kubeconfig:
|
|
|
|
description:
|
|
|
|
- Path to an existing Kubernetes config file. If not provided, and no other connection
|
|
|
|
options are provided, the openshift client will attempt to load the default
|
|
|
|
configuration file from I(~/.kube/config.json). Can also be specified via K8S_AUTH_KUBECONFIG environment
|
|
|
|
variable.
|
2019-02-22 11:27:11 +00:00
|
|
|
type: path
|
2017-12-24 22:50:07 +00:00
|
|
|
context:
|
|
|
|
description:
|
|
|
|
- The name of a context found in the config file. Can also be specified via K8S_AUTH_CONTEXT environment variable.
|
2019-02-22 11:27:11 +00:00
|
|
|
type: str
|
2017-12-24 22:50:07 +00:00
|
|
|
username:
|
|
|
|
description:
|
|
|
|
- Provide a username for authenticating with the API. Can also be specified via K8S_AUTH_USERNAME environment
|
|
|
|
variable.
|
2019-02-11 12:55:34 +00:00
|
|
|
- Please note that this only works with clusters configured to use HTTP Basic Auth. If your cluster has a
|
|
|
|
different form of authentication (e.g. OAuth2 in OpenShift), this option will not work as expected and you
|
|
|
|
should look into the C(k8s_auth) module, as that might do what you need.
|
2019-02-22 11:27:11 +00:00
|
|
|
type: str
|
2017-12-24 22:50:07 +00:00
|
|
|
password:
|
|
|
|
description:
|
|
|
|
- Provide a password for authenticating with the API. Can also be specified via K8S_AUTH_PASSWORD environment
|
|
|
|
variable.
|
2019-02-11 12:55:34 +00:00
|
|
|
- Please read the description of the C(username) option for a discussion of when this option is applicable.
|
2019-02-22 11:27:11 +00:00
|
|
|
type: str
|
2017-12-24 22:50:07 +00:00
|
|
|
cert_file:
|
|
|
|
description:
|
|
|
|
- Path to a certificate used to authenticate with the API. Can also be specified via K8S_AUTH_CERT_FILE environment
|
|
|
|
variable.
|
2019-02-22 11:27:11 +00:00
|
|
|
type: path
|
2017-12-24 22:50:07 +00:00
|
|
|
key_file:
|
|
|
|
description:
|
2018-11-05 17:13:57 +00:00
|
|
|
- Path to a key file used to authenticate with the API. Can also be specified via K8S_AUTH_KEY_FILE environment
|
2017-12-24 22:50:07 +00:00
|
|
|
variable.
|
2019-02-22 11:27:11 +00:00
|
|
|
type: path
|
2017-12-24 22:50:07 +00:00
|
|
|
ssl_ca_cert:
|
|
|
|
description:
|
2018-11-12 16:09:55 +00:00
|
|
|
- Path to a CA certificate used to authenticate with the API. The full certificate chain must be provided to
|
|
|
|
avoid certificate validation errors. Can also be specified via K8S_AUTH_SSL_CA_CERT environment variable.
|
2019-02-22 11:27:11 +00:00
|
|
|
type: path
|
2017-12-24 22:50:07 +00:00
|
|
|
verify_ssl:
|
|
|
|
description:
|
2019-02-22 11:27:11 +00:00
|
|
|
- Whether or not to verify the API server's SSL certificates. Can also be specified via K8S_AUTH_VERIFY_SSL
|
|
|
|
environment variable.
|
2017-12-24 22:50:07 +00:00
|
|
|
type: bool
|
|
|
|
notes:
|
|
|
|
- "The OpenShift Python client wraps the K8s Python client, providing full access to
|
|
|
|
all of the APIS and models available on both platforms. For API version details and
|
|
|
|
additional information visit https://github.com/openshift/openshift-restclient-python"
|
2018-11-12 16:09:55 +00:00
|
|
|
- "To avoid SSL certificate validation errors when C(verify_ssl) is I(True), the full
|
|
|
|
certificate chain for the API server must be provided via C(ssl_ca_cert) or in the
|
|
|
|
kubeconfig file."
|
2017-12-24 22:50:07 +00:00
|
|
|
'''
|