Skip to content

Commit

Permalink
kubernetes: use and vendor 1.5 client
Browse files Browse the repository at this point in the history
  • Loading branch information
fabxc committed Oct 17, 2016
1 parent de22524 commit 7c439a9
Show file tree
Hide file tree
Showing 839 changed files with 524,962 additions and 13 deletions.
21 changes: 17 additions & 4 deletions retrieval/discovery/kubernetes_v2/endpoint.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Copyright 2016 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package kubernetesv2

import (
Expand All @@ -10,8 +23,8 @@ import (
"github.com/prometheus/common/log"
"github.com/prometheus/common/model"
"golang.org/x/net/context"
apiv1 "k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/client/cache"
apiv1 "k8s.io/client-go/1.5/pkg/api/v1"
"k8s.io/client-go/1.5/tools/cache"
)

// Endpoints discovers new endpoint targets.
Expand Down Expand Up @@ -126,8 +139,8 @@ func (e *Endpoints) buildEndpoints(eps *apiv1.Endpoints) *config.TargetGroup {
e.decorateService(eps.Namespace, eps.Name, tg)

// type podEntry struct {
// namespace string
// name string
// pod *apiv1.Pod
// servicePorts []apiv1.ServicePort
// }
// seenPods := map[string]podEntry{}

Expand Down
25 changes: 19 additions & 6 deletions retrieval/discovery/kubernetes_v2/kubernetes.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Copyright 2016 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package kubernetesv2

import (
Expand All @@ -9,12 +22,12 @@ import (
"github.com/prometheus/common/log"
"github.com/prometheus/common/model"
"golang.org/x/net/context"
"k8s.io/kubernetes/pkg/api"
apiv1 "k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/client/cache"
kubernetes "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5"
rest "k8s.io/kubernetes/pkg/client/restclient"
"k8s.io/kubernetes/pkg/util/runtime"
"k8s.io/client-go/1.5/kubernetes"
"k8s.io/client-go/1.5/pkg/api"
apiv1 "k8s.io/client-go/1.5/pkg/api/v1"
"k8s.io/client-go/1.5/pkg/util/runtime"
"k8s.io/client-go/1.5/rest"
"k8s.io/client-go/1.5/tools/cache"
)

const (
Expand Down
19 changes: 16 additions & 3 deletions retrieval/discovery/kubernetes_v2/pod.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Copyright 2016 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package kubernetesv2

import (
Expand All @@ -10,9 +23,9 @@ import (
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/config"
"golang.org/x/net/context"
"k8s.io/kubernetes/pkg/api"
apiv1 "k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/client-go/1.5/pkg/api"
apiv1 "k8s.io/client-go/1.5/pkg/api/v1"
"k8s.io/client-go/1.5/tools/cache"
)

// Pods discovers new pod targets.
Expand Down
202 changes: 202 additions & 0 deletions vendor/cloud.google.com/go/LICENSE

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

Loading

0 comments on commit 7c439a9

Please sign in to comment.