Add generic Knative service contract
This commit is contained in:
parent
4a0cc103e8
commit
f906d26807
4 changed files with 62 additions and 2 deletions
30
examples/service.yaml
Normal file
30
examples/service.yaml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: example-workload
|
||||
namespace: example-workload
|
||||
annotations:
|
||||
serving.knative.dev/visibility: cluster-local
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
autoscaling.knative.dev/min-scale: "0"
|
||||
autoscaling.knative.dev/max-scale: "3"
|
||||
autoscaling.knative.dev/target: "4"
|
||||
spec:
|
||||
containerConcurrency: 4
|
||||
timeoutSeconds: 30
|
||||
containers:
|
||||
- image: registry.example.invalid/workload@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
resources:
|
||||
requests: {cpu: 50m, memory: 64Mi}
|
||||
limits: {cpu: 500m, memory: 256Mi}
|
||||
traffic:
|
||||
- latestRevision: true
|
||||
percent: 100
|
||||
Loading…
Add table
Add a link
Reference in a new issue