Git Product home page Git Product logo

provider-magento's Introduction

provider-magento

provider-magento is a minimal Crossplane Provider that is meant to be used as a magento for implementing new Providers. It comes with the following features that are meant to be refactored:

  • A ProviderConfig type that only points to a credentials Secret.
  • A MyType resource type that serves as an example managed resource.
  • A managed resource controller that reconciles MyType objects and simply prints their configuration in its Observe method.

Developing

  1. Use this repository as a magento to create a new one.
  2. Run make submodules to initialize the "build" Make submodule we use for CI/CD.
  3. Rename the provider by running the following command:
  export provider_name=MyProvider # Camel case, e.g. GitHub
  make provider.prepare provider=${provider_name}
  1. Add your new type by running the following command:
  export group=sample # lower case e.g. core, cache, database, storage, etc.
  export type=MyType # Camel casee.g. Bucket, Database, CacheCluster, etc.
  make provider.addtype provider=${provider_name} group=${group} kind=${type}
  1. Replace the sample group with your new group in apis/{provider}.go
  2. Replace the mytype type with your new type in internal/controller/{provider}.go
  3. Replace the default controller and ProviderConfig implementations with your own
  4. Run make reviewable to run code generation, linters, and tests.
  5. Run make build to build the provider.

Refer to Crossplane's CONTRIBUTING.md file for more information on how the Crossplane community prefers to work. The Provider Development guide may also be of use.

provider-magento's People

Contributors

ca7alindev avatar evghen1 avatar

provider-magento's Issues

Category API schema

What problem are you facing?

As most of easy object in Magento is Category we could start to make API schema for it.

How could Crossplane help solve your problem?

Create categories/v1alpha1 with next required types definitions and their fields:

ProviderConfig for Magento Provider

What problem are you facing?

Required to provide credentials to provider for access Magento API.

How could Crossplane help solve your problem?

Create ProviderConfig for Magento Provider for communicate with Magento 2 REST API using token.

Universal Controller for generated Magento CRDs

What problem are you facing?

As we have to implement CRDs observation for 100+ Magento API endpoints, and if we will create manually code for every endpoint, we will have multiple places of fail and will spend a lot of time for create and support it.

How could Crossplane help solve your problem?

Optimal would be to create universal controller which will observe and control objects by standard RESTful API definitions.

Cache Magento client

What problem are you facing?

Everytime provider requests magento client it creates new instance of RESTful client, what is not best on multiple invocations

How could Crossplane help solve your problem?

Cache in memory magento client after first creation and return it next time from cache.

Base controller and category reconciliation

What problem are you facing?

After we created category schema is good time to try to do base provider controller, which will use Magento provider config for establishing client for connecting Magento rest api

How could Crossplane help solve your problem?

  • make provider config for Magento connecting credentials
  • make controller which will take provider config from category provider config ref field and will make connection client
  • make reconciliation of category for create/update/delete categories.

Pack and store provider OCI image on tag push

What problem are you facing?

I wan to test provider, but package image is not built and released automatically.

How could Crossplane help solve your problem?

Make GitHub action for build and push to GitHub packages provider package, on new tag pushed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.