mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-08 05:52:37 +00:00
Merge pull request #203 from Akasurde/k8s_info
k8s_info: Update documentation
This commit is contained in:
2
changelogs/fragments/202_k8s_info.yml
Normal file
2
changelogs/fragments/202_k8s_info.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
minor_changes:
|
||||||
|
- k8s_info - update custom resource example (https://github.com/ansible-collections/community.kubernetes/issues/202).
|
||||||
@@ -15,9 +15,10 @@ class ModuleDocFragment(object):
|
|||||||
options:
|
options:
|
||||||
api_version:
|
api_version:
|
||||||
description:
|
description:
|
||||||
- Use to specify the API version. Use to create, delete, or discover an object without providing a full
|
- Use to specify the API version.
|
||||||
resource definition. Use in conjunction with I(kind), I(name), and I(namespace) to identify a
|
- Use to create, delete, or discover an object without providing a full resource definition.
|
||||||
specific object. If I(resource definition) is provided, the I(apiVersion) from the I(resource_definition)
|
- Use in conjunction with I(kind), I(name), and I(namespace) to identify a specific object.
|
||||||
|
- If I(resource definition) is provided, the I(apiVersion) value from the I(resource_definition)
|
||||||
will override this option.
|
will override this option.
|
||||||
type: str
|
type: str
|
||||||
default: v1
|
default: v1
|
||||||
@@ -26,23 +27,26 @@ options:
|
|||||||
- version
|
- version
|
||||||
kind:
|
kind:
|
||||||
description:
|
description:
|
||||||
- Use to specify an object model. Use to create, delete, or discover an object without providing a full
|
- Use to specify an object model.
|
||||||
resource definition. Use in conjunction with I(api_version), I(name), and I(namespace) to identify a
|
- Use to create, delete, or discover an object without providing a full resource definition.
|
||||||
specific object. If I(resource definition) is provided, the I(kind) from the I(resource_definition)
|
- Use in conjunction with I(api_version), I(name), and I(namespace) to identify a specific object.
|
||||||
|
- If I(resource definition) is provided, the I(kind) value from the I(resource_definition)
|
||||||
will override this option.
|
will override this option.
|
||||||
type: str
|
type: str
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Use to specify an object name. Use to create, delete, or discover an object without providing a full
|
- Use to specify an object name.
|
||||||
resource definition. Use in conjunction with I(api_version), I(kind) and I(namespace) to identify a
|
- Use to create, delete, or discover an object without providing a full resource definition.
|
||||||
specific object. If I(resource definition) is provided, the I(metadata.name) value from the
|
- Use in conjunction with I(api_version), I(kind) and I(namespace) to identify a specific object.
|
||||||
I(resource_definition) will override this option.
|
- If I(resource definition) is provided, the I(metadata.name) value from the I(resource_definition)
|
||||||
|
will override this option.
|
||||||
type: str
|
type: str
|
||||||
namespace:
|
namespace:
|
||||||
description:
|
description:
|
||||||
- Use to specify an object namespace. Useful when creating, deleting, or discovering an object without
|
- Use to specify an object namespace.
|
||||||
providing a full resource definition. Use in conjunction with I(api_version), I(kind), and I(name)
|
- Useful when creating, deleting, or discovering an object without providing a full resource definition.
|
||||||
to identify a specific object. If I(resource definition) is provided, the I(metadata.namespace) value
|
- Use in conjunction with I(api_version), I(kind), and I(name) to identify a specific object.
|
||||||
from the I(resource_definition) will override this option.
|
- If I(resource definition) is provided, the I(metadata.namespace) value from the I(resource_definition)
|
||||||
|
will override this option.
|
||||||
type: str
|
type: str
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -25,31 +25,15 @@ description:
|
|||||||
- This module was called C(k8s_facts) before Ansible 2.9. The usage did not change.
|
- This module was called C(k8s_facts) before Ansible 2.9. The usage did not change.
|
||||||
|
|
||||||
options:
|
options:
|
||||||
api_version:
|
|
||||||
description:
|
|
||||||
- Use to specify the API version. in conjunction with I(kind), I(name), and I(namespace) to identify a
|
|
||||||
specific object.
|
|
||||||
default: v1
|
|
||||||
aliases:
|
|
||||||
- api
|
|
||||||
- version
|
|
||||||
type: str
|
|
||||||
kind:
|
kind:
|
||||||
description:
|
description:
|
||||||
- Use to specify an object model. Use in conjunction with I(api_version), I(name), and I(namespace) to identify a
|
- Use to specify an object model.
|
||||||
specific object.
|
- Use to create, delete, or discover an object without providing a full resource definition.
|
||||||
required: yes
|
- Use in conjunction with I(api_version), I(name), and I(namespace) to identify a specific object.
|
||||||
type: str
|
- If I(resource definition) is provided, the I(kind) value from the I(resource_definition)
|
||||||
name:
|
will override this option.
|
||||||
description:
|
|
||||||
- Use to specify an object name. Use in conjunction with I(api_version), I(kind) and I(namespace) to identify a
|
|
||||||
specific object.
|
|
||||||
type: str
|
|
||||||
namespace:
|
|
||||||
description:
|
|
||||||
- Use to specify an object namespace. Use in conjunction with I(api_version), I(kind), and I(name)
|
|
||||||
to identify a specific object.
|
|
||||||
type: str
|
type: str
|
||||||
|
required: True
|
||||||
label_selectors:
|
label_selectors:
|
||||||
description: List of label selectors to use to filter results
|
description: List of label selectors to use to filter results
|
||||||
type: list
|
type: list
|
||||||
@@ -61,6 +45,7 @@ options:
|
|||||||
|
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- community.kubernetes.k8s_auth_options
|
- community.kubernetes.k8s_auth_options
|
||||||
|
- community.kubernetes.k8s_name_options
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
- "python >= 2.7"
|
- "python >= 2.7"
|
||||||
@@ -109,6 +94,11 @@ EXAMPLES = r'''
|
|||||||
kind: Pod
|
kind: Pod
|
||||||
field_selectors:
|
field_selectors:
|
||||||
- status.phase=Running
|
- status.phase=Running
|
||||||
|
|
||||||
|
- name: List custom objects created using CRD
|
||||||
|
community.kubernetes.k8s_info:
|
||||||
|
kind: MyCustomObject
|
||||||
|
api_version: "stable.example.com/v1"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r'''
|
||||||
|
|||||||
Reference in New Issue
Block a user