mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-11-22 15:10:22 +00:00
[PR #1240/cb00cf3c backport][stable-6] Address stale deprecations (#1245)
* Address stale deprecations (#1240)
* chore: update deprecation for wait_timeout
* chore: update deprecation for return_code
* docs(changelogs): add stale deprecations to changelogs
* docs: ignore pylint deprecation warnings
* chore: update deprecation for merge_type
* docs: update changelogs for merge_type
* docs: ignore more pylint deprecation warnings
(cherry picked from commit cb00cf3c9e)
* fix: remove unnecessary ignore statements
---------
Co-authored-by: Don Naro <dnaro@redhat.com>
This commit is contained in:
co-authored by
Don Naro
parent
40123060c1
commit
e620b92b49
@@ -36,6 +36,7 @@ options:
|
||||
- If more than one C(merge_type) is given, the merge_types will be tried in order
|
||||
- This defaults to C(['strategic-merge', 'merge']), which is ideal for using the same parameters
|
||||
on resource kinds that combine Custom Resources and built-in resources.
|
||||
- I(merge_type=json) has been deprecated and will be removed in version 7.0.0. Use M(kubernetes.core.k8s_json_patch) instead.
|
||||
choices:
|
||||
- json
|
||||
- merge
|
||||
@@ -251,6 +252,15 @@ def main():
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
# Add deprecation warning for merge_type=json
|
||||
merge_type = module.params.get("merge_type")
|
||||
if merge_type and "json" in merge_type:
|
||||
module.deprecate(
|
||||
"The 'merge_type=json' option is deprecated and will be removed in version 7.0.0. Use the 'kubernetes.core.k8s_json_patch' module instead.",
|
||||
version="7.0.0",
|
||||
collection_name="kubernetes.core",
|
||||
)
|
||||
|
||||
try:
|
||||
client = get_api_client(module=module)
|
||||
svc = K8sService(client, module)
|
||||
|
||||
Reference in New Issue
Block a user