Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crossplane controller code generation using ACK pipeline #449

Merged
merged 2 commits into from
Nov 25, 2020

Conversation

muvaf
Copy link
Contributor

@muvaf muvaf commented Oct 30, 2020

Issue #, if available:

Description of changes: Introduces another pipeline that generates Crossplane controller code. This means that all services ACK supports will also be supported by Crossplane AWS Provider and this is the initial PR.

As of now, 12 API Gateway v2 services, DynamoDB services, Amazon StepFunctions and ECR are generated using this pipeline. Future PRs on templates will expand the support for more services whose controller is generated for both ACK and Crossplane.

Depends on #443 and #501

Fixes crossplane/crossplane#1845

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jaypipes and others added 2 commits November 25, 2020 23:28
generated crossplane API types.

(cherry picked from commit e016e49)
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: add apis subcommand with provider-dir flag to crossplane subcommand

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: update with new subtemplates.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: add a section about Crossplane Provider Generation to dev-docs

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: add new crossplane.Generation struct for generating Crossplane types and controllers

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: update templates for controller

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: add initial controller template

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: use kubebuilder required mark in crds

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: implement IsNotFound func and use it in wherever necessary

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: pre/post hooks are in place for resource-specific custom code

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: use SetManyOutput to get only status fields updated

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: prefix generated files with zz_ to match kubebuilder behavior

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: ready condition should be set by custom code

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: run goimports on generated code

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: add documentation comments to generated API files

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: use generator config file in the target provider directory

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: use crd name as module name for its controller

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: generate boilerplate only once for custom hooks

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: custom default config for SDKHelper used by Crossplane generation pipeline

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: licence boilerplates are corrected

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: added list filtering for readmany results

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: add inline custom parameter struct to Parameters so that we can add additional fields manually in a different file

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: use all-lower string for package name of the generated controllers

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: region field should not have omitempty tag and connect method does not need to call NewSession

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: ReadOne template is implemented

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: Make deletion optional and write isUpToDate to hooks

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

crossplane: add fallback for the case where service alias does not match the model name in sdk

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Copy link
Collaborator

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through this with @muvaf on Zoom. Welcome Crossplane to ACK land :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate crossplane-runtime types through the ACK codegen pipeline
2 participants