Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various CI issues #1117

Merged
merged 3 commits into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PKG = k8s.io/kube-state-metrics/pkg
GO_VERSION = 1.14.1
FIRST_GOPATH := $(firstword $(subst :, ,$(shell go env GOPATH)))
BENCHCMP_BINARY := $(FIRST_GOPATH)/bin/benchcmp
GOLANGCI_VERSION := v1.22.2
GOLANGCI_VERSION := v1.24.0
HAS_GOLANGCI := $(shell which golangci-lint)

IMAGE = $(REGISTRY)/kube-state-metrics
Expand Down
2 changes: 1 addition & 1 deletion docs/volumeattachment-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| Metric name| Metric type | Labels/tags | Status |
| ---------- | ----------- | ----------- | ----------- |
| kube_volumeattachment_info | Gauge | `volumeattachment`=&lt;volumeattachment-name&gt; <br> `attacher`=&lt;attacher-name&gt; <br> `nodeName`=&lt;node-name&gt; | EXPERIMENTAL |
| kube_volumeattachment_info | Gauge | `volumeattachment`=&lt;volumeattachment-name&gt; <br> `attacher`=&lt;attacher-name&gt; <br> `node`=&lt;node-name&gt; | EXPERIMENTAL |
| kube_volumeattachment_created | Gauge | `volumeattachment`=&lt;volumeattachment-name&gt; | EXPERIMENTAL |
| kube_volumeattachment_labels | Gauge | `volumeattachment`=&lt;volumeattachment-name&gt; <br> `label_VOLUMEATTACHMENT_LABEL`=&lt;VOLUMEATTACHMENT_LABEL&gt; | EXPERIMENTAL |
| kube_volumeattachment_spec_source_persistentvolume | Gauge | `volumeattachment`=&lt;volumeattachment-name&gt; <br> `volumename`=&lt;persistentvolume-name&gt; | EXPERIMENTAL |
Expand Down
2 changes: 1 addition & 1 deletion internal/store/volumeattachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var (
return &metric.Family{
Metrics: []*metric.Metric{
{
LabelKeys: []string{"attacher", "nodeName"},
LabelKeys: []string{"attacher", "node"},
LabelValues: []string{va.Spec.Attacher, va.Spec.NodeName},
Value: 1,
},
Expand Down
2 changes: 1 addition & 1 deletion internal/store/volumeattachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestVolumeAttachmentStore(t *testing.T) {
},
},
Want: metadata + `
kube_volumeattachment_info{attacher="cinder.csi.openstack.org",nodeName="node1",volumeattachment="csi-5ff16a1ad085261021e21c6cb3a6defb979a8794f25a4f90f6285664cff37224"} 1
kube_volumeattachment_info{attacher="cinder.csi.openstack.org",node="node1",volumeattachment="csi-5ff16a1ad085261021e21c6cb3a6defb979a8794f25a4f90f6285664cff37224"} 1
kube_volumeattachment_labels{label_app="foobar",volumeattachment="csi-5ff16a1ad085261021e21c6cb3a6defb979a8794f25a4f90f6285664cff37224"} 1
kube_volumeattachment_spec_source_persistentvolume{volumeattachment="csi-5ff16a1ad085261021e21c6cb3a6defb979a8794f25a4f90f6285664cff37224",volumename="pvc-44f6ff3f-ba9b-49c4-9b95-8b01c4bd4bab"} 1
kube_volumeattachment_status_attached{volumeattachment="csi-5ff16a1ad085261021e21c6cb3a6defb979a8794f25a4f90f6285664cff37224"} 1
Expand Down
10 changes: 5 additions & 5 deletions tests/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ touch "${HOME}"/.kube/config
export KUBECONFIG=$HOME/.kube/config

if [[ "$MINIKUBE_DRIVER" != "none" ]]; then
export MINIKUBE_PROFILE_ARG=" --profile ${MINIKUBE_PROFILE}"
export MINIKUBE_PROFILE_ARG="--profile ${MINIKUBE_PROFILE}"
else
export MINIKUBE_PROFILE_ARG=''
fi

${SUDO} minikube start --vm-driver="${MINIKUBE_DRIVER}"${MINIKUBE_PROFILE_ARG} --kubernetes-version=${KUBERNETES_VERSION} --logtostderr
${SUDO} minikube start --vm-driver="${MINIKUBE_DRIVER}" "${MINIKUBE_PROFILE_ARG}" --kubernetes-version=${KUBERNETES_VERSION} --logtostderr

minikube update-context${MINIKUBE_PROFILE_ARG}
minikube update-context "${MINIKUBE_PROFILE_ARG}"

set +e

Expand All @@ -94,7 +94,7 @@ for _ in {1..90}; do # timeout for 3 minutes
done

if [[ ${is_kube_running} == "false" ]]; then
minikube logs${MINIKUBE_PROFILE_ARG}
minikube logs "${MINIKUBE_PROFILE_ARG}"
echo "Kubernetes does not start within 3 minutes"
exit 1
fi
Expand All @@ -107,7 +107,7 @@ kubectl version
make build

# ensure that we build docker image in minikube
[[ "$MINIKUBE_DRIVER" != "none" ]] && eval "$(minikube docker-env${MINIKUBE_PROFILE_ARG})" && export DOCKER_CLI='docker'
[[ "$MINIKUBE_DRIVER" != "none" ]] && eval "$(minikube docker-env "${MINIKUBE_PROFILE_ARG}")" && export DOCKER_CLI='docker'

# query kube-state-metrics image tag
make container
Expand Down