Skip to content
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

be explicit about ports for workers and servers #217

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions 3.component_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ A Server is used for long-running, scalable workloads that have a network endpoi
- A Server is daemonized. A runtime MUST attempt to restart replicas that exit regardless of error code.
- A Server has a network endpoint with an automatically assigned virtual IP address (VIP) and DNS name addressable within the network scope to which the component belongs.

> If a Server does not provide at least one `port` on at least one `container`, implementations SHOULD emit an error.


##### Singleton Server
Workload type name: `core.oam.dev/v1alpha1.SingletonServer`

Expand All @@ -143,6 +146,8 @@ A Singleton Server is a special case of the Server workload type that is limited
- A Singleton Server is daemonized. A runtime MUST attempt to restart the singleton replica if it exits regardless of error code.
- A Singleton Server has a network endpoint with an automatically assigned virtual IP address (VIP) and DNS name addressable within the network scope to which the component belongs.

> If a Singleton Server does not provide at least one `port` on at least one `container`, implementations SHOULD emit an error.

##### Worker
Workload type name: `core.oam.dev/v1alpha1.Worker`

Expand All @@ -151,13 +156,16 @@ A worker is used for long-running, scalable workloads that do not have a service
- An application operator can increase or decrease the number of worker replicas by applying and configuring traits when available.
- A worker is daemonized. A runtime MUST attempt to restart replicas that exit regardless of error code.

> If a Worker declares a port, this SHOULD result in a validation error.

##### Singleton Worker
Workload type name: `core.oam.dev/v1alpha1.SingletonWorker`

A singleton worker is a special case of the worker workload type that is limited to at most one replica. The singleton worker workload type as the following characteristics:
- Defines a container runtime where at most one replica of the same container may be run at a time.
- A singleton worker is daemonized. A runtime MUST attempt to restart the singleton replica if it exits regardless of error code.

> If a Singleton Worker declares a port, this SHOULD result in a validation error.

##### Task
Workload type name: `core.oam.dev/v1alpha1.Task`
Expand Down