googleinterns / knative-source-mongodb

Apache License 2.0
3 stars 2 forks source link

Create the MongoDbSource v1alpha1 types #3

Closed nachocano closed 4 years ago

nachocano commented 4 years ago

Problem We should create a new MongoDB type, together with its defaults, validation, and lifecycle functionality.

Persona: Developer

Exit Criteria mongodb_types, mongodb_defaults, mongodb_validation, and mongodb_lifecyle go files available in the repo

Additional context (optional) https://github.com/google/knative-gcp/tree/master/pkg/apis/events/v1alpha1 https://github.com/knative/eventing-contrib/tree/master/couchdb/source/pkg/apis/sources/v1alpha1

nachocano commented 4 years ago

Highest priority to start with

nachocano commented 4 years ago

Some initial thoughts:

We should create a MongoDbSource type. Its spec should contain (at least for now):

duckv1.SourceSpec database (mandatory) collection (optional) serviceAccountName (optional) secret (mandatory) serviceAccountName (optional)

The status can be just duckv1.SourceStatus for now.

Let's try to generate the client code with hack/update-codegen.sh as well.