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

add note for kubernetes constraints/nodeSelectors #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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: 5 additions & 3 deletions docs/reference/yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ This an optional boolean field, set to `false` by default.

### Function: Constraints

Constraints are passed directly to the underlying container orchestrator. They allow you to pin a function to certain host or type of host.
Constraints are passed _directly_ to the underlying container orchestrator. They allow you to pin a function to certain host or type of host.

Here is an example of picking only hosts with a Linux OS in Docker Swarm:
Here is an example of picking only hosts with a Linux OS in _Docker Swarm_:

```yaml
constraints:
Expand All @@ -177,6 +177,8 @@ Or only using nodes running with Windows:
- "node.platform.os == windows"
```

> Important note: The constraints for Kubernetes must be [nodeSelector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)s in the format "<label-key>=<label-value>"

### Function: Labels

Labels can be applied through a map which is passed directly to the container scheduler.
Expand Down Expand Up @@ -255,7 +257,7 @@ The meanings and formats of `limits` and `requests` may vary depending on whethe
- Requests ensures the stated host resource is available for the container to use
- Limits specify the maximum amount of host resources that a container can consume

See docs for [Docker Swarm](https://docs.docker.com/config/containers/resource_constraints/) or for [Kubernetes](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#how-pods-with-r esource-limits-are-run).
See docs for [Docker Swarm](https://docs.docker.com/config/containers/resource_constraints/) or for [Kubernetes](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#how-pods-with-resource-limits-are-run).

## Configuration
The configuration section allows you to define additional configuration that is global to the entire stack, currently this mostly impacts function build time options.
Expand Down