provider-azure icon indicating copy to clipboard operation
provider-azure copied to clipboard

Proposal for alignment w/ ASO's deployment management scheme

Open kasey opened this issue 4 years ago • 2 comments

What problem are you facing?

As per https://github.com/crossplane/crossplane/issues/1851 we would like to generate crossplane controllers via ASOs code generation pipeline. @matthchr has a branch where he has been able to generate crossplane CRD types 🎉 . In order to build a functional crossplane controller, there are still several outstanding design and implementation questions:

  • how we can generalize CRD -> ARM Deployment template serialization code so that the software architecture cleanly supports both Crossplane and ARM CRD shapes
  • align on the management of ARM Deployment IDs and provisioning state so that provider-azure can leverage the functionality the ASO team will do going forward for diffing the resource spec and recover lost state in Status across backup/restore.
  • ARM Deployments use a "fully qualified" resource identifier which includes the "parent" resource (ie where the resource sits in relation to the Azure Subscription and Resource Group). Document how ASO manages these identifiers and make a recommendation on how to reconcile this concept with Crossplane's external-name annotation.
  • Since some of the "business logic" for managing the Deployment is currently inline in the generated ASO controller, make a recommendation for how Crossplane's ExternalClient implementations should call, or be called by, the ASO generated controller.

How could Crossplane help solve your problem?

The next step in building a crossplane controller from these types is to write a design doc where we address these questions.

kasey avatar Nov 05 '20 19:11 kasey

Can we get a status update here? I saw this was scheduled for 1.0 and then 1.1, but then dropped from the picture. Do you have any plans on working on this for 1.3?

We may need to add around a dozen Azure resources for our platform, and we'd like to follow the code generation approach if possible.

bergerx avatar May 07 '21 15:05 bergerx

We're still working towards a release of resources generated from this process for Azure Service Operator. You'll see an update on #1192 when there are updates.

The tentative plan after we've battle-hardened the generator and supporting libraries is to also light up support for Crossplane. We have a pipeline for generating Crossplane resources already defined but there's still a decent amount of work remaining to:

  1. Get the generator to a place where it's doing all that it needs to do to generate valid resources.
  2. Hook that deployment model up with how Crossplane does deployments (which is a bit different than how ASO does it). @kasey and I discussed what this might look like but it still needs to be resourced and there are some open questions.

Realistically I suspect we're still a few months away from something created via that pipeline being usable in Crossplane. It's possible that @negz has thoughts on this from Crossplane's side.

matthchr avatar May 07 '21 17:05 matthchr