chore(style): Comply with style guide, order list

Signed-off-by: sh0rez <me@shorez.de>
This commit is contained in:
sh0rez 2019-05-29 11:22:10 +02:00
parent 1b144e499f
commit 88b79bae64
No known key found for this signature in database
GPG Key ID: 87C71DF9F8181FF1
2 changed files with 4 additions and 4 deletions

View File

@ -216,7 +216,7 @@ func (p *Pod) buildPod(pod *apiv1.Pod) *targetgroup.Group {
containers := append(pod.Spec.Containers, pod.Spec.InitContainers...)
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
// target per container.
@ -226,7 +226,7 @@ func (p *Pod) buildPod(pod *apiv1.Pod) *targetgroup.Group {
tg.Targets = append(tg.Targets, model.LabelSet{
model.AddressLabel: lv(pod.Status.PodIP),
podContainerNameLabel: lv(c.Name),
podContainerIsInit: lv(strconv.FormatBool(is_init)),
podContainerIsInit: lv(strconv.FormatBool(isInit)),
})
continue
}
@ -241,7 +241,7 @@ func (p *Pod) buildPod(pod *apiv1.Pod) *targetgroup.Group {
podContainerPortNumberLabel: lv(ports),
podContainerPortNameLabel: lv(port.Name),
podContainerPortProtocolLabel: lv(string(port.Protocol)),
podContainerIsInit: lv(strconv.FormatBool(is_init)),
podContainerIsInit: lv(strconv.FormatBool(isInit)),
})
}
}

View File

@ -754,10 +754,10 @@ Available meta labels:
* `__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_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_number`: Number 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_phase`: Set to `Pending`, `Running`, `Succeeded`, `Failed` or `Unknown`
in the [lifecycle](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase).