Skip to content

Commit 5eeb1f3

Browse files
djzagerfabianvf
authored andcommitted
fix(ansible): invalid maxArtifacts annotation (#2093)
When the maxArtifacts annotation can not be converted to an integer, do not use it.
1 parent 17d3890 commit 5eeb1f3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
- OLM internal manager is not returning errors in the initialization. ([#1976](https://github.com/operator-framework/operator-sdk/pull/1976))
2525
- Added missing default role permission for `deployments`, which is required to create the metrics service for the operator. ([#2090](https://github.com/operator-framework/operator-sdk/pull/2090))
26+
- Handle invalid maxArtifacts annotation on CRs for Ansible based operators. ([2093](https://github.com/operator-framework/operator-sdk/pull/2093))
2627

2728
## v0.11.0
2829

pkg/ansible/runner/runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,9 @@ func (r *runner) Run(ident string, u *unstructured.Unstructured, kubeconfig stri
177177
i, err := strconv.Atoi(ma)
178178
if err != nil {
179179
log.Info("Invalid max runner artifact annotation", "err", err, "value", ma)
180+
} else {
181+
maxArtifacts = i
180182
}
181-
maxArtifacts = i
182183
}
183184

184185
go func() {

0 commit comments

Comments
 (0)