Change ansible k8s_info tasks api_version for Job kind to batch/v1 #1833
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Switch
api_version
fromv1
tobatch/v1
for k8s_info tasks usingKind: Job
inmigrate_schema.yml
ISSUE TYPE
ADDITIONAL INFORMATION
The API version of Job in all recent version of Kubernetes is:
The migration task fails consistently after 15 minutes, causing the operator to retry the entire playbook. This issue arises because the k8s_info task doesn't use the correct api_version to retrieve the job status. According to the documentation, the api_version defaults to v1 if not specified.
Manually testing with a custom playbook showed that updating the api_version to the correct version resolves the issue, allowing the task to retrieve the job status correctly.
To address this, the following change was tested locally:
From:
To:
This change ensures that the correct api_version is used, resolving the issue with the task.
This is similar to another changes that was opened by us and merged in the past: #1299