Links

default-module

Reference for humanitec/default-module Workload Profile
This Workload Profile generates a Kubernetes Deployment which will roll out a ReplicaSet. It is therefore intended for stateless workloads. In practice this covers the vast majority of workloads used in Kubernetes.

Features

Feature
Description
Specify Annotations that will be added to Pods generated for the workload.
Add one or more containers to the workload.
ingress
Create Ingress objects to make the workload accessible from outside the cluster via a DNS name.
labels
Specify Labels that will be added to Pods generated for the workload.
replicas
A runtime feature allowing the number of replicas to be set.
service
Create a Service object to provide a stable way of addressing the workload within the cluster.
Specify the Service Account pods should run under.

Example

{
"labels": {
"prometheus-name": "my-workload"
},
"containers": {
"my-container": {
"args": [
"--run",
"webserver"
],
"command": [
"node",
"index.js"
],
"id": "sample-service",
"image": "registry.humanitec.io/public/sample-service:1.2.0",
"liveness_probe": {
"path": "/alive",
"port": 8080,
"type": "http"
},
"readiness_probe": {
"path": "/ready",
"port": 8080,
"type": "http"
},
"resources": {
"limits": {
"cpu": "0.250",
"memory": "256Mi"
},
"requests": {
"cpu": "0.025",
"memory": "64Mi"
}
},
"variables": {
"MY_ENV_VAR": "Hello World!"
}
}
},
"ingress": {
"rules": {
"externals.dns": {
"http": {
"*": {
"port": 8080,
"type": "default"
}
}
}
}
},
"service": {
"ports": {
"www": {
"service_port": 8080
}
}
},
"serviceAccountName": "my-service-account"
}