-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat/publishing-strategies-api #302
Conversation
… are exposed to service consumers
Each workload will define its endpoint/s publishing default so a mechanism is required to override the default with the options passed by the user in the external API.
To unlock the possibility of deploying 2 different publishing strategies for the same endpoint, the whole list of strategies needs to be replaces, because with Merge only one strategy can exists per endpoint, otherwise it wouldn't know how to do the merge. Replace allows exposing the same endpoint through several different strategies in parallel, which unlocks the possiblity of DNS based migrations without downtime.
/kind feature |
27b9378
to
64ab328
Compare
675e62e
to
47a9e81
Compare
1b547ca
to
7ce0e0b
Compare
/lgtm Outstanding work, congrats @roivaz |
LGTM label has been added. Git tree hash: be46faffb136d92ea398c0812ac2f0204a4f14c4
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roivaz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adds new PublishingStrategies API to unify how workloads are exposed.
Design
Any workload that exposes an endpoint that can be consumed by clients (either in-cluster or out-of-cluster clients) exposes the api field
publishingStrategies
, which allows a user to configure how the endpoint/s is/are exposed. This is called a "publishing strategy". All workload endpoints have a default publishing strategy, which right now can be one of two types: "Simple" or "Marin3rSidecar".Other design decisions:
create: true
is set to declare the intent of creating a new endpoint.create: true
when adding a new endpoint.Simple strategy
The service is exposed through a k8s Service resource, which can be a ClusterIP Service or a LoadBalancer Service (either NLB or ELB).
Marin3rStrategy
Upgrade
Each controller will upgrade it's the custom resources to migrate from the old API fields to the new
publishingStrategies
field. As default Service names have changed, the controllers will check if the Services already exists and keep the old names to avoid recreation of Service, which most certainly would lead to loss of Service during the upgrade. This has been tested in dev but still requires thorough testing in the staging environment.