jacero-io / kode-operator

Apache License 2.0
0 stars 0 forks source link

[entrypoint] Able to control Ingress API and Gateway API #13

Open emil-jacero opened 1 week ago

emil-jacero commented 1 week ago

A requested feature is to have a CRD that simplifies the publishing of Kode instances.

Each Kode resource should belong to a single user, and only that user. This could be accomplished in many different ways.

Subdomains

Assign a unique subdomain for each user's instance. For example, user1.kode.example.com, user2.kode.example.com. A sub-path for each Kode instance is required.

Advantages:

Disadvantages:

URL Paths

Use URL paths to differentiate users, such as kode.example.com/user1, kode.example.com/user2. A sub-path for each Kode instance is required.

Advantages:

Disadvantages:

Unique Ports

Assign a unique port for each user's instance, such as kode.example.com:3001, kode.example.com:3002. A sub-path for each Kode instance is required.

Advantages:

Disadvantages:

Summary & Reflection

There are more options like utilizing a service-mesh within Kubernetes to route traffic, but that would require this project to integrate with each service-mesh out there and that would take to much time.

The Unique port option is simple but a bit ugly. I foresee some use-cases where this might be wanted. For example in single cluster deployments, and where there are no easy way to configure DNS and access to certificates.

The Subdomain and URL Paths options are both the standard elsewhere in the industry and are relatively easy to implement. I might also add support for External-DNS as an option to just using wildcard DNS records.

emil-jacero commented 1 week ago

Add support for external-dns: https://github.com/emil-jacero/kode-operator/issues/15