Skip to content

Commit 54da7b9

Browse files
committed
fix(ansible): invalid maxArtifacts annotation
When the maxArtifacts annotation can not be converted to an integer, do not use it.
1 parent 72a86cd commit 54da7b9

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
@@ -19,6 +19,7 @@
1919

2020
- OLM internal manager is not returning errors in the initialization. ([#1976](https://github.com/operator-framework/operator-sdk/pull/1976))
2121
- 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))
22+
- Handle invalid maxArtifacts annotation on CRs for Ansible based operators. ([2093](https://github.com/operator-framework/operator-sdk/pull/2093))
2223

2324
## v0.11.0
2425

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)