Documentation ¶
Overview ¶
Converts Kubernetes data models into our own internal data models.
(package name loosely inspired by strconv)
Index ¶
- Variables
- func ContainerForStatus(pod *v1.Pod, cStatus v1.ContainerStatus) (v1alpha1.Container, error)
- func ContainerStatusToRuntimeState(status v1alpha1.Container) v1alpha1.RuntimeStatus
- func Pod(ctx context.Context, pod *v1.Pod, ancestorUID types.UID, ...) *v1alpha1.Pod
- func PodConditions(conditions []v1.PodCondition) []v1alpha1.PodCondition
- func PodContainers(ctx context.Context, pod *v1.Pod, containerStatuses []v1.ContainerStatus) []v1alpha1.Container
- func PodStatusErrorMessages(pod v1.Pod) []string
- func PodStatusToString(pod v1.Pod) string
- func SpanIDForPod(mn model.ManifestName, podID k8s.PodID) logstore.SpanID
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ContainerForStatus ¶
Convert a Kubernetes Pod and ContainerStatus into a simpler Container model to store in the engine state.
func ContainerStatusToRuntimeState ¶
func ContainerStatusToRuntimeState(status v1alpha1.Container) v1alpha1.RuntimeStatus
func PodConditions ¶ added in v0.19.7
func PodConditions(conditions []v1.PodCondition) []v1alpha1.PodCondition
func PodContainers ¶
func PodContainers(ctx context.Context, pod *v1.Pod, containerStatuses []v1.ContainerStatus) []v1alpha1.Container
Convert a Kubernetes Pod into a list of simpler Container models to store in the engine state.
func PodStatusErrorMessages ¶ added in v0.20.0
Pull out interesting error messages from the pod status
func PodStatusToString ¶ added in v0.20.0
copied from https://github.com/kubernetes/kubernetes/blob/aedeccda9562b9effe026bb02c8d3c539fc7bb77/pkg/kubectl/resource_printer.go#L692-L764 to match the status column of `kubectl get pods`
func SpanIDForPod ¶ added in v0.19.7
SpanIDForPod creates a span ID for a given pod associated with a manifest.
Generally, a given Pod is only referenced by a single manifest, but there are rare occasions where it can be referenced by multiple. If the span ID is not unique between them, things will behave erratically.
Types ¶
This section is empty.