KnativeDeployerParameters
Class: KnativeDeployerParameters
Defined in: kubernetes/src/deployers/knative.service.ts:205
Parameters of the KnativeDeployer
Every string can use the deployment templates: ${package.version}, ${git.short},
${deployment}, ${deployer.name}, ${env.MY_VAR}, ...
Extends
ServiceParameters
Implements
Constructors
Constructor
new KnativeDeployerParameters():
KnativeDeployerParameters
Returns
KnativeDeployerParameters
Inherited from
ServiceParameters.constructor
Properties
annotations
annotations:
Record<string,string>
Defined in: kubernetes/src/deployers/knative.service.ts:351
Annotations of the revision template, added to the autoscaling ones
Default
{}
config?
optionalconfig?:string|K8sConfiguration
Defined in: kubernetes/src/deployers/knative.service.ts:212
Kubernetes configuration, the default kubeconfig when unset
Can be encrypted with webda config encrypt
Secret
users.token,users.password,users.keyData,users.authProvider
Implementation of
containerConcurrency
containerConcurrency:
number
Defined in: kubernetes/src/deployers/knative.service.ts:296
Hard limit of concurrent requests per replica, 0 for unlimited
Node handles concurrency: do not set it to 1.
Default
0
containerDeployer?
optionalcontainerDeployer?:string
Defined in: kubernetes/src/deployers/knative.service.ts:258
Name of a Webda/ContainerDeployer unit of the same deployment
When set, deploy pushes the image with it first and deploys the pushed digest: the revision
is pinned to the exact image.
context?
optionalcontext?:string
Defined in: kubernetes/src/deployers/knative.service.ts:216
Context of the kubeconfig to use
Implementation of
env
env:
Record<string,string>
Defined in: kubernetes/src/deployers/knative.service.ts:266
Environment variables of the container
WEBDA_HEALTH_PATH is added with healthPath, so the application answers the readiness probe.
Default
{}
envFrom
envFrom:
KnativeEnvFromSource[]
Defined in: kubernetes/src/deployers/knative.service.ts:272
Secrets and ConfigMaps loaded as environment variables
Default
[]
healthPath
healthPath:
string
Defined in: kubernetes/src/deployers/knative.service.ts:320
Path of the readiness probe, answered by the HttpServer healthPath
Empty for no HTTP probe: Knative then probes the TCP port.
Default
"/healthz"
image?
optionalimage?:string
Defined in: kubernetes/src/deployers/knative.service.ts:251
Image of the container, like ghcr.io/my-org/my-app:${git.version}
Required unless containerDeployer provides it.
labels
labels:
Record<string,string>
Defined in: kubernetes/src/deployers/knative.service.ts:357
Labels of the revision template
Default
{}
maxScale?
optionalmaxScale?:number
Defined in: kubernetes/src/deployers/knative.service.ts:284
Maximum number of replicas, unlimited when unset
minScale
minScale:
number
Defined in: kubernetes/src/deployers/knative.service.ts:280
Minimum number of replicas, 0 scales to zero when idle
Use 1 for latency-sensitive services: a cold start is the pod scheduling plus the application startup.
Default
0
name
name:
string
Defined in: kubernetes/src/deployers/knative.service.ts:245
Name of the Service, sanitized to a DNS-1123 label
Default
"${package.name}"
namespace
namespace:
string
Defined in: kubernetes/src/deployers/knative.service.ts:239
Namespace of the Service
On Cloud Run, the project id or number.
Default
"default"
output?
optionaloutput?:string
Defined in: kubernetes/src/deployers/knative.service.ts:380
File the manifest is written to, relative to the application
knative manifest writes it instead of printing it, deploy writes it before applying it.
platform
platform:
"knative"|"cloudrun"
Defined in: kubernetes/src/deployers/knative.service.ts:231
Platform the manifest targets: cloudrun adjusts the fields Cloud Run rejects or ignores
Cloud Run: no namespace (unless set to the project), minScale/maxScale annotations are camel-cased,
target and envFrom are dropped, containerConcurrency is capped to 1000 (0 becomes the Cloud Run
default), timeoutSeconds to 3600, the readiness probe becomes a startup probe and visibility
becomes the run.googleapis.com/ingress annotation.
Default
"knative"
port
port:
number
Defined in: kubernetes/src/deployers/knative.service.ts:312
Port the application listens on: Knative injects it as PORT, which the HttpServer honors
Default
8080
readyTimeout
readyTimeout:
number
Defined in: kubernetes/src/deployers/knative.service.ts:386
Seconds deploy waits for the Service to be Ready
Default
300
resources?
optionalresources?:KnativeResources
Defined in: kubernetes/src/deployers/knative.service.ts:306
Compute resources of the container
revisionSuffix
revisionSuffix:
string
Defined in: kubernetes/src/deployers/knative.service.ts:335
Suffix of the revision name (<name>-<suffix>), empty to let Knative generate it
A named revision is deterministic: deploying the same template twice creates no new revision, and the suffix must change with the template (Knative refuses a different template under the same name).
Default
"${git.short}"
serviceAccountName?
optionalserviceAccountName?:string
Defined in: kubernetes/src/deployers/knative.service.ts:339
Service account of the pods
target?
optionaltarget?:number
Defined in: kubernetes/src/deployers/knative.service.ts:288
Concurrent requests per replica the autoscaler aims for, the Knative default (100) when unset
template?
optionaltemplate?:string|Record<string,any>
Defined in: kubernetes/src/deployers/knative.service.ts:364
Overrides deep-merged on the generated Service: an object, or the path of a YAML/JSON file relative to the application
Arrays replace the generated ones.
timeout?
optionaltimeout?:number
Defined in: kubernetes/src/deployers/knative.service.ts:220
Milliseconds before a request to the Kubernetes API is aborted, no timeout when unset
Implementation of
timeoutSeconds
timeoutSeconds:
number
Defined in: kubernetes/src/deployers/knative.service.ts:302
Seconds a request can take before the revision times it out
Default
300
traffic?
optionaltraffic?:KnativeTrafficTarget[]
Defined in: kubernetes/src/deployers/knative.service.ts:326
Traffic split between the revisions
Default
[{ "latestRevision": true, "percent": 100 }]
triggers
triggers:
KnativeTrigger[]
Defined in: kubernetes/src/deployers/knative.service.ts:374
Knative Eventing Triggers delivering the events of a Broker to the application
Each one becomes an eventing.knative.dev/v1 Trigger whose subscriber is the Service on path, the route
of a Webda/CloudEventsReceiver. knative manifest prints them after the Service, deploy applies them once
the Service is Ready and knative delete removes them. Dropped on Cloud Run (use Eventarc).
Default
[]
type
type:
string
Defined in: core/lib/services/serviceparameters.d.ts:9
Type of the service
Inherited from
ServiceParameters.type
visibility
visibility:
"public"|"cluster-local"
Defined in: kubernetes/src/deployers/knative.service.ts:345
cluster-local keeps the Service off the external ingress
Default
"public"
Methods
load()
load(
params?):this
Defined in: kubernetes/src/deployers/knative.service.ts:391
Parameters
params?
any = {}
Returns
this
Overrides
ServiceParameters.load
update()
update(
params,delta):this
Defined in: core/lib/application/parameters.d.ts:21
Update parameters and call watchers if a parameter was changed
Parameters
params
any
the service parameters
delta
any
the delta
Returns
this
this for chaining
Inherited from
ServiceParameters.update
with()
with(
callback):this
Defined in: core/lib/application/parameters.d.ts:27
Watch for changes on the parameters and call watchers when a parameter is changed
Parameters
callback
(params) => void
the callback function
Returns
this
this for chaining
Inherited from
ServiceParameters.with