mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-07 21:42:38 +00:00
[backport/2.2] Fix validation errors in plugin documentation (#399)
Fix validation errors in plugin documentation
SUMMARY
This fixes validation errors in plugin documentation now that ansible
test for 2.13 is running validate-modules on all plugins. The kubectl
connection plugin validation is ignored because there seems to be a
requirement for the author field to have a github username, which we do
not have.
ISSUE TYPE
Docs Pull Request
COMPONENT NAME
plugins/connection/kubectl
plugins/inventory/k8s
plugins/lookup/k8s
plugins/lookup/kustomize
ADDITIONAL INFORMATION
Reviewed-by: None
(cherry picked from commit 30e84fa)
This commit is contained in:
@@ -22,9 +22,9 @@ __metaclass__ = type
|
|||||||
|
|
||||||
DOCUMENTATION = r"""
|
DOCUMENTATION = r"""
|
||||||
author:
|
author:
|
||||||
- xuxinkun
|
- xuxinkun (@xuxinkun)
|
||||||
|
|
||||||
connection: kubectl
|
name: kubectl
|
||||||
|
|
||||||
short_description: Execute tasks in pods running on Kubernetes.
|
short_description: Execute tasks in pods running on Kubernetes.
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,9 @@ __metaclass__ = type
|
|||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
name: k8s
|
name: k8s
|
||||||
plugin_type: inventory
|
|
||||||
author:
|
author:
|
||||||
- Chris Houseknecht <@chouseknecht>
|
- Chris Houseknecht (@chouseknecht)
|
||||||
- Fabian von Feilitzsch <@fabianvf>
|
- Fabian von Feilitzsch (@fabianvf)
|
||||||
|
|
||||||
short_description: Kubernetes (K8s) inventory source
|
short_description: Kubernetes (K8s) inventory source
|
||||||
|
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ from __future__ import (absolute_import, division, print_function)
|
|||||||
|
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = """
|
||||||
lookup: k8s
|
name: k8s
|
||||||
|
|
||||||
short_description: Query the K8s API
|
short_description: Query the K8s API
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- Chris Houseknecht <@chouseknecht>
|
- Chris Houseknecht (@chouseknecht)
|
||||||
- Fabian von Feilitzsch <@fabianvf>
|
- Fabian von Feilitzsch (@fabianvf)
|
||||||
|
|
||||||
description:
|
description:
|
||||||
- Uses the Kubernetes Python client to fetch a specific object by name, all matching objects within a
|
- Uses the Kubernetes Python client to fetch a specific object by name, all matching objects within a
|
||||||
@@ -117,7 +117,7 @@ DOCUMENTATION = '''
|
|||||||
- "python >= 3.6"
|
- "python >= 3.6"
|
||||||
- "kubernetes >= 12.0.0"
|
- "kubernetes >= 12.0.0"
|
||||||
- "PyYAML >= 3.11"
|
- "PyYAML >= 3.11"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
- name: Fetch a list of namespaces
|
- name: Fetch a list of namespaces
|
||||||
@@ -159,28 +159,19 @@ RETURN = """
|
|||||||
_list:
|
_list:
|
||||||
description:
|
description:
|
||||||
- One ore more object definitions returned from the API.
|
- One ore more object definitions returned from the API.
|
||||||
type: complex
|
type: list
|
||||||
contains:
|
elements: dict
|
||||||
api_version:
|
sample:
|
||||||
description: The versioned schema of this representation of an object.
|
- kind: ConfigMap
|
||||||
returned: success
|
apiVersion: v1
|
||||||
type: str
|
metadata:
|
||||||
kind:
|
creationTimestamp: "2022-03-04T13:59:49Z"
|
||||||
description: Represents the REST resource this object represents.
|
name: my-config-map
|
||||||
returned: success
|
namespace: default
|
||||||
type: str
|
resourceVersion: "418"
|
||||||
metadata:
|
uid: 5714b011-d090-4eac-8272-a0ea82ec0abd
|
||||||
description: Standard object metadata. Includes name, namespace, annotations, labels, etc.
|
data:
|
||||||
returned: success
|
key1: val1
|
||||||
type: complex
|
|
||||||
spec:
|
|
||||||
description: Specific attributes of the object. Will vary based on the I(api_version) and I(kind).
|
|
||||||
returned: success
|
|
||||||
type: complex
|
|
||||||
status:
|
|
||||||
description: Current status details for the object.
|
|
||||||
returned: success
|
|
||||||
type: complex
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ansible.errors import AnsibleError
|
from ansible.errors import AnsibleError
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
#
|
#
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = """
|
||||||
lookup: kustomize
|
name: kustomize
|
||||||
|
|
||||||
short_description: Build a set of kubernetes resources using a 'kustomization.yaml' file.
|
short_description: Build a set of kubernetes resources using a 'kustomization.yaml' file.
|
||||||
|
|
||||||
version_added: "2.2.0"
|
version_added: "2.2.0"
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- Aubin Bikouo <@abikouo>
|
- Aubin Bikouo (@abikouo)
|
||||||
notes:
|
notes:
|
||||||
- If both kustomize and kubectl are part of the PATH, kustomize will be used by the plugin.
|
- If both kustomize and kubectl are part of the PATH, kustomize will be used by the plugin.
|
||||||
description:
|
description:
|
||||||
@@ -33,7 +33,7 @@ DOCUMENTATION = '''
|
|||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
- "python >= 3.6"
|
- "python >= 3.6"
|
||||||
'''
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
- name: Run lookup using kustomize
|
- name: Run lookup using kustomize
|
||||||
@@ -52,29 +52,16 @@ EXAMPLES = """
|
|||||||
RETURN = """
|
RETURN = """
|
||||||
_list:
|
_list:
|
||||||
description:
|
description:
|
||||||
- One ore more object definitions returned from the tool execution.
|
- YAML string for the object definitions returned from the tool execution.
|
||||||
type: complex
|
type: str
|
||||||
contains:
|
sample:
|
||||||
api_version:
|
kind: ConfigMap
|
||||||
description: The versioned schema of this representation of an object.
|
apiVersion: v1
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
kind:
|
|
||||||
description: Represents the REST resource this object represents.
|
|
||||||
returned: success
|
|
||||||
type: str
|
|
||||||
metadata:
|
metadata:
|
||||||
description: Standard object metadata. Includes name, namespace, annotations, labels, etc.
|
name: my-config-map
|
||||||
returned: success
|
namespace: default
|
||||||
type: complex
|
data:
|
||||||
spec:
|
key1: val1
|
||||||
description: Specific attributes of the object. Will vary based on the I(api_version) and I(kind).
|
|
||||||
returned: success
|
|
||||||
type: complex
|
|
||||||
status:
|
|
||||||
description: Current status details for the object.
|
|
||||||
returned: success
|
|
||||||
type: complex
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ansible.errors import AnsibleLookupError
|
from ansible.errors import AnsibleLookupError
|
||||||
|
|||||||
Reference in New Issue
Block a user