Skip to content

Commit

Permalink
Merge pull request #724 from tariq1890/bump_versions
Browse files Browse the repository at this point in the history
bump versions of prometheus,kubernetes, and addon-resizer
  • Loading branch information
k8s-ci-robot committed Apr 26, 2019
2 parents 919acdf + e084d5a commit 469c2fe
Show file tree
Hide file tree
Showing 17 changed files with 601 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo: required

dist: xenial
language: go

go:
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ require (
github.com/onsi/ginkgo v1.7.0 // indirect
github.com/onsi/gomega v1.4.3 // indirect
github.com/openshift/origin v0.0.0-20160503220234-8f127d736703
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v0.9.2
github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1
github.com/spf13/pflag v1.0.3
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/openshift/origin v0.0.0-20160503220234-8f127d736703 h1:KLVRXtjLhZHVtrcdnuefaI2Bf182EEiTfEVDHokoyng=
github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
Expand Down
11 changes: 5 additions & 6 deletions internal/collector/cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@ limitations under the License.
package collector

import (
"fmt"
"time"

"k8s.io/kube-state-metrics/pkg/metric"
"github.com/pkg/errors"
"github.com/robfig/cron"

batchv1beta1 "k8s.io/api/batch/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"github.com/robfig/cron"
"k8s.io/kube-state-metrics/pkg/metric"
)

var (
Expand Down Expand Up @@ -223,13 +222,13 @@ func createCronJobListWatch(kubeClient clientset.Interface, ns string) cache.Lis
func getNextScheduledTime(schedule string, lastScheduleTime *metav1.Time, createdTime metav1.Time) (time.Time, error) {
sched, err := cron.ParseStandard(schedule)
if err != nil {
return time.Time{}, fmt.Errorf("Failed to parse cron job schedule '%s': %s", schedule, err)
return time.Time{}, errors.Wrapf(err, "Failed to parse cron job schedule '%s'", schedule)
}
if !lastScheduleTime.IsZero() {
return sched.Next((*lastScheduleTime).Time), nil
}
if !createdTime.IsZero() {
return sched.Next(createdTime.Time), nil
}
return time.Time{}, fmt.Errorf("Created time and lastScheduleTime are both zero")
return time.Time{}, errors.New("Created time and lastScheduleTime are both zero")
}
6 changes: 4 additions & 2 deletions internal/collector/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
"sort"
"strings"

"github.com/pkg/errors"

metricsstore "k8s.io/kube-state-metrics/pkg/metrics_store"
)

Expand All @@ -48,7 +50,7 @@ func (testCase *generateMetricsTestCase) run() error {
out := strings.Join(metric, "\n")

if err := compareOutput(testCase.Want, out); err != nil {
return fmt.Errorf("expected wanted output to equal output: %v", err.Error())
return errors.Wrap(err, "expected wanted output to equal output")
}

return nil
Expand All @@ -65,7 +67,7 @@ func compareOutput(a, b string) error {
}

if entities[0] != entities[1] {
return fmt.Errorf("expected a to equal b but got:\n%v\nand:\n%v", entities[0], entities[1])
return errors.Errorf("expected a to equal b but got:\n%v\nand:\n%v", entities[0], entities[1])
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/kube-state-metrics-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
initialDelaySeconds: 5
timeoutSeconds: 5
- name: addon-resizer
image: k8s.gcr.io/addon-resizer:1.8.3
image: k8s.gcr.io/addon-resizer:1.8.4
resources:
limits:
cpu: 150m
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ import (
"strconv"
"strings"

"k8s.io/klog"

"github.com/openshift/origin/pkg/util/proc"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"

clientset "k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s.io/client-go/tools/clientcmd"

"k8s.io/klog"
kcoll "k8s.io/kube-state-metrics/internal/collector"
coll "k8s.io/kube-state-metrics/pkg/collector"
"k8s.io/kube-state-metrics/pkg/options"
Expand Down Expand Up @@ -169,7 +169,7 @@ func createKubeClient(apiserver string, kubeconfig string) (clientset.Interface,
klog.Infof("Testing communication with server")
v, err := kubeClient.Discovery().ServerVersion()
if err != nil {
return nil, fmt.Errorf("ERROR communicating with apiserver: %v", err)
return nil, errors.Wrap(err, "ERROR communicating with apiserver")
}
klog.Infof("Running with Kubernetes cluster version: v%s.%s. git version: %s. git tree state: %s. commit: %s. platform: %s",
v.Major, v.Minor, v.GitVersion, v.GitTreeState, v.GitCommit, v.Platform)
Expand Down
4 changes: 2 additions & 2 deletions pkg/options/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"sort"
"strings"

"fmt"
"github.com/pkg/errors"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -86,7 +86,7 @@ func (c *CollectorSet) Set(value string) error {
if len(col) != 0 {
_, ok := DefaultCollectors[col]
if !ok {
return fmt.Errorf("collector \"%s\" does not exist", col)
return errors.Errorf("collector \"%s\" does not exist", col)
}
s[col] = struct{}{}
}
Expand Down
7 changes: 4 additions & 3 deletions tests/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
set -e
set -o pipefail

KUBERNETES_VERSION=v1.10.0
KUBERNETES_VERSION=v1.14.1
KUBE_STATE_METRICS_LOG_DIR=./log
KUBE_STATE_METRICS_IMAGE_NAME='quay.io/coreos/kube-state-metrics'
PROMETHEUS_VERSION=2.0.0
PROMETHEUS_VERSION=2.9.1
E2E_SETUP_MINIKUBE=${E2E_SETUP_MINIKUBE:-}
E2E_SETUP_KUBECTL=${E2E_SETUP_KUBECTL:-}
E2E_SETUP_PROMTOOL=${E2E_SETUP_PROMTOOL:-}
MINIKUBE_VERSION=v1.0.0
MINIKUBE_DRIVER=${MINIKUBE_DRIVER:-virtualbox}
SUDO=${SUDO:-}

Expand All @@ -38,7 +39,7 @@ function finish() {
}

function setup_minikube() {
curl -sLo minikube https://storage.googleapis.com/minikube/releases/v0.25.2/minikube-linux-amd64 \
curl -sLo minikube https://storage.googleapis.com/minikube/releases/${MINIKUBE_VERSION}/minikube-linux-amd64 \
&& chmod +x minikube \
&& ${SUDO} mv minikube /usr/local/bin/
}
Expand Down
24 changes: 24 additions & 0 deletions vendor/github.com/pkg/errors/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/github.com/pkg/errors/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions vendor/github.com/pkg/errors/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions vendor/github.com/pkg/errors/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions vendor/github.com/pkg/errors/appveyor.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 469c2fe

Please sign in to comment.