Skip to content

Commit

Permalink
Merge pull request #228 from grycap/devel
Browse files Browse the repository at this point in the history
Changes in module version
  • Loading branch information
catttam authored Feb 9, 2024
2 parents 517db29 + d26ddad commit 574e526
Show file tree
Hide file tree
Showing 41 changed files with 68 additions and 68 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ COPY main.go .
COPY pkg pkg

RUN GOOS=${GOOS} CGO_ENABLED=0 go build --ldflags "-s -w \
-X \"github.com/grycap/oscar/v2/pkg/version.Version=${VERSION}\" \
-X \"github.com/grycap/oscar/v2/pkg/version.GitCommit=${GIT_COMMIT}\"" \
-X \"github.com/grycap/oscar/v3/pkg/version.Version=${VERSION}\" \
-X \"github.com/grycap/oscar/v3/pkg/version.GitCommit=${GIT_COMMIT}\"" \
-a -installsuffix cgo -o oscar .


Expand Down
2 changes: 1 addition & 1 deletion docs/invoking.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ curl {-k} -X POST https://{oscar_endpoint}/system/services/body-pose-detection-a
Finally, the complete command that works in [Local Testing](https://docs.oscar.grycap.net/local-testing/) with an image called `people.jpeg` as input and `output_posenet.zip` as output.

``` bash
curl -X POST https://localhost/system/services/body-pose-detection-async/exposed/v2/models/posenetclas/predict/ -H "accept: */*" -H "Content-Type: multipart/form-data" -F "[email protected];type=image/png" --output output_posenet.zip
curl -X POST https://localhost/system/services/body-pose-detection-async/exposed/v3/models/posenetclas/predict/ -H "accept: */*" -H "Content-Type: multipart/form-data" -F "[email protected];type=image/png" --output output_posenet.zip
```

Another FDL example shows how to expose a simple NGINX server as an OSCAR service:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/grycap/oscar/v2
module github.com/grycap/oscar/v3

go 1.18

Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/backends"
"github.com/grycap/oscar/v2/pkg/handlers"
"github.com/grycap/oscar/v2/pkg/resourcemanager"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils/auth"
"github.com/grycap/oscar/v3/pkg/backends"
"github.com/grycap/oscar/v3/pkg/handlers"
"github.com/grycap/oscar/v3/pkg/resourcemanager"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils/auth"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/backends/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"runtime"
"strings"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
"k8s.io/client-go/kubernetes"
testclient "k8s.io/client-go/kubernetes/fake"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/backends/fake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package backends
import (
"testing"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
)

func TestMakeFakeBackend(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/backends/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"log"

"github.com/goccy/go-yaml"
"github.com/grycap/oscar/v2/pkg/imagepuller"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils"
"github.com/grycap/oscar/v3/pkg/imagepuller"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion pkg/backends/k8s_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package backends
import (
"testing"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
6 changes: 3 additions & 3 deletions pkg/backends/knative.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"os"
"strconv"

"github.com/grycap/oscar/v2/pkg/imagepuller"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils"
"github.com/grycap/oscar/v3/pkg/imagepuller"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
Expand Down
2 changes: 1 addition & 1 deletion pkg/backends/knative_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"net/http"
"testing"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
4 changes: 2 additions & 2 deletions pkg/backends/openfaas.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"log"
"net/http"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils"
ofv1 "github.com/openfaas/faas-netes/pkg/apis/openfaas/v1"
ofclientset "github.com/openfaas/faas-netes/pkg/client/clientset/versioned"

Expand Down
2 changes: 1 addition & 1 deletion pkg/backends/serverlessbackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package backends

import (
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"strings"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils/auth"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils/auth"
)

type configForUser struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/handlers/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (
"github.com/aws/aws-sdk-go/service/s3"
"github.com/gin-gonic/gin"
"github.com/grycap/cdmi-client-go"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils"
"github.com/grycap/oscar/v2/pkg/utils/auth"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils"
"github.com/grycap/oscar/v3/pkg/utils/auth"
k8sErrors "k8s.io/apimachinery/pkg/api/errors"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/handlers/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"github.com/aws/aws-sdk-go/aws/arn"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils"
"github.com/grycap/oscar/v2/pkg/utils/auth"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils"
"github.com/grycap/oscar/v3/pkg/utils/auth"
"k8s.io/apimachinery/pkg/api/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/version"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/version"
"k8s.io/client-go/kubernetes"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/backends"
"github.com/grycap/oscar/v3/pkg/backends"
)

func TestMakeInfoHandler(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (

"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/grycap/oscar/v2/pkg/resourcemanager"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/resourcemanager"
"github.com/grycap/oscar/v3/pkg/types"
batchv1 "k8s.io/api/batch/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"strings"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils/auth"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils/auth"
)

// MakeListHandler makes a handler for listing services
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"testing"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/backends"
"github.com/grycap/oscar/v3/pkg/backends"
)

func TestMakeListHandler(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"strings"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils/auth"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils/auth"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"strings"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils/auth"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils/auth"
"k8s.io/apimachinery/pkg/api/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/read_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/backends"
"github.com/grycap/oscar/v3/pkg/backends"
k8serr "k8s.io/apimachinery/pkg/api/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
"k8s.io/apimachinery/pkg/api/errors"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/backends"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/backends"
"github.com/grycap/oscar/v3/pkg/types"
k8serr "k8s.io/apimachinery/pkg/api/errors"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/handlers/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"strings"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils"
"github.com/grycap/oscar/v2/pkg/utils/auth"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils"
"github.com/grycap/oscar/v3/pkg/utils/auth"
"k8s.io/apimachinery/pkg/api/errors"
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/imagepuller/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"sync"
"time"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -57,7 +57,7 @@ type PodCounter struct {
var pc PodCounter
var stopper chan struct{}

//Create daemonset
// Create daemonset
func CreateDaemonset(cfg *types.Config, service types.Service, kubeClientset kubernetes.Interface) error {

//Set needed variables
Expand All @@ -83,7 +83,7 @@ func CreateDaemonset(cfg *types.Config, service types.Service, kubeClientset kub
return nil
}

//Get daemonset definition
// Get daemonset definition
func getDaemonset(cfg *types.Config, service types.Service) *appsv1.DaemonSet {
return &appsv1.DaemonSet{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -120,7 +120,7 @@ func getDaemonset(cfg *types.Config, service types.Service) *appsv1.DaemonSet {
}
}

//Watch pods with a Kubernetes Informer
// Watch pods with a Kubernetes Informer
func watchPods(kubeClientset kubernetes.Interface, cfg *types.Config) {
stopper = make(chan struct{})
defer close(stopper)
Expand Down
2 changes: 1 addition & 1 deletion pkg/resourcemanager/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"strings"
"time"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/resourcemanager/rescheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strconv"
"time"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion pkg/resourcemanager/resourcemanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"time"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/resourcemanager/resourcemanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package resourcemanager
import (
"testing"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
"k8s.io/client-go/kubernetes/fake"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"strings"

"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v2/pkg/utils"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/grycap/oscar/v3/pkg/utils"
"k8s.io/client-go/kubernetes"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/auth/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"github.com/coreos/go-oidc/v3/oidc"
"github.com/gin-gonic/gin"
"github.com/grycap/oscar/v2/pkg/utils"
"github.com/grycap/oscar/v3/pkg/utils"
"golang.org/x/oauth2"
"k8s.io/client-go/kubernetes"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/expose.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"log"
"os"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
apps "k8s.io/api/apps/v1"
autos "k8s.io/api/autoscaling/v1"
v1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/minio.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"net/url"
"time"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/minio/madmin-go"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/of_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"
"time"

"github.com/grycap/oscar/v2/pkg/types"
"github.com/grycap/oscar/v3/pkg/types"
"github.com/prometheus/client_golang/api"
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Loading

0 comments on commit 574e526

Please sign in to comment.