integr8ly / 3scale-operator-old

3scale operator
2 stars 3 forks source link

Init #1

Closed mikenairn closed 5 years ago

mikenairn commented 6 years ago

Initial implementation of the install operator:

Notes:

mikenairn commented 6 years ago

@maleck13 Still a couple of things to finish off here, docs,tests etc.. but wanted to get this open to start a discussion on a few tings.

The approach i took here was to follow what we had previously done for keycloak, so it installs 3scale and then moves onto a reconciliation loop where it reconciles 3scale resources (users and identity providers currently). It does not re-create objects that were created during the installation of 3scale itself. Since we have a couple of operators being worked on at the moment, and i know some have approached this differently, i just want to ask what we want this to do as i think they should all work in a similar way.

This also currently just takes the whole 3scale template and processes it in one go. This can lead to the install time actually taking longer since a lot of things fail to come up as the depend on other things running first. The obvious thing here is to break it up and make the operator bring up the dependencies first. This was looked into as part of the spike, but decided to leave it like this for the initial PR, since the 3scale template is quite large and has many resources being created.

@odra @pb82 fyi, i believe you are both working on operators currently also, so if you have any thoughts.

mikenairn commented 5 years ago

@maleck13 @pb82 @odra I was having issues this morning while testing the installation of the operator via ansible. Problem was loading the static template file when running the operator via the built container image. I believe others have hit this and fixed it already, but just wanted to point out this lib i found to pack static assets into that binary that we might want to consider using when the need arises in our operators https://github.com/gobuffalo/packr

You can see the changes i made here https://github.com/integr8ly/3scale-operator/pull/1/commits/cd1c0c73e91ef91d7fcb7ada66f128a75f68af0e, works nicely and was along the lines of the way i was hoping we could fix the issue.

maleck13 commented 5 years ago

@mikenairn would it be ok to split this into 2 commits 1) vendor and 2) the actual code we added

maleck13 commented 5 years ago

@mikenairn 👀

maleck13 commented 5 years ago

Good to merge this? I have enabled travis for integr8ly