ansible / awx-resource-operator

43 stars 34 forks source link

Introduce new Env variable to only fix deprecated wfjt ansiblejob #140

Closed rooftopcellist closed 1 year ago

rooftopcellist commented 1 year ago

Problem Statement

The recommended way to launch a Workflow job template is to create an AnsibleWorkflow CR, like the following:

apiVersion: tower.ansible.com/v1alpha1
kind: AnsibleWorkflow
metadata:
  name: workflow-1
spec:
  inventory: Demo Inventory
  workflow_template_name: Test WFJT
  connection_secret: awxaccess
  no_log: false

However, we still support the old (now deprecated) way of launching Workflows using an AnsibleJob CR, for example:

---
apiVersion: tower.ansible.com/v1alpha1
kind: AnsibleJob
metadata:
  name: demo-job-1
spec:
  tower_auth_secret: awxaccess
  workflow_template_name: Test WFJT
  no_log: false

The backwards compatibility shim for that is currently broken, so the yaml shown directly above will fail every time.

Solution

This was a multi-layer problem. I'll outline the issues below:

However, we uncovered another issue that need fixing, but which I think we should handle in a different issue: