What happened?
I am trying to set the status via an annotation, like:
gotemplating.fn.crossplane.io/ready: {{ ( getResourceCondition "Ready" $resource).Status }}
but the status returned from the condition in Kubernetes is one of these legal values:
const (
ConditionTrue ConditionStatus = "True"
ConditionFalse ConditionStatus = "False"
ConditionUnknown ConditionStatus = "Unknown"
)
while the legal values in funtion-go-templating is:
const (
ReadyUnspecified Ready = "Unspecified"
ReadyTrue Ready = "True"
ReadyFalse Ready = "False"
)
This means we cannot easily "transport" values from the resource to the annotation, but have to have conditionals to map between Unknown and Unspecified, resulting in invalid function input: invalid "gotemplating.fn.crossplane.io/ready" annotation value "Unknown": must be True, False, or Unspecified
What environment did it happen in?
Function version: v0.5.0