1:19

📚 / Concepts / Unit / Schema

Custom Resource Definition

API GroupVersionKind
kubirds.comv1Unit

Unit

NameTypeDescription
specUnitSpecSpecification of the desired behavior
statusUnitStatusStatus filled by the operator

UnitSpec

NameTypeDescription
schedulestringDescribe when the unit must be inhibited. RRule in human readable format or standard format (see RRule Spec), ie: every 5 minutes
imageImageDescribe the Docker image to use for the reactor
serviceAccountNamestringName of the service account used to run the pod (defaults to default)
historyintegerDescribe how many recent PipelineRun resources should be kept (minimum is 1)
envEnvVar arrayList of environment variables to set in the container
envFromEnvFromSource arrayList of sources to populate environment variables in the container
volumesVolume arrayList of volumes to mount in the container

Image

NameTypeDescription
namestringDocker image name (ie: alpine:latest)
pullPolicyImagePullPolicyWhen to pull the image
commandstringCommand to execute inside the container

ImagePullPolicy

One of:

  • Always
  • Never
  • IfNotPresent

Volume

Same as a Kubernetes Volume but with those extra properties:

NameTypeDescription
pathstringMount path in the container

UnitStatus

NameTypeDescription
lastStateUnitStateLast known result of the Unit
lastStateSeenDate/TimeDateTime when the last known result has been observed
phaseAdmissionPhaseCurrent status of the Unit admission workflow
failureReasonsstring arrayErrors encountered during the Unit admission workflow
conditionsCondition arrayCurrent status of the Unit execution workflow

UnitState

One of:

  • Unknown
  • Succeeded
  • Failed

AdmissionPhase

One of:

  • Accepted
  • Rejected

Condition

NameTypeDescription
typeUnitConditionTypeType of the resource's condition
statusstringValue associated to the resource's condition
lastTransitionTimeDateTimeDate when the condition last changed

UnitConditionType

One of:

  • Completed: associated status is either "True" or "False"
  • Pending: associated status is either "True" or "False"