ansible / awx-resource-operator

41 stars 31 forks source link

Record the generation allowing for items to be patched #129

Open cooktheryan opened 1 year ago

cooktheryan commented 1 year ago

This would provide for us a way to update resources once they have been applied and bypass the isFinished flag

rooftopcellist commented 1 year ago

cc @rh-dluong This would allow all resources except for ansiblejob and ansibleworkflows to be modified. It will also mean that users can now make changes to a JobTemplate resource and it will consequently fire off the reconciliation loop and update the resource in AWX/Controller (potentially overwriting any changes made by users in the UI).

On one hand, this was a bug all along, on the other hand, this could be perceived as unexpected behavior. I am curious about your thoughts.

rooftopcellist commented 11 months ago

We need to think about how this works when the user has pre-created a resource with the same name in Controller already. Or if they change one of these managed resources in the UI for example after creation.

Most people's expectation will probably be:

  1. Create a resource in Controller manually in the UI
  2. Define it in yaml with the same name of the manually created resource
  3. The platform resource operator should apply the changes, merging the two where possible.

For example; extra_vars was specified by the user on a Job Template manually; but it isn't in the yaml definition of the resource

I could see others wanted the behavior be to replace what is there and strictly adhere to configuration as code principles and only change the resource definitions in the yaml in SCM.

So I think we should make it possible to do both; via a replace: true/false type setting on the CR yaml for a given resource.

the-it-jaeger commented 10 months ago

@rooftopcellist I prefer the CaC / GitOps approach; however, it would be nice to give users a choice.

devmittal02 commented 4 months ago

@cooktheryan @rooftopcellist what is the blocker in the above PR to merge?

is the project still actively maintained ? we have similar use case of managing the resources via cac (gitops) approach, but with current setup it only creates, this doesn't update or delete