Skip to content

Commit

Permalink
Update the Operator SDK version (jaegertracing#69)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
  • Loading branch information
jpkrohling authored and andream16 committed Oct 17, 2018
1 parent c676e73 commit cf6b349
Show file tree
Hide file tree
Showing 630 changed files with 16,902 additions and 8,941 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ flycheck_*.el
*.out

### Go Patch ###
/vendor/
/Godeps/

### Intellij ###
Expand Down
86 changes: 61 additions & 25 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 7 additions & 13 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,27 @@ required = [

[[override]]
name = "k8s.io/code-generator"
# revision for tag "kubernetes-1.10.1"
revision = "7ead8f38b01cf8653249f5af80ce7b2c8aba12e2"
version = "kubernetes-1.11.2"

[[override]]
name = "k8s.io/api"
# revision for tag "kubernetes-1.10.1"
revision = "73d903622b7391f3312dcbac6483fed484e185f8"
version = "kubernetes-1.11.2"

[[override]]
name = "k8s.io/apiextensions-apiserver"
# revision for tag "kubernetes-1.10.1"
revision = "4347b330d0ff094db860f2f75fa725b4f4b53618"
version = "kubernetes-1.11.2"

[[override]]
name = "k8s.io/apimachinery"
# revision for tag "kubernetes-1.10.1"
revision = "302974c03f7e50f16561ba237db776ab93594ef6"
version = "kubernetes-1.11.2"

[[override]]
name = "k8s.io/client-go"
# revision for tag "kubernetes-1.10.1"
revision = "989be4278f353e42f26c416c53757d16fcff77db"
version = "kubernetes-1.11.2"

[[override]]
name = "sigs.k8s.io/controller-runtime"
revision = "60bb251ad86f9b313653618aad0c2c53f41a6625"
version = "v0.1.4"

[prune]
go-tests = true
Expand All @@ -54,8 +49,7 @@ required = [
[[constraint]]
name = "github.com/operator-framework/operator-sdk"
# The version rule is used for a specific release and the master branch for in between releases.
branch = "master"
# version = "=v0.0.5"
version = "=v0.0.7"

[[constraint]]
name = "github.com/stretchr/testify"
Expand Down
16 changes: 8 additions & 8 deletions pkg/cmd/start/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import (
"os"
"os/signal"
"syscall"

"github.com/operator-framework/operator-sdk/pkg/sdk"
"github.com/operator-framework/operator-sdk/pkg/util/k8sutil"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"time"

"github.com/jaegertracing/jaeger-operator/pkg/apis/io/v1alpha1"
stub "github.com/jaegertracing/jaeger-operator/pkg/stub"
"github.com/jaegertracing/jaeger-operator/pkg/version"
sdk "github.com/operator-framework/operator-sdk/pkg/sdk"
k8sutil "github.com/operator-framework/operator-sdk/pkg/util/k8sutil"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)

// NewStartCommand starts the Jaeger Operator
Expand Down Expand Up @@ -87,7 +87,7 @@ func start(cmd *cobra.Command, args []string) {

sdk.ExposeMetricsPort()

resyncPeriod := 5
resyncPeriod := 5 * time.Second
namespace, err := k8sutil.GetWatchNamespace()
if err != nil {
logrus.Fatalf("failed to get watch namespace: %v", err)
Expand All @@ -107,7 +107,7 @@ func start(cmd *cobra.Command, args []string) {
}
}

func watch(apiVersion, kind, namespace string, resyncPeriod int) {
func watch(apiVersion, kind, namespace string, resyncPeriod time.Duration) {
logrus.Infof("Watching %s, %s, %s, %d", apiVersion, kind, namespace, resyncPeriod)
sdk.Watch(apiVersion, kind, namespace, resyncPeriod)
}
9 changes: 4 additions & 5 deletions test/e2e/all_in_one_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@ import (
"fmt"
"testing"

"github.com/jaegertracing/jaeger-operator/pkg/apis/io/v1alpha1"
framework "github.com/operator-framework/operator-sdk/pkg/test"
"github.com/operator-framework/operator-sdk/pkg/test/e2eutil"
"github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/jaegertracing/jaeger-operator/pkg/apis/io/v1alpha1"
)

func JaegerAllInOne(t *testing.T) {
t.Parallel()
ctx := prepare(t)
defer ctx.Cleanup(t)
defer ctx.Cleanup()

if err := allInOneTest(t, framework.Global, ctx); err != nil {
t.Fatal(err)
}
}

func allInOneTest(t *testing.T, f *framework.Framework, ctx framework.TestCtx) error {
func allInOneTest(t *testing.T, f *framework.Framework, ctx *framework.TestCtx) error {
namespace, err := ctx.GetNamespace()
if err != nil {
return fmt.Errorf("could not get namespace: %v", err)
Expand Down Expand Up @@ -51,7 +50,7 @@ func allInOneTest(t *testing.T, f *framework.Framework, ctx framework.TestCtx) e
}

logrus.Infof("passing %v", exampleJaeger)
err = f.DynamicClient.Create(goctx.TODO(), exampleJaeger)
err = f.Client.Create(goctx.TODO(), exampleJaeger, &framework.CleanupOptions{TestContext: ctx, Timeout: timeout, RetryInterval: retryInterval})
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit cf6b349

Please sign in to comment.