mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-11-24 18:03:34 +00:00
* Handle empty template output gracefully
* Add changelog fragment for empty template output fix
* refactor: reduce cognitive complexity of ActionModule.run
Extract compound boolean condition to a variable to reduce the
cognitive complexity from 16 to the allowed maximum of 15.
* refactor: extract duplicated error handling into _fail_with_error
Replace two identical error-handling blocks in ActionModule.run() with
a shared _fail_with_error static method to address SonarQube code
duplication finding.
* refactor: reduce code duplication in action plugin and tests
Revert _fail_with_error extraction that increased duplication on new
code. Consolidate duplicate integration test tasks for conditional
template into a single looped task.
---------
(cherry picked from commit ec8942dd90)
Co-authored-by: W. H. Wang <mattwang44@gmail.com>
Co-authored-by: aubin bikouo <abikouo@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
W. H. Wang
aubin bikouo
Claude Opus 4.6
parent
1a0914352a
commit
dad9a8457e
@@ -0,0 +1,12 @@
|
||||
{% for item in items %}
|
||||
{% if item.enabled %}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "{{ item.name }}"
|
||||
namespace: "{{ k8s_pod_namespace }}"
|
||||
data:
|
||||
key: value
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user