Update nginx and generic controller
This commit is contained in:
parent
c7c2a564a9
commit
e0561ddeb9
62 changed files with 1043 additions and 510 deletions
|
|
@ -21,9 +21,9 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
api_v1 "k8s.io/client-go/pkg/api/v1"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -54,7 +54,7 @@ func (npm namedPortMapping) getPortMappings() map[string]string {
|
|||
}
|
||||
|
||||
// GetPortMapping returns the number of the named port or an error if is not valid
|
||||
func GetPortMapping(name string, s *api.Service) (int32, error) {
|
||||
func GetPortMapping(name string, s *api_v1.Service) (int32, error) {
|
||||
if s == nil {
|
||||
return -1, fmt.Errorf("impossible to extract por mapping from %v (missing service)", name)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,9 +18,10 @@ package service
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"testing"
|
||||
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
api "k8s.io/client-go/pkg/api/v1"
|
||||
)
|
||||
|
||||
func fakeService(npa bool, ps bool, expectedP string) *api.Service {
|
||||
|
|
@ -41,11 +42,11 @@ func fakeService(npa bool, ps bool, expectedP string) *api.Service {
|
|||
|
||||
// fake service
|
||||
return &api.Service{
|
||||
TypeMeta: unversioned.TypeMeta{
|
||||
TypeMeta: meta_v1.TypeMeta{
|
||||
Kind: "ingress",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
ObjectMeta: meta_v1.ObjectMeta{
|
||||
Annotations: map[string]string{
|
||||
fakeNpa: string(fakePs),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue