Documentation
¶
Overview ¶
Package render turns one deployment request into the Kubernetes objects a cluster agent applies: per service a Deployment, a Service, a ConfigMap and a Secret, labelled as KyYard's. It runs in the agent only; the server never imports it and links no Kubernetes library.
Index ¶
Constants ¶
const ( LabelName = "app.kubernetes.io/name" LabelInstanceName = "app.kubernetes.io/instance" LabelManagedBy = "app.kubernetes.io/managed-by" LabelApplication = "kyyard.busnes.app/application" LabelInstance = "kyyard.busnes.app/instance" LabelService = "kyyard.busnes.app/service" AnnotationRevision = "kyyard.busnes.app/revision" AnnotationDeployment = "kyyard.busnes.app/deployment" AnnotationSpecDigest = "kyyard.busnes.app/spec-digest" ManagedBy = "kyyard" )
Labels and annotations on every object KyYard applies. LabelInstance is ownership: an object with the planned name that lacks it, or carries another instance's, is not KyYard's to touch.
const ( ProgressDeadlineSeconds = 540 MinReadySeconds = 10 )
ProgressDeadlineSeconds is below the server's ten-minute apply deadline, so a stuck rollout is reported by the Deployment itself (ProgressDeadlineExceeded) while the agent still waits. MinReadySeconds keeps a process that exits seconds after it starts from counting as available.
Variables ¶
This section is empty.
Functions ¶
func Labels ¶
func Labels(req protocol.DeploymentRequest, s string) map[string]string
Labels are the labels of every object of service s of the instance req targets.
Types ¶
type Set ¶
type Set struct {
Service string
Name string
ConfigMap *corev1.ConfigMap
Secret *corev1.Secret
Deployment *appsv1.Deployment
Endpoint *corev1.Service
Claims []*corev1.PersistentVolumeClaim
}
Set is one service's objects. Secret is nil when the service has no secret-backed value, and Service is nil when it publishes no port. Claims are the PersistentVolumeClaims it mounts, each mounted by this service alone.
func Request ¶
func Request(req protocol.DeploymentRequest) []Set
Request renders every service of req, in order. req must have passed ValidateFor(protocol.RuntimeKubernetes, ...).