未验证 提交 0d125290 编写于 作者: Z zryfish 提交者: GitHub

bump kiali version (#2097)

上级 6f97e3df
......@@ -49,7 +49,7 @@ require (
github.com/hashicorp/go-version v1.2.0 // indirect
github.com/json-iterator/go v1.1.9
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/kiali/kiali v0.15.1-0.20191210080139-edbbad1ef779
github.com/kiali/kiali v0.15.1-0.20200520152915-769a61d75460
github.com/kubernetes-csi/external-snapshotter/v2 v2.1.0
github.com/kubernetes-sigs/application v0.0.0-20191210100950-18cc93526ab4
github.com/kubesphere/sonargo v0.0.2
......@@ -253,7 +253,7 @@ replace (
github.com/kelseyhightower/envconfig => github.com/kelseyhightower/envconfig v1.4.0
github.com/kevinburke/ssh_config => github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e
github.com/keybase/go-ps => github.com/keybase/go-ps v0.0.0-20161005175911-668c8856d999
github.com/kiali/kiali => github.com/kubesphere/kiali v0.15.1-0.20191210080139-edbbad1ef779
github.com/kiali/kiali => github.com/kubesphere/kiali v0.15.1-0.20200520152915-769a61d75460
github.com/kisielk/errcheck => github.com/kisielk/errcheck v1.2.0
github.com/kisielk/gotool => github.com/kisielk/gotool v1.0.0
github.com/koding/multiconfig => github.com/koding/multiconfig v0.0.0-20171124222453-69c27309b2d7
......
此差异已折叠。
......@@ -6,8 +6,7 @@ import (
"time"
osappsv1 "github.com/openshift/api/apps/v1"
"k8s.io/api/apps/v1beta1"
"k8s.io/api/apps/v1beta2"
appsv1 "k8s.io/api/apps/v1"
batch_v1 "k8s.io/api/batch/v1"
batch_v1beta1 "k8s.io/api/batch/v1beta1"
"k8s.io/api/core/v1"
......@@ -123,10 +122,10 @@ func (in *WorkloadService) GetPods(namespace string, labelSelector string) (mode
func fetchWorkloads(k8s kubernetes.IstioClientInterface, namespace string, labelSelector string) (models.Workloads, error) {
var pods []v1.Pod
var repcon []v1.ReplicationController
var dep []v1beta1.Deployment
var repset []v1beta2.ReplicaSet
var dep []appsv1.Deployment
var repset []appsv1.ReplicaSet
var depcon []osappsv1.DeploymentConfig
var fulset []v1beta2.StatefulSet
var fulset []appsv1.StatefulSet
var jbs []batch_v1.Job
var conjbs []batch_v1beta1.CronJob
......@@ -572,10 +571,10 @@ func fetchWorkloads(k8s kubernetes.IstioClientInterface, namespace string, label
func fetchWorkload(k8s kubernetes.IstioClientInterface, namespace string, workloadName string) (*models.Workload, error) {
var pods []v1.Pod
var repcon []v1.ReplicationController
var dep *v1beta1.Deployment
var repset []v1beta2.ReplicaSet
var dep *appsv1.Deployment
var repset []appsv1.ReplicaSet
var depcon *osappsv1.DeploymentConfig
var fulset *v1beta2.StatefulSet
var fulset *appsv1.StatefulSet
var jbs []batch_v1.Job
var conjbs []batch_v1beta1.CronJob
......
......@@ -6,8 +6,7 @@ import (
"sync"
"time"
"k8s.io/api/apps/v1beta1"
"k8s.io/api/apps/v1beta2"
appsv1 "k8s.io/api/apps/v1"
batch_v1 "k8s.io/api/batch/v1"
batch_v1beta1 "k8s.io/api/batch/v1beta1"
"k8s.io/api/core/v1"
......@@ -31,17 +30,17 @@ type (
// Business methods
GetCronJobs(namespace string) ([]batch_v1beta1.CronJob, error)
GetDeployment(namespace string, name string) (*v1beta1.Deployment, error)
GetDeployments(namespace string) ([]v1beta1.Deployment, error)
GetDeployment(namespace string, name string) (*appsv1.Deployment, error)
GetDeployments(namespace string) ([]appsv1.Deployment, error)
GetEndpoints(namespace, name string) (*v1.Endpoints, error)
GetJobs(namespace string) ([]batch_v1.Job, error)
GetPods(namespace string) ([]v1.Pod, error)
GetReplicationControllers(namespace string) ([]v1.ReplicationController, error)
GetReplicaSets(namespace string) ([]v1beta2.ReplicaSet, error)
GetReplicaSets(namespace string) ([]appsv1.ReplicaSet, error)
GetService(namespace string, name string) (*v1.Service, error)
GetServices(namespace string) ([]v1.Service, error)
GetStatefulSet(namespace string, name string) (*v1beta2.StatefulSet, error)
GetStatefulSets(namespace string) ([]v1beta2.StatefulSet, error)
GetStatefulSet(namespace string, name string) (*appsv1.StatefulSet, error)
GetStatefulSets(namespace string) ([]appsv1.StatefulSet, error)
}
controllerImpl struct {
......@@ -106,9 +105,9 @@ func initControllers(clientset kube.Interface, refreshDuration time.Duration) ma
controllers := make(map[string]cache.SharedIndexInformer)
controllers["Pod"] = sharedInformers.Core().V1().Pods().Informer()
controllers["ReplicationController"] = sharedInformers.Core().V1().ReplicationControllers().Informer()
controllers["Deployment"] = sharedInformers.Apps().V1beta1().Deployments().Informer()
controllers["ReplicaSet"] = sharedInformers.Apps().V1beta2().ReplicaSets().Informer()
controllers["StatefulSet"] = sharedInformers.Apps().V1beta2().StatefulSets().Informer()
controllers["Deployment"] = sharedInformers.Apps().V1().Deployments().Informer()
controllers["ReplicaSet"] = sharedInformers.Apps().V1().ReplicaSets().Informer()
controllers["StatefulSet"] = sharedInformers.Apps().V1().StatefulSets().Informer()
controllers["Job"] = sharedInformers.Batch().V1().Jobs().Informer()
controllers["CronJob"] = sharedInformers.Batch().V1beta1().CronJobs().Informer()
controllers["Service"] = sharedInformers.Core().V1().Services().Informer()
......@@ -221,7 +220,7 @@ func (c *controllerImpl) GetCronJobs(namespace string) ([]batch_v1beta1.CronJob,
return []batch_v1beta1.CronJob{}, nil
}
func (c *controllerImpl) GetDeployment(namespace, name string) (*v1beta1.Deployment, error) {
func (c *controllerImpl) GetDeployment(namespace, name string) (*appsv1.Deployment, error) {
if err := c.checkStateAndRetry(); err != nil {
return nil, err
}
......@@ -231,36 +230,36 @@ func (c *controllerImpl) GetDeployment(namespace, name string) (*v1beta1.Deploym
return nil, err
}
if exist {
dep, ok := deps.(*v1beta1.Deployment)
dep, ok := deps.(*appsv1.Deployment)
if !ok {
return nil, errors.New("Bad Deployment type found in cache")
}
return dep, nil
}
return nil, NewNotFound(name, "apps/v1beta1", "Deployment")
return nil, NewNotFound(name, "apps/v1", "Deployment")
}
func (c *controllerImpl) GetDeployments(namespace string) ([]v1beta1.Deployment, error) {
func (c *controllerImpl) GetDeployments(namespace string) ([]appsv1.Deployment, error) {
if err := c.checkStateAndRetry(); err != nil {
return []v1beta1.Deployment{}, err
return []appsv1.Deployment{}, err
}
indexer := c.controllers["Deployment"].GetIndexer()
deps, err := indexer.ByIndex("namespace", namespace)
if err != nil {
return []v1beta1.Deployment{}, err
return []appsv1.Deployment{}, err
}
if len(deps) > 0 {
_, ok := deps[0].(*v1beta1.Deployment)
_, ok := deps[0].(*appsv1.Deployment)
if !ok {
return nil, errors.New("Bad Deployment type found in cache")
}
nsDeps := make([]v1beta1.Deployment, len(deps))
nsDeps := make([]appsv1.Deployment, len(deps))
for i, dep := range deps {
nsDeps[i] = *(dep.(*v1beta1.Deployment))
nsDeps[i] = *(dep.(*appsv1.Deployment))
}
return nsDeps, nil
}
return []v1beta1.Deployment{}, nil
return []appsv1.Deployment{}, nil
}
func (c *controllerImpl) GetEndpoints(namespace, name string) (*v1.Endpoints, error) {
......@@ -351,30 +350,30 @@ func (c *controllerImpl) GetReplicationControllers(namespace string) ([]v1.Repli
return []v1.ReplicationController{}, nil
}
func (c *controllerImpl) GetReplicaSets(namespace string) ([]v1beta2.ReplicaSet, error) {
func (c *controllerImpl) GetReplicaSets(namespace string) ([]appsv1.ReplicaSet, error) {
if err := c.checkStateAndRetry(); err != nil {
return []v1beta2.ReplicaSet{}, err
return []appsv1.ReplicaSet{}, err
}
indexer := c.controllers["ReplicaSet"].GetIndexer()
repsets, err := indexer.ByIndex("namespace", namespace)
if err != nil {
return []v1beta2.ReplicaSet{}, err
return []appsv1.ReplicaSet{}, err
}
if len(repsets) > 0 {
_, ok := repsets[0].(*v1beta2.ReplicaSet)
_, ok := repsets[0].(*appsv1.ReplicaSet)
if !ok {
return []v1beta2.ReplicaSet{}, errors.New("Bad ReplicaSet type found in cache")
return []appsv1.ReplicaSet{}, errors.New("Bad ReplicaSet type found in cache")
}
nsRepsets := make([]v1beta2.ReplicaSet, len(repsets))
nsRepsets := make([]appsv1.ReplicaSet, len(repsets))
for i, repset := range repsets {
nsRepsets[i] = *(repset.(*v1beta2.ReplicaSet))
nsRepsets[i] = *(repset.(*appsv1.ReplicaSet))
}
return nsRepsets, nil
}
return []v1beta2.ReplicaSet{}, nil
return []appsv1.ReplicaSet{}, nil
}
func (c *controllerImpl) GetStatefulSet(namespace, name string) (*v1beta2.StatefulSet, error) {
func (c *controllerImpl) GetStatefulSet(namespace, name string) (*appsv1.StatefulSet, error) {
if err := c.checkStateAndRetry(); err != nil {
return nil, err
}
......@@ -384,36 +383,36 @@ func (c *controllerImpl) GetStatefulSet(namespace, name string) (*v1beta2.Statef
return nil, err
}
if exist {
fulset, ok := fulsets.(*v1beta2.StatefulSet)
fulset, ok := fulsets.(*appsv1.StatefulSet)
if !ok {
return nil, errors.New("Bad StatefulSet type found in cache")
}
return fulset, nil
}
return nil, NewNotFound(name, "apps/v1beta2", "StatefulSet")
return nil, NewNotFound(name, "apps/v1", "StatefulSet")
}
func (c *controllerImpl) GetStatefulSets(namespace string) ([]v1beta2.StatefulSet, error) {
func (c *controllerImpl) GetStatefulSets(namespace string) ([]appsv1.StatefulSet, error) {
if err := c.checkStateAndRetry(); err != nil {
return []v1beta2.StatefulSet{}, err
return []appsv1.StatefulSet{}, err
}
indexer := c.controllers["StatefulSet"].GetIndexer()
fulsets, err := indexer.ByIndex("namespace", namespace)
if err != nil {
return []v1beta2.StatefulSet{}, err
return []appsv1.StatefulSet{}, err
}
if len(fulsets) > 0 {
_, ok := fulsets[0].(*v1beta2.StatefulSet)
_, ok := fulsets[0].(*appsv1.StatefulSet)
if !ok {
return []v1beta2.StatefulSet{}, errors.New("Bad StatefulSet type found in cache")
return []appsv1.StatefulSet{}, errors.New("Bad StatefulSet type found in cache")
}
nsFulsets := make([]v1beta2.StatefulSet, len(fulsets))
nsFulsets := make([]appsv1.StatefulSet, len(fulsets))
for i, fulset := range fulsets {
nsFulsets[i] = *(fulset.(*v1beta2.StatefulSet))
nsFulsets[i] = *(fulset.(*appsv1.StatefulSet))
}
return nsFulsets, nil
}
return []v1beta2.StatefulSet{}, nil
return []appsv1.StatefulSet{}, nil
}
func (c *controllerImpl) GetService(namespace, name string) (*v1.Service, error) {
......
......@@ -7,8 +7,7 @@ import (
"os"
"time"
"k8s.io/api/apps/v1beta1"
"k8s.io/api/apps/v1beta2"
appsv1 "k8s.io/api/apps/v1"
auth_v1 "k8s.io/api/authorization/v1"
batch_v1 "k8s.io/api/batch/v1"
batch_v1beta1 "k8s.io/api/batch/v1beta1"
......@@ -39,8 +38,8 @@ type IstioClientInterface interface {
GetAdapter(namespace, adapterType, adapterName string) (IstioObject, error)
GetAdapters(namespace string) ([]IstioObject, error)
GetCronJobs(namespace string) ([]batch_v1beta1.CronJob, error)
GetDeployment(namespace string, deploymentName string) (*v1beta1.Deployment, error)
GetDeployments(namespace string) ([]v1beta1.Deployment, error)
GetDeployment(namespace string, deploymentName string) (*appsv1.Deployment, error)
GetDeployments(namespace string) ([]appsv1.Deployment, error)
GetDeploymentConfig(namespace string, deploymentconfigName string) (*osappsv1.DeploymentConfig, error)
GetDeploymentConfigs(namespace string) ([]osappsv1.DeploymentConfig, error)
GetDestinationRule(namespace string, destinationrule string) (IstioObject, error)
......@@ -62,14 +61,14 @@ type IstioClientInterface interface {
GetQuotaSpecBinding(namespace string, quotaSpecBindingName string) (IstioObject, error)
GetQuotaSpecBindings(namespace string) ([]IstioObject, error)
GetReplicationControllers(namespace string) ([]v1.ReplicationController, error)
GetReplicaSets(namespace string) ([]v1beta2.ReplicaSet, error)
GetReplicaSets(namespace string) ([]appsv1.ReplicaSet, error)
GetSelfSubjectAccessReview(namespace, api, resourceType string, verbs []string) ([]*auth_v1.SelfSubjectAccessReview, error)
GetService(namespace string, serviceName string) (*v1.Service, error)
GetServices(namespace string, selectorLabels map[string]string) ([]v1.Service, error)
GetServiceEntries(namespace string) ([]IstioObject, error)
GetServiceEntry(namespace string, serviceEntryName string) (IstioObject, error)
GetStatefulSet(namespace string, statefulsetName string) (*v1beta2.StatefulSet, error)
GetStatefulSets(namespace string) ([]v1beta2.StatefulSet, error)
GetStatefulSet(namespace string, statefulsetName string) (*appsv1.StatefulSet, error)
GetStatefulSets(namespace string) ([]appsv1.StatefulSet, error)
GetTemplate(namespace, templateType, templateName string) (IstioObject, error)
GetTemplates(namespace string) ([]IstioObject, error)
GetPolicy(namespace string, policyName string) (IstioObject, error)
......@@ -275,7 +274,7 @@ func newClientForAPI(fromCfg *rest.Config, groupVersion schema.GroupVersion, sch
APIPath: "/apis",
ContentConfig: rest.ContentConfig{
GroupVersion: &groupVersion,
NegotiatedSerializer: serializer.NewCodecFactory(runtime.NewScheme()).WithoutConversion(),
NegotiatedSerializer: serializer.WithoutConversionCodecFactory{CodecFactory: serializer.NewCodecFactory(scheme)},
ContentType: runtime.ContentTypeJSON,
},
BearerToken: fromCfg.BearerToken,
......
package kubernetes
import (
"k8s.io/api/apps/v1beta1"
"k8s.io/api/apps/v1beta2"
appsv1 "k8s.io/api/apps/v1"
auth_v1 "k8s.io/api/authorization/v1"
batch_v1 "k8s.io/api/batch/v1"
batch_v1beta1 "k8s.io/api/batch/v1beta1"
......@@ -109,23 +108,23 @@ func (in *IstioClient) GetServices(namespace string, selectorLabels map[string]s
// GetDeployment returns the definition of a specific deployment.
// It returns an error on any problem.
func (in *IstioClient) GetDeployment(namespace, deploymentName string) (*v1beta1.Deployment, error) {
func (in *IstioClient) GetDeployment(namespace, deploymentName string) (*appsv1.Deployment, error) {
if in.k8sCache != nil {
return in.k8sCache.GetDeployment(namespace, deploymentName)
}
return in.k8s.AppsV1beta1().Deployments(namespace).Get(deploymentName, emptyGetOptions)
return in.k8s.AppsV1().Deployments(namespace).Get(deploymentName, emptyGetOptions)
}
// GetDeployments returns an array of deployments for a given namespace and a set of labels.
// It returns an error on any problem.
func (in *IstioClient) GetDeployments(namespace string) ([]v1beta1.Deployment, error) {
func (in *IstioClient) GetDeployments(namespace string) ([]appsv1.Deployment, error) {
if in.k8sCache != nil {
return in.k8sCache.GetDeployments(namespace)
}
if depList, err := in.k8s.AppsV1beta1().Deployments(namespace).List(emptyListOptions); err == nil {
if depList, err := in.k8s.AppsV1().Deployments(namespace).List(emptyListOptions); err == nil {
return depList.Items, nil
} else {
return []v1beta1.Deployment{}, err
return []appsv1.Deployment{}, err
}
}
......@@ -152,32 +151,32 @@ func (in *IstioClient) GetDeploymentConfigs(namespace string) ([]osappsv1.Deploy
return result.Items, nil
}
func (in *IstioClient) GetReplicaSets(namespace string) ([]v1beta2.ReplicaSet, error) {
func (in *IstioClient) GetReplicaSets(namespace string) ([]appsv1.ReplicaSet, error) {
if in.k8sCache != nil {
return in.k8sCache.GetReplicaSets(namespace)
}
if rsList, err := in.k8s.AppsV1beta2().ReplicaSets(namespace).List(emptyListOptions); err == nil {
if rsList, err := in.k8s.AppsV1().ReplicaSets(namespace).List(emptyListOptions); err == nil {
return rsList.Items, nil
} else {
return []v1beta2.ReplicaSet{}, err
return []appsv1.ReplicaSet{}, err
}
}
func (in *IstioClient) GetStatefulSet(namespace string, statefulsetName string) (*v1beta2.StatefulSet, error) {
func (in *IstioClient) GetStatefulSet(namespace string, statefulsetName string) (*appsv1.StatefulSet, error) {
if in.k8sCache != nil {
return in.k8sCache.GetStatefulSet(namespace, statefulsetName)
}
return in.k8s.AppsV1beta2().StatefulSets(namespace).Get(statefulsetName, emptyGetOptions)
return in.k8s.AppsV1().StatefulSets(namespace).Get(statefulsetName, emptyGetOptions)
}
func (in *IstioClient) GetStatefulSets(namespace string) ([]v1beta2.StatefulSet, error) {
func (in *IstioClient) GetStatefulSets(namespace string) ([]appsv1.StatefulSet, error) {
if in.k8sCache != nil {
return in.k8sCache.GetStatefulSets(namespace)
}
if ssList, err := in.k8s.AppsV1beta2().StatefulSets(namespace).List(emptyListOptions); err == nil {
if ssList, err := in.k8s.AppsV1().StatefulSets(namespace).List(emptyListOptions); err == nil {
return ssList.Items, nil
} else {
return []v1beta2.StatefulSet{}, err
return []appsv1.StatefulSet{}, err
}
}
......
......@@ -6,8 +6,7 @@ import (
osappsv1 "github.com/openshift/api/apps/v1"
osv1 "github.com/openshift/api/project/v1"
"github.com/stretchr/testify/mock"
"k8s.io/api/apps/v1beta1"
"k8s.io/api/apps/v1beta2"
appsv1 "k8s.io/api/apps/v1"
auth_v1 "k8s.io/api/authorization/v1"
batch_v1 "k8s.io/api/batch/v1"
batch_v1beta1 "k8s.io/api/batch/v1beta1"
......@@ -33,11 +32,11 @@ func NewK8SClientMock() *K8SClientMock {
// MockEmptyWorkloads setup the current mock to return empty workloads for every type of workloads (deployment, dc, rs, jobs, etc.)
func (o *K8SClientMock) MockEmptyWorkloads(namespace interface{}) {
o.On("GetDeployments", namespace).Return([]v1beta1.Deployment{}, nil)
o.On("GetReplicaSets", namespace).Return([]v1beta2.ReplicaSet{}, nil)
o.On("GetDeployments", namespace).Return([]appsv1.Deployment{}, nil)
o.On("GetReplicaSets", namespace).Return([]appsv1.ReplicaSet{}, nil)
o.On("GetReplicationControllers", namespace).Return([]v1.ReplicationController{}, nil)
o.On("GetDeploymentConfigs", namespace).Return([]osappsv1.DeploymentConfig{}, nil)
o.On("GetStatefulSets", namespace).Return([]v1beta2.StatefulSet{}, nil)
o.On("GetStatefulSets", namespace).Return([]appsv1.StatefulSet{}, nil)
o.On("GetJobs", namespace).Return([]batch_v1.Job{}, nil)
o.On("GetCronJobs", namespace).Return([]batch_v1beta1.CronJob{}, nil)
}
......@@ -45,10 +44,10 @@ func (o *K8SClientMock) MockEmptyWorkloads(namespace interface{}) {
// MockEmptyWorkload setup the current mock to return an empty workload for every type of workloads (deployment, dc, rs, jobs, etc.)
func (o *K8SClientMock) MockEmptyWorkload(namespace interface{}, workload interface{}) {
notfound := fmt.Errorf("not found")
o.On("GetDeployment", namespace, workload).Return(&v1beta1.Deployment{}, notfound)
o.On("GetStatefulSet", namespace, workload).Return(&v1beta2.StatefulSet{}, notfound)
o.On("GetDeployment", namespace, workload).Return(&appsv1.Deployment{}, notfound)
o.On("GetStatefulSet", namespace, workload).Return(&appsv1.StatefulSet{}, notfound)
o.On("GetDeploymentConfig", namespace, workload).Return(&osappsv1.DeploymentConfig{}, notfound)
o.On("GetReplicaSets", namespace).Return([]v1beta2.ReplicaSet{}, nil)
o.On("GetReplicaSets", namespace).Return([]appsv1.ReplicaSet{}, nil)
o.On("GetReplicationControllers", namespace).Return([]v1.ReplicationController{}, nil)
o.On("GetJobs", namespace).Return([]batch_v1.Job{}, nil)
o.On("GetCronJobs", namespace).Return([]batch_v1beta1.CronJob{}, nil)
......@@ -79,14 +78,14 @@ func (o *K8SClientMock) GetCronJobs(namespace string) ([]batch_v1beta1.CronJob,
return args.Get(0).([]batch_v1beta1.CronJob), args.Error(1)
}
func (o *K8SClientMock) GetDeployment(namespace string, deploymentName string) (*v1beta1.Deployment, error) {
func (o *K8SClientMock) GetDeployment(namespace string, deploymentName string) (*appsv1.Deployment, error) {
args := o.Called(namespace, deploymentName)
return args.Get(0).(*v1beta1.Deployment), args.Error(1)
return args.Get(0).(*appsv1.Deployment), args.Error(1)
}
func (o *K8SClientMock) GetDeployments(namespace string) ([]v1beta1.Deployment, error) {
func (o *K8SClientMock) GetDeployments(namespace string) ([]appsv1.Deployment, error) {
args := o.Called(namespace)
return args.Get(0).([]v1beta1.Deployment), args.Error(1)
return args.Get(0).([]appsv1.Deployment), args.Error(1)
}
func (o *K8SClientMock) GetDeploymentConfig(namespace string, deploymentName string) (*osappsv1.DeploymentConfig, error) {
......@@ -194,9 +193,9 @@ func (o *K8SClientMock) GetReplicationControllers(namespace string) ([]v1.Replic
return args.Get(0).([]v1.ReplicationController), args.Error(1)
}
func (o *K8SClientMock) GetReplicaSets(namespace string) ([]v1beta2.ReplicaSet, error) {
func (o *K8SClientMock) GetReplicaSets(namespace string) ([]appsv1.ReplicaSet, error) {
args := o.Called(namespace)
return args.Get(0).([]v1beta2.ReplicaSet), args.Error(1)
return args.Get(0).([]appsv1.ReplicaSet), args.Error(1)
}
func (o *K8SClientMock) GetSelfSubjectAccessReview(namespace, api, resourceType string, verbs []string) ([]*auth_v1.SelfSubjectAccessReview, error) {
......@@ -224,14 +223,14 @@ func (o *K8SClientMock) GetServiceEntry(namespace string, serviceEntryName strin
return args.Get(0).(kubernetes.IstioObject), args.Error(1)
}
func (o *K8SClientMock) GetStatefulSet(namespace string, statefulsetName string) (*v1beta2.StatefulSet, error) {
func (o *K8SClientMock) GetStatefulSet(namespace string, statefulsetName string) (*appsv1.StatefulSet, error) {
args := o.Called(namespace, statefulsetName)
return args.Get(0).(*v1beta2.StatefulSet), args.Error(1)
return args.Get(0).(*appsv1.StatefulSet), args.Error(1)
}
func (o *K8SClientMock) GetStatefulSets(namespace string) ([]v1beta2.StatefulSet, error) {
func (o *K8SClientMock) GetStatefulSets(namespace string) ([]appsv1.StatefulSet, error) {
args := o.Called(namespace)
return args.Get(0).([]v1beta2.StatefulSet), args.Error(1)
return args.Get(0).([]appsv1.StatefulSet), args.Error(1)
}
func (o *K8SClientMock) GetTemplate(namespace, templateType, templateName string) (kubernetes.IstioObject, error) {
......
......@@ -2,8 +2,7 @@ package models
import (
osappsv1 "github.com/openshift/api/apps/v1"
"k8s.io/api/apps/v1beta1"
"k8s.io/api/apps/v1beta2"
appsv1 "k8s.io/api/apps/v1"
batch_v1 "k8s.io/api/batch/v1"
batch_v1beta1 "k8s.io/api/batch/v1beta1"
"k8s.io/api/core/v1"
......@@ -125,7 +124,7 @@ func (workload *WorkloadListItem) ParseWorkload(w *Workload) {
_, workload.VersionLabel = w.Labels[conf.IstioLabels.VersionLabelName]
}
func (workload *Workload) ParseDeployment(d *v1beta1.Deployment) {
func (workload *Workload) ParseDeployment(d *appsv1.Deployment) {
conf := config.Get()
workload.Name = d.Name
workload.Type = "Deployment"
......@@ -144,7 +143,7 @@ func (workload *Workload) ParseDeployment(d *v1beta1.Deployment) {
workload.UnavailableReplicas = workload.Replicas - workload.AvailableReplicas
}
func (workload *Workload) ParseReplicaSet(r *v1beta2.ReplicaSet) {
func (workload *Workload) ParseReplicaSet(r *appsv1.ReplicaSet) {
conf := config.Get()
workload.Name = r.Name
workload.Type = "ReplicaSet"
......@@ -195,7 +194,7 @@ func (workload *Workload) ParseDeploymentConfig(dc *osappsv1.DeploymentConfig) {
workload.UnavailableReplicas = workload.Replicas - workload.AvailableReplicas
}
func (workload *Workload) ParseStatefulSet(s *v1beta2.StatefulSet) {
func (workload *Workload) ParseStatefulSet(s *appsv1.StatefulSet) {
conf := config.Get()
workload.Name = s.Name
workload.Type = "StatefulSet"
......
......@@ -322,7 +322,7 @@ github.com/jmespath/go-jmespath
github.com/json-iterator/go
# github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e => github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e
github.com/kevinburke/ssh_config
# github.com/kiali/kiali v0.15.1-0.20191210080139-edbbad1ef779 => github.com/kubesphere/kiali v0.15.1-0.20191210080139-edbbad1ef779
# github.com/kiali/kiali v0.15.1-0.20200520152915-769a61d75460 => github.com/kubesphere/kiali v0.15.1-0.20200520152915-769a61d75460
github.com/kiali/kiali/business
github.com/kiali/kiali/business/checkers
github.com/kiali/kiali/business/checkers/destinationrules
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册