Documentation ¶
Index ¶
- type Conditions
- type ContainerPortSpec
- type ContainerProbe
- type ContainerSpec
- type ContainerState
- type ContainerStateRunning
- type ContainerStateTerminated
- type ContainerStateWaiting
- type ContainerStatus
- type EnvVar
- type PersistentVolumeClaimSpec
- type Pod
- type PodList
- type PodMetadata
- type PodOwner
- type Spec
- type Status
- type VolumeSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conditions ¶
type Conditions struct { Type string `json:"type,omitempty"` Status string `json:"status,omitempty"` }
Conditions contains fields for unmarshalling a Pod.Status.Conditions
type ContainerPortSpec ¶
type ContainerPortSpec struct { ContainerPort int `json:"containerPort"` HostPort int `json:"hostPort"` Name string `json:"name"` Protocol string `json:"protocol"` }
ContainerPortSpec contains fields for unmarshalling a Pod.Spec.Containers.Ports
type ContainerProbe ¶
type ContainerProbe struct {
InitialDelaySeconds int `json:"initialDelaySeconds"`
}
ContainerProbe contains fields for unmarshalling a Pod.Spec.Containers.ReadinessProbe
type ContainerSpec ¶
type ContainerSpec struct { Name string `json:"name"` Image string `json:"image,omitempty"` Ports []ContainerPortSpec `json:"ports,omitempty"` ReadinessProbe *ContainerProbe `json:"readinessProbe,omitempty"` Env []EnvVar `json:"env,omitempty"` }
ContainerSpec contains fields for unmarshalling a Pod.Spec.Containers
type ContainerState ¶
type ContainerState struct { Waiting *ContainerStateWaiting `json:"waiting,omitempty"` Running *ContainerStateRunning `json:"running,omitempty"` Terminated *ContainerStateTerminated `json:"terminated,omitempty"` }
ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.
type ContainerStateRunning ¶
ContainerStateRunning is a running state of a container.
type ContainerStateTerminated ¶
type ContainerStateTerminated struct { ExitCode int32 `json:"exitCode"` StartedAt time.Time `json:"startedAt"` FinishedAt time.Time `json:"finishedAt"` }
ContainerStateTerminated is a terminated state of a container.
type ContainerStateWaiting ¶
type ContainerStateWaiting struct {
Reason string `json:"reason"`
}
ContainerStateWaiting is a waiting state of a container.
type ContainerStatus ¶
type ContainerStatus struct { Name string `json:"name"` Image string `json:"image"` ImageID string `json:"imageID"` ID string `json:"containerID"` Ready bool `json:"ready"` State ContainerState `json:"state"` }
ContainerStatus contains fields for unmarshalling a Pod.Status.Containers
func (*ContainerStatus) IsPending ¶
func (c *ContainerStatus) IsPending() bool
IsPending returns if the container doesn't have an ID
func (*ContainerStatus) IsTerminated ¶
func (c *ContainerStatus) IsTerminated() bool
IsTerminated returns if the container is in a terminated state
type EnvVar ¶
type EnvVar struct { // Name of the environment variable. Must be a C_IDENTIFIER. Name string `json:"name"` // Value of the environment variable. Value string `json:"value,omitempty"` }
EnvVar represents an environment variable present in a Container.
type PersistentVolumeClaimSpec ¶
type PersistentVolumeClaimSpec struct {
ClaimName string `json:"claimName"`
}
PersistentVolumeClaimSpec contains fields for unmarshalling a Pod.Spec.Volumes.PersistentVolumeClaim
type Pod ¶
type Pod struct { Spec Spec `json:"spec,omitempty"` Status Status `json:"status,omitempty"` Metadata PodMetadata `json:"metadata,omitempty"` }
Pod contains fields for unmarshalling a Pod
func (*Pod) GetPersistentVolumeClaimNames ¶
GetPersistentVolumeClaimNames gets the persistent volume names from a statefulset pod returns empty slice if no persistent volume claim was found
type PodList ¶
type PodList struct {
Items []*Pod `json:"items,omitempty"`
}
PodList contains fields for unmarshalling a PodList
type PodMetadata ¶
type PodMetadata struct { Name string `json:"name,omitempty"` UID string `json:"uid,omitempty"` Namespace string `json:"namespace,omitempty"` ResVersion string `json:"resourceVersion,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Labels map[string]string `json:"labels,omitempty"` Owners []PodOwner `json:"ownerReferences,omitempty"` }
PodMetadata contains fields for unmarshalling a pod's metadata
type PodOwner ¶
type PodOwner struct { Kind string `json:"kind,omitempty"` Name string `json:"name,omitempty"` ID string `json:"uid,omitempty"` }
PodOwner contains fields for unmarshalling a Pod.Metadata.Owners
type Spec ¶
type Spec struct { HostNetwork bool `json:"hostNetwork,omitempty"` NodeName string `json:"nodeName,omitempty"` InitContainers []ContainerSpec `json:"initContainers,omitempty"` Containers []ContainerSpec `json:"containers,omitempty"` Volumes []VolumeSpec `json:"volumes,omitempty"` PriorityClassName string `json:"priorityClassName,omitempty"` }
Spec contains fields for unmarshalling a Pod.Spec
type Status ¶
type Status struct { Phase string `json:"phase,omitempty"` HostIP string `json:"hostIP,omitempty"` PodIP string `json:"podIP,omitempty"` Containers []ContainerStatus `json:"containerStatuses,omitempty"` InitContainers []ContainerStatus `json:"initContainerStatuses,omitempty"` AllContainers []ContainerStatus Conditions []Conditions `json:"conditions,omitempty"` }
Status contains fields for unmarshalling a Pod.Status
func (*Status) GetAllContainers ¶
func (s *Status) GetAllContainers() []ContainerStatus
GetAllContainers returns the list of init and regular containers the list is created lazily assuming container statuses are not modified
type VolumeSpec ¶
type VolumeSpec struct { Name string `json:"name"` // Only try to retrieve persistent volume claim to tag statefulsets PersistentVolumeClaim *PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"` }
VolumeSpec contains fields for unmarshalling a Pod.Spec.Volumes