Skip to content

Commit

Permalink
revert tls
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-yavorovich committed Dec 29, 2021
1 parent 5991ceb commit 739d506
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions pkg/scalers/predictkube_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package scalers

import (
"context"
"crypto/tls"
"errors"
"fmt"
"math"
Expand All @@ -15,14 +14,13 @@ import (
tc "github.com/dysnix/predictkube-libs/external/types_convertation"
"github.com/dysnix/predictkube-proto/external/proto/commonproto"
pb "github.com/dysnix/predictkube-proto/external/proto/services"
"github.com/go-playground/validator/v10"
validator "github.com/go-playground/validator/v10"
kedautil "github.com/kedacore/keda/v2/pkg/util"
"github.com/prometheus/client_golang/api"
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
"github.com/prometheus/common/model"
"github.com/xhit/go-str2duration/v2"
str2duration "github.com/xhit/go-str2duration/v2"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
health "google.golang.org/grpc/health/grpc_health_v1"
"google.golang.org/grpc/status"
"k8s.io/api/autoscaling/v2beta2"
Expand All @@ -38,8 +36,8 @@ const (
)

var (
mlEngineHost = "api.predictkube.com"
mlEnginePort = 443
mlEngineHost = "predictkube-dev.dysnix.org"
mlEnginePort = 8080

defaultStep = time.Minute * 5
)
Expand Down Expand Up @@ -81,7 +79,7 @@ func (pks *PredictKubeScaler) setupClientConn() error {
ReadBufferSize: 50 << 20,
WriteBufferSize: 50 << 20,
MaxMessageSize: 50 << 20,
Insecure: false,
Insecure: true,
Timeout: time.Second * 15,
},
Keepalive: &libs.Keepalive{
Expand All @@ -108,12 +106,6 @@ func (pks *PredictKubeScaler) setupClientConn() error {
pc.InjectPublicClientMetadataInterceptor(pks.metadata.apiKey),
)

clientOpt = append(clientOpt, grpc.WithTransportCredentials(
credentials.NewTLS(&tls.Config{
ServerName: mlEngineHost,
}),
))

if err != nil {
return err
}
Expand Down

0 comments on commit 739d506

Please sign in to comment.