I am moving this change outside of https://github.com/ansible/awx-resource-operator/pull/9 so that PR can focus on the discussion around cluster scope. Also that PR moved the Start K8s Runner Job to after Get Job Info which is not accurate).
His original comment is:
In ansible job operator, we can't generate a unique k8s job name for running tower jobs. If so, the ansible job operator is triggered to launch new k8s jobs in an endless loop. In the following ansible task, the state is set to present, meaning a k8s job will be created if it doesn't exist.
Signed-off-by: Mike Ng ming@redhat.com
This is to revert the change that was done in https://github.com/ansible/awx-resource-operator/pull/4 As @xiangjingli points out in some cases, there is an infinite amount of jobs being spawned.
I am moving this change outside of https://github.com/ansible/awx-resource-operator/pull/9 so that PR can focus on the discussion around cluster scope. Also that PR moved the
Start K8s Runner Job
to afterGet Job Info
which is not accurate).His original comment is:
In ansible job operator, we can't generate a unique k8s job name for running tower jobs. If so, the ansible job operator is triggered to launch new k8s jobs in an endless loop. In the following ansible task, the state is set to present, meaning a k8s job will be created if it doesn't exist.
According to ansible k8s module guide, https://docs.ansible.com/ansible/latest/modules/k8s_module.html