Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace api group machinelearning with machinelearning.seldon.io #1614

Merged
merged 12 commits into from
Apr 1, 2020
Merged
4 changes: 2 additions & 2 deletions doc/source/reference/seldon-deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ A SeldonDeployment is defined as a custom resource definition within Kubernetes.

If you want to learn about more practical examples of the use of the SeldonDeployment types you can check the `Inference Graph Section on the Worfklow Documentation Section <../graph/inference-grpah.md>`_.

Below is the 2nd half of our `seldondeployment_types.go <https://github.com/SeldonIO/seldon-core/blob/master/operator/apis/machinelearning/v1/seldondeployment_types.go>`_ file which contains the types that are used in the SeldonDeployment YAML files.
Below is the 2nd half of our `seldondeployment_types.go <https://github.com/SeldonIO/seldon-core/blob/master/operator/apis/machinelearning.seldon.io/v1/seldondeployment_types.go>`_ file which contains the types that are used in the SeldonDeployment YAML files.

.. literalinclude:: ../../../operator/apis/machinelearning/v1/seldondeployment_types.go
.. literalinclude:: ../../../operator/apis/machinelearning.seldon.io/v1/seldondeployment_types.go
:language: go
:lines: 163-

Expand Down
21 changes: 12 additions & 9 deletions executor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# Build the manager binary
FROM golang:1.13 as builder
ARG base=.

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
COPY proto/ proto/
COPY ${base}/go.mod go.mod
COPY ${base}/go.sum go.sum
COPY ${base}/proto/ proto/
COPY operator/ ../operator/
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

# Copy the go source
COPY main.go main.go
COPY api/ api/
COPY predictor/ predictor/
COPY logger/ logger/
COPY k8s/ k8s/
COPY ${base}/main.go main.go
COPY ${base}/api/ api/
COPY ${base}/predictor/ predictor/
COPY ${base}/logger/ logger/
COPY ${base}/k8s/ k8s/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o executor main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:latest
ARG base=.
WORKDIR /
COPY --from=builder /workspace/executor .
COPY licenses/license.txt .
COPY ${base}/licenses/license.txt .
ENTRYPOINT ["/executor"]
2 changes: 1 addition & 1 deletion executor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test: fmt vet

# Build the docker image
docker-build: test
docker build . -t ${IMG}
docker build -f Dockerfile -t ${IMG} --build-arg base=executor ..

# Push the docker image
docker-push:
Expand Down
7 changes: 4 additions & 3 deletions executor/api/client/seldondeployment_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ package client

import (
"fmt"
"path/filepath"

"github.com/go-logr/logr"
"github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
clientset "github.com/seldonio/seldon-core/operator/client/machinelearning/v1/clientset/versioned/typed/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
clientset "github.com/seldonio/seldon-core/operator/client/machinelearning.seldon.io/v1/clientset/versioned/typed/machinelearning.seldon.io/v1"
v1meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/util/homedir"
"path/filepath"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
)

Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/opentracing/opentracing-go"
"github.com/seldonio/seldon-core/executor/api/metric"
"github.com/seldonio/seldon-core/executor/k8s"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"strconv"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/seldon/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/grpc/seldon/proto"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/api/util"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"google.golang.org/grpc"
"io"
"math"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/seldon/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/grpc/seldon/test"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/k8s"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"net"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/seldon/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/grpc/seldon/proto"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/predictor"
"github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
"github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"net/url"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
)
Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/seldon/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
. "github.com/onsi/gomega"
"github.com/seldonio/seldon-core/executor/api/grpc/seldon/proto"
"github.com/seldonio/seldon-core/executor/api/test"
"github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
"github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"net/url"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/metric"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/k8s"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"math"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/tensorflow/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
grpc2 "github.com/seldonio/seldon-core/executor/api/grpc"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/proto/tensorflow/serving"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"google.golang.org/grpc"
"io"
"math"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/tensorflow/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/predictor"
"github.com/seldonio/seldon-core/executor/proto/tensorflow/serving"
"github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
"github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"net/url"
logf "sigs.k8s.io/controller-runtime/pkg/runtime/log"
)
Expand Down
2 changes: 1 addition & 1 deletion executor/api/grpc/tensorflow/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/grpc/seldon/proto"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/proto/tensorflow/serving"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"google.golang.org/grpc/metadata"
"io"
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/metric/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package metric
import (
"context"
"github.com/prometheus/client_golang/prometheus"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/status"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/metric/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package metric

import (
. "github.com/onsi/gomega"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
v12 "k8s.io/api/core/v1"
v1meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/metric/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package metric
import (
"context"
"github.com/prometheus/client_golang/prometheus"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/status"
"time"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/rest/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/api/util"
"github.com/seldonio/seldon-core/executor/k8s"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"io"
"io/ioutil"
"net"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/rest/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/metric"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/k8s"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
v12 "k8s.io/api/core/v1"
v1meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"net"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/rest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/metric"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/predictor"
"github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
"github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"io/ioutil"
"net/http"
"net/url"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/rest/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/seldonio/seldon-core/executor/api/metric"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/executor/api/test"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
v1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"io/ioutil"
"net/http"
"net/http/httptest"
Expand Down
2 changes: 1 addition & 1 deletion executor/api/test/seldonmessage_test_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"github.com/seldonio/seldon-core/executor/api/grpc/seldon/proto"
"github.com/seldonio/seldon-core/executor/api/payload"
"github.com/seldonio/seldon-core/operator/apis/machinelearning/v1"
"github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1"
"io"
"net/http"
)
Expand Down
14 changes: 8 additions & 6 deletions executor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/gorilla/mux v1.7.3
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/onsi/gomega v1.7.0
github.com/onsi/gomega v1.8.1
github.com/opentracing/opentracing-go v1.1.0
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v1.3.0
Expand All @@ -21,14 +21,16 @@ require (
github.com/tensorflow/tensorflow/tensorflow/go/core v0.0.0-00010101000000-000000000000
github.com/uber/jaeger-client-go v2.21.1+incompatible
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
golang.org/x/net v0.0.0-20190926025831-c00fd9afed17 // indirect
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
google.golang.org/grpc v1.24.0
gotest.tools v2.2.0+incompatible
k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
sigs.k8s.io/controller-runtime v0.2.2
k8s.io/api v0.17.2
k8s.io/apimachinery v0.17.2
k8s.io/client-go v0.17.2
sigs.k8s.io/controller-runtime v0.5.0
sigs.k8s.io/testing_frameworks v0.1.1 // indirect
)

replace github.com/tensorflow/tensorflow/tensorflow/go/core => ./proto/tensorflow/core

replace github.com/seldonio/seldon-core/operator => ../operator
Loading