https://github.com/salaboy/cdevents-provider
Crossplane Provider to Emit and consume CD Events
https://github.com/salaboy/cdevents-provider
Last synced: 15 days ago
JSON representation
Crossplane Provider to Emit and consume CD Events
- Host: GitHub
- URL: https://github.com/salaboy/cdevents-provider
- Owner: salaboy
- License: apache-2.0
- Created: 2022-02-12T08:50:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-31T08:43:39.000Z (about 3 years ago)
- Last Synced: 2025-02-17T19:13:39.306Z (3 months ago)
- Language: Go
- Size: 10.3 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Initial setup and design
Currently we have the following things defined in the setup:
1. A local kind cluster that will be used to provision our bootstraping cluster on GKE,
this can be useful for cases when we want to teardown / reset upstream infra.
1. Create a local kind cluster with `make orch-cluster`
2. Install `crossplane` and `crossplane gcp-provider` on this local kind cluster - `make install-crossplane`
3. We are now ready to provision our bootstrap GKE cluster and load it with `provider-helm` and `crossplane` itself.
```
make create-bootstrap-cluster
```
2. At the end of above steps we should have a GKE Cluster provisioned, and the crossplane chart deployed on this cluster through helm.
3. Get the bootstrap cluster creds locally with `make get-credentials`.
4. Install knative-eventing onto this cluster – `make install-knative-eventing`
5. Install tekton and setup required RBAC – `make install-tekton`### Use existing cluster as a bootstrap cluster
If we already have a cluster to use as a bootstrap cluster - to host crossplane and other bootstrapping
utilities, then we can skip a few steps and directly jump to the following:1. Install crossplane on the bootstrapping cluster - `make install-crossplane`
2. Install tekton - `make install-tekton`
3. Install knative eventing - `make install-knative-eventing`
4. Apply tekton resources - `make install-tekton-resources`. This sets up the following tekton resources:
1. `ClusterRole` and `ClusterRoleBinding` for `default` SA
2. `PipelineResource` of the git repository to fetch from
3. Tekton `Task` for applying the crossplane `Cluster` and `NodePool` yaml manifests.
4. Tekton `EventListener`, `TriggerBinding` and `TriggerTemplate` resourcesAt the end of this, we have a fully connected flow all the way from an event listener to creating a cluster through crossplane.
### Controllers and types
Currently we have all the existing types and controllers defined in `provider-template`
* `ProviderConfig` – will hold configuration for CDEvents like endpoint to connect to, callback URL etc.
* `MyType` - just for reference, will be removed
* `Cluster controller` - controller for the `github.com/crossplane/provider-gcp/apis/container/v1beta2` resource, we would track this and wait for `Status.Conditions[].Ready == True` and trigger the CDEvent for the start# provider-template
`provider-template` is a minimal [Crossplane](https://crossplane.io/) Provider
that is meant to be used as a template 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 template to create a new one.
1. Find-and-replace `provider-template` with your provider's name.
1. Run `make` to initialize the "build" Make submodule we use for CI/CD.
1. Run `make reviewable` to run code generation, linters, and tests.
1. Replace `MyType` with your own managed resource implementation(s).Refer to Crossplane's [CONTRIBUTING.md] file for more information on how the
Crossplane community prefers to work. The [Provider Development][provider-dev]
guide may also be of use.[CONTRIBUTING.md]: https://github.com/crossplane/crossplane/blob/master/CONTRIBUTING.md
[provider-dev]: https://github.com/crossplane/crossplane/blob/master/docs/contributing/provider_development_guide.md