services: in inframan.yaml is a service: one container image, built from one Dockerfile, deployed as one unit. Its type decides how it runs.
Service types
inframan.yaml
A
job runs on each release and is retried up to three times if it fails. It has no schedule: Inframan doesn’t run cron jobs. For work that must happen before a release, such as a database migration, use a pre-deploy step instead.How a web service runs
A web service runs on one of two runtimes. Itsscaling.type decides which:
Both runtimes run the same pod: the same image, environment, probes and resources. You can switch a service between them by changing
scaling.type and deploying.
If a service asks for concurrency on an infrastructure without Knative, its release fails with SCALING_TYPE_UNSUPPORTED. Install Knative, or change the service to hpa.
See Autoscaling for how each scaler behaves.
One version per release
Every release runs each service as a new, separately named version, such asapi-v42. With the default blue-green rollout, the previous version keeps running until traffic has moved to the new one, then it’s removed. With recreate, it stops first. This is what makes revisions, traffic splitting and rollback possible.
Each version has its own internal address, http://api-v42-00001.<namespace>.svc.cluster.local, on both runtimes. Connections between services use these addresses, so services always reach the version that shipped with them.
Resources
Every replica gets requests and limits, whether you set them or not. On non-production infrastructures the defaults are:
Set your own under
resources in inframan.yaml. A replica that goes over its memory limit is restarted by Kubernetes.
Shutting down
When a replica is stopped, it receivesSIGTERM and has termination_grace_seconds to finish its work, 30 seconds by default, before it’s killed. Give a worker that processes long jobs more time.