Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: hongming <[email protected]>
  • Loading branch information
wansir committed Jan 4, 2021
1 parent 4a11a50 commit fe6c5de
Show file tree
Hide file tree
Showing 2,943 changed files with 262,608 additions and 126,130 deletions.
822 changes: 312 additions & 510 deletions api/ks-openapi-spec/swagger.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "KubeSphere Advanced",
"title": "KubeSphere",
"contact": {
"name": "KubeSphere",
"url": "https://kubesphere.io/",
Expand All @@ -11,7 +11,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "v2.0.0"
"version": "v0.0.0"
},
"paths": {
"/apis/": {
Expand Down
3 changes: 2 additions & 1 deletion cmd/controller-manager/app/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package app

import (
"context"
"fmt"
"k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/apimachinery/pkg/util/wait"
Expand All @@ -31,7 +32,7 @@ func WaitForAPIServer(client clientset.Interface, timeout time.Duration) error {

err := wait.PollImmediate(time.Second, timeout, func() (bool, error) {
healthStatus := 0
result := client.Discovery().RESTClient().Get().AbsPath("/healthz").Do().StatusCode(&healthStatus)
result := client.Discovery().RESTClient().Get().AbsPath("/healthz").Do(context.Background()).StatusCode(&healthStatus)
if result.Error() != nil {
lastErr = fmt.Errorf("failed to get apiserver /healthz status: %v", result.Error())
return false, nil
Expand Down
1 change: 1 addition & 0 deletions cmd/controller-manager/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ func NewControllerManagerCommand() *cobra.Command {
}

func run(s *options.KubeSphereControllerManagerOptions, stopCh <-chan struct{}) error {

kubernetesClient, err := k8s.NewKubernetesClient(s.KubernetesOptions)
if err != nil {
klog.Errorf("Failed to create kubernetes clientset %v", err)
Expand Down
35 changes: 0 additions & 35 deletions cmd/ks-apiserver/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@ package app

import (
"fmt"
"github.com/kiali/kiali/business"
kconfig "github.com/kiali/kiali/config"
"github.com/kiali/kiali/kubernetes"
"github.com/kiali/kiali/prometheus"
"github.com/spf13/cobra"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/client-go/tools/clientcmd"
cliflag "k8s.io/component-base/cli/flag"
"k8s.io/klog"

Expand Down Expand Up @@ -98,9 +93,6 @@ func Run(s *options.ServerRunOptions, stopCh <-chan struct{}) error {
}

func initializeServicemeshConfig(s *options.ServerRunOptions) {
// Initialize kiali config
config := kconfig.NewConfig()

// Config jaeger query endpoint address
if s.ServiceMeshOptions != nil && len(s.ServiceMeshOptions.JaegerQueryHost) != 0 {
tracing.JaegerQueryUrl = s.ServiceMeshOptions.JaegerQueryHost
Expand All @@ -110,31 +102,4 @@ func initializeServicemeshConfig(s *options.ServerRunOptions) {
if s.ServiceMeshOptions != nil && len(s.ServiceMeshOptions.KialiQueryHost) != 0 {
tracing.KialiQueryUrl = s.ServiceMeshOptions.KialiQueryHost
}

// Exclude system namespaces
config.API.Namespaces.Exclude = []string{"istio-system", "kube-.*"}
config.InCluster = true

// Set default prometheus service url
config.ExternalServices.PrometheusServiceURL = s.ServiceMeshOptions.ServicemeshPrometheusHost
config.ExternalServices.PrometheusCustomMetricsURL = config.ExternalServices.PrometheusServiceURL

// Set istio pilot discovery service url
config.ExternalServices.Istio.UrlServiceVersion = s.ServiceMeshOptions.IstioPilotHost

kconfig.Set(config)

// Set kiali config
if len(s.KubernetesOptions.KubeConfig) != 0 {
kubeconfig, err := clientcmd.BuildConfigFromFlags("", s.KubernetesOptions.KubeConfig)
if err != nil {
fmt.Println(err)
}
k8sClient, err := kubernetes.NewClientFromConfig(kubeconfig)
if err != nil {
fmt.Println(err)
}
prometheusClient, _ := prometheus.NewClient()
business.SetWithBackends(k8sClient, prometheusClient)
}
}
404 changes: 227 additions & 177 deletions go.mod

Large diffs are not rendered by default.

536 changes: 300 additions & 236 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/apis/addtoscheme_servicemesh_v1alpha2.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"istio.io/client-go/pkg/apis/networking/v1alpha3"
"kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2"

appv1beta1 "sigs.k8s.io/application/pkg/apis/app/v1beta1"
appv1beta1 "sigs.k8s.io/application/api/v1beta1"
)

func init() {
Expand Down
Loading

0 comments on commit fe6c5de

Please sign in to comment.