chore(style): Comply with style guide, order list
Signed-off-by: sh0rez <me@shorez.de>
This commit is contained in:
parent
1b144e499f
commit
88b79bae64
|
@ -216,7 +216,7 @@ func (p *Pod) buildPod(pod *apiv1.Pod) *targetgroup.Group {
|
||||||
|
|
||||||
containers := append(pod.Spec.Containers, pod.Spec.InitContainers...)
|
containers := append(pod.Spec.Containers, pod.Spec.InitContainers...)
|
||||||
for i, c := range containers {
|
for i, c := range containers {
|
||||||
is_init := i >= len(pod.Spec.Containers)
|
isInit := i >= len(pod.Spec.Containers)
|
||||||
|
|
||||||
// If no ports are defined for the container, create an anonymous
|
// If no ports are defined for the container, create an anonymous
|
||||||
// target per container.
|
// target per container.
|
||||||
|
@ -226,7 +226,7 @@ func (p *Pod) buildPod(pod *apiv1.Pod) *targetgroup.Group {
|
||||||
tg.Targets = append(tg.Targets, model.LabelSet{
|
tg.Targets = append(tg.Targets, model.LabelSet{
|
||||||
model.AddressLabel: lv(pod.Status.PodIP),
|
model.AddressLabel: lv(pod.Status.PodIP),
|
||||||
podContainerNameLabel: lv(c.Name),
|
podContainerNameLabel: lv(c.Name),
|
||||||
podContainerIsInit: lv(strconv.FormatBool(is_init)),
|
podContainerIsInit: lv(strconv.FormatBool(isInit)),
|
||||||
})
|
})
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -241,7 +241,7 @@ func (p *Pod) buildPod(pod *apiv1.Pod) *targetgroup.Group {
|
||||||
podContainerPortNumberLabel: lv(ports),
|
podContainerPortNumberLabel: lv(ports),
|
||||||
podContainerPortNameLabel: lv(port.Name),
|
podContainerPortNameLabel: lv(port.Name),
|
||||||
podContainerPortProtocolLabel: lv(string(port.Protocol)),
|
podContainerPortProtocolLabel: lv(string(port.Protocol)),
|
||||||
podContainerIsInit: lv(strconv.FormatBool(is_init)),
|
podContainerIsInit: lv(strconv.FormatBool(isInit)),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -754,10 +754,10 @@ Available meta labels:
|
||||||
* `__meta_kubernetes_pod_annotation_<annotationname>`: Each annotation from the pod object.
|
* `__meta_kubernetes_pod_annotation_<annotationname>`: Each annotation from the pod object.
|
||||||
* `__meta_kubernetes_pod_annotationpresent_<annotationname>`: `true` for each annotation from the pod object.
|
* `__meta_kubernetes_pod_annotationpresent_<annotationname>`: `true` for each annotation from the pod object.
|
||||||
* `__meta_kubernetes_pod_container_name`: Name of the container the target address points to.
|
* `__meta_kubernetes_pod_container_name`: Name of the container the target address points to.
|
||||||
|
* `__meta_kubernetes_pod_container_port_is_init`: `true` if the container is an [InitContainer](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/)
|
||||||
* `__meta_kubernetes_pod_container_port_name`: Name of the container port.
|
* `__meta_kubernetes_pod_container_port_name`: Name of the container port.
|
||||||
* `__meta_kubernetes_pod_container_port_number`: Number of the container port.
|
* `__meta_kubernetes_pod_container_port_number`: Number of the container port.
|
||||||
* `__meta_kubernetes_pod_container_port_protocol`: Protocol of the container port.
|
* `__meta_kubernetes_pod_container_port_protocol`: Protocol of the container port.
|
||||||
* `__meta_kubernetes_pod_container_port_is_init`: Designates whether the container is an [InitContainer](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/)
|
|
||||||
* `__meta_kubernetes_pod_ready`: Set to `true` or `false` for the pod's ready state.
|
* `__meta_kubernetes_pod_ready`: Set to `true` or `false` for the pod's ready state.
|
||||||
* `__meta_kubernetes_pod_phase`: Set to `Pending`, `Running`, `Succeeded`, `Failed` or `Unknown`
|
* `__meta_kubernetes_pod_phase`: Set to `Pending`, `Running`, `Succeeded`, `Failed` or `Unknown`
|
||||||
in the [lifecycle](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase).
|
in the [lifecycle](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase).
|
||||||
|
|
Loading…
Reference in New Issue