Skip to main content
Version: v1.0

Webservice

Description#

Describes long-running, scalable, containerized services that have a stable network endpoint to receive external network traffic from customers. If workload type is skipped for any service defined in Appfile, it will be defaulted to webservice type.

Specification#

List of all configuration options for a Webservice workload type.

...
image: oamdev/testapp:v1
cmd: ["node", "server.js"]
port: 8080
cpu: "0.1"
env:
- name: FOO
value: bar
- name: FOO
valueFrom:
secretKeyRef:
name: bar
key: bar

Properties#

NameDescriptionTypeRequiredDefault
cmdCommands to run in the container[]stringfalse
envDefine arguments by using environment variables[]envfalse
imageWhich image would you like to use for your servicestringtrue
portWhich port do you want customer traffic sent tointtrue80
cpuNumber of CPU units for the service, like 0.5 (0.5 CPU core), 1 (1 CPU core)stringfalse

env#

NameDescriptionTypeRequiredDefault
nameEnvironment variable namestringtrue
valueThe value of the environment variablestringfalse
valueFromSpecifies a source the value of this var should come fromvalueFromfalse

valueFrom#

NameDescriptionTypeRequiredDefault
secretKeyRefSelects a key of a secret in the pod's namespacesecretKeyReftrue
secretKeyRef#
NameDescriptionTypeRequiredDefault
nameThe name of the secret in the pod's namespace to select fromstringtrue
keyThe key of the secret to select from. Must be a valid secret keystringtrue
Last updated on by Jianbo Sun