diff --git a/docs/kubernetes.core.k8s_json_patch_module.rst b/docs/kubernetes.core.k8s_json_patch_module.rst index 575466fd36c..dad68d7b4e1 100644 --- a/docs/kubernetes.core.k8s_json_patch_module.rst +++ b/docs/kubernetes.core.k8s_json_patch_module.rst @@ -18,7 +18,7 @@ Version added: 2.0.0 Synopsis -------- - This module is used to apply RFC 6902 JSON patch operations only. -- Use the :ref:`k8s ` module for strategic merge or JSON merge operations. +- Use the :ref:`kubernetes.core.k8s ` module for strategic merge or JSON merge operations. - The jsonpatch library is required for check mode. diff --git a/docs/kubernetes.core.k8s_log_module.rst b/docs/kubernetes.core.k8s_log_module.rst index 22119d2b605..964c1527959 100644 --- a/docs/kubernetes.core.k8s_log_module.rst +++ b/docs/kubernetes.core.k8s_log_module.rst @@ -384,6 +384,22 @@ Parameters + + +
+ since_seconds + +
+ string +
+
added in 2.2.0
+ + + + +
A relative time in seconds before the current time from which to show logs.
+ +
@@ -458,6 +474,7 @@ Examples kind: Deployment namespace: testing name: example + since_seconds: "4000" register: log # This will get the log from a single Pod managed by this DeploymentConfig diff --git a/docs/kubernetes.core.k8s_lookup.rst b/docs/kubernetes.core.k8s_lookup.rst index 9337796acd4..9e428c8beae 100644 --- a/docs/kubernetes.core.k8s_lookup.rst +++ b/docs/kubernetes.core.k8s_lookup.rst @@ -381,6 +381,12 @@ Parameters
+Notes +----- + +.. note:: + - While querying, please use ``query`` or ``lookup`` format with ``wantlist=True`` to provide an easier and more consistent interface. For more details, see https://docs.ansible.com/ansible/latest/plugins/lookup.html#forcing-lookups-to-return-lists-query-and-wantlist-true. + Examples @@ -390,23 +396,23 @@ Examples - name: Fetch a list of namespaces set_fact: - projects: "{{ lookup('kubernetes.core.k8s', api_version='v1', kind='Namespace') }}" + projects: "{{ query('kubernetes.core.k8s', api_version='v1', kind='Namespace') }}" - name: Fetch all deployments set_fact: - deployments: "{{ lookup('kubernetes.core.k8s', kind='Deployment') }}" + deployments: "{{ query('kubernetes.core.k8s', kind='Deployment') }}" - name: Fetch all deployments in a namespace set_fact: - deployments: "{{ lookup('kubernetes.core.k8s', kind='Deployment', namespace='testing') }}" + deployments: "{{ query('kubernetes.core.k8s', kind='Deployment', namespace='testing') }}" - name: Fetch a specific deployment by name set_fact: - deployments: "{{ lookup('kubernetes.core.k8s', kind='Deployment', namespace='testing', resource_name='elastic') }}" + deployments: "{{ query('kubernetes.core.k8s', kind='Deployment', namespace='testing', resource_name='elastic') }}" - name: Fetch with label selector set_fact: - service: "{{ lookup('kubernetes.core.k8s', kind='Service', label_selector='app=galaxy') }}" + service: "{{ query('kubernetes.core.k8s', kind='Service', label_selector='app=galaxy') }}" # Use parameters from a YAML config @@ -416,11 +422,11 @@ Examples - name: Using the config (loaded from a file in prior task), fetch the latest version of the object set_fact: - service: "{{ lookup('kubernetes.core.k8s', resource_definition=config) }}" + service: "{{ query('kubernetes.core.k8s', resource_definition=config) }}" - name: Use a config from the local filesystem set_fact: - service: "{{ lookup('kubernetes.core.k8s', src='service.yml') }}" + service: "{{ query('kubernetes.core.k8s', src='service.yml') }}"