mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
Extend hidden_fields to allow more complicated field definitions (#872)
SUMMARY This allows us to ignore e.g. the last-applied-configuration annotation by specifying metadata.annotations[kubectl.kubernetes.io/last-applied-configuration] ISSUE TYPE Feature Pull Request COMPONENT NAME hidden_fields This replaces #643 as I no longer have permissions to push to branches in this repo Reviewed-by: Bikouo Aubin Reviewed-by: Helen Bailey <hebailey@redhat.com> Reviewed-by: GomathiselviS <gomathiselvi@gmail.com> Reviewed-by: Alina Buzachis
This commit is contained in:
@@ -188,7 +188,8 @@ options:
|
||||
description:
|
||||
- Hide fields matching this option in the result
|
||||
- An example might be C(hidden_fields=[metadata.managedFields])
|
||||
- Only field definitions that don't reference list items are supported (so V(spec.containers[0]) would not work)
|
||||
or V(hidden_fields=[spec.containers[0].env[3].value])
|
||||
or V(hidden_fields=[metadata.annotations[kubectl.kubernetes.io/last-applied-configuration]])
|
||||
type: list
|
||||
elements: str
|
||||
version_added: 3.0.0
|
||||
|
||||
@@ -48,7 +48,8 @@ options:
|
||||
description:
|
||||
- Hide fields matching any of the field definitions in the result
|
||||
- An example might be C(hidden_fields=[metadata.managedFields])
|
||||
- Only field definitions that don't reference list items are supported (so V(spec.containers[0]) would not work)
|
||||
or V(hidden_fields=[spec.containers[0].env[3].value])
|
||||
or V(hidden_fields=[metadata.annotations[kubectl.kubernetes.io/last-applied-configuration]])
|
||||
type: list
|
||||
elements: str
|
||||
version_added: 3.0.0
|
||||
|
||||
Reference in New Issue
Block a user