Skip to content

Commit

Permalink
refactor: update examples to v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianKramm committed Aug 18, 2022
1 parent 5737b7d commit b8b06c5
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion examples/bootstrap-with-deployment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/loft-sh/vcluster-mydeployment-example

go 1.17

require github.com/loft-sh/vcluster-sdk v0.2.0
require github.com/loft-sh/vcluster-sdk v0.3.0

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions examples/bootstrap-with-deployment/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0/go.mod h1:YBCo4D
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
github.com/loft-sh/vcluster-sdk v0.2.0 h1:d1uyWMZVcfFso7umN1W+ghLohv8LPLUbO8dSMgeRoVo=
github.com/loft-sh/vcluster-sdk v0.2.0/go.mod h1:HdQ75vqJuqiHiCtX+bmRAN9ZrCFimeYfQ5vKX1hEx2o=
github.com/loft-sh/vcluster-sdk v0.3.0 h1:/934jIw+kfpXS7ujX6pt4pDi06MiWyKY7S+Q7kI37Z4=
github.com/loft-sh/vcluster-sdk v0.3.0/go.mod h1:HdQ75vqJuqiHiCtX+bmRAN9ZrCFimeYfQ5vKX1hEx2o=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
Expand Down
2 changes: 1 addition & 1 deletion examples/bootstrap-with-deployment/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func main() {
ctx := plugin.MustInit("bootstrap-with-deployment")
ctx := plugin.MustInit()
plugin.MustRegister(syncers.NewMydeploymentSyncer(ctx))
plugin.MustStart()
}
2 changes: 1 addition & 1 deletion examples/crd-sync/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.17

require (
github.com/ghodss/yaml v1.0.0
github.com/loft-sh/vcluster-sdk v0.2.0
github.com/loft-sh/vcluster-sdk v0.3.0
k8s.io/apiextensions-apiserver v0.24.0
k8s.io/apimachinery v0.24.0
sigs.k8s.io/controller-runtime v0.12.1
Expand Down
4 changes: 2 additions & 2 deletions examples/crd-sync/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0/go.mod h1:YBCo4D
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
github.com/loft-sh/vcluster-sdk v0.2.0 h1:d1uyWMZVcfFso7umN1W+ghLohv8LPLUbO8dSMgeRoVo=
github.com/loft-sh/vcluster-sdk v0.2.0/go.mod h1:HdQ75vqJuqiHiCtX+bmRAN9ZrCFimeYfQ5vKX1hEx2o=
github.com/loft-sh/vcluster-sdk v0.3.0 h1:/934jIw+kfpXS7ujX6pt4pDi06MiWyKY7S+Q7kI37Z4=
github.com/loft-sh/vcluster-sdk v0.3.0/go.mod h1:HdQ75vqJuqiHiCtX+bmRAN9ZrCFimeYfQ5vKX1hEx2o=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
Expand Down
2 changes: 1 addition & 1 deletion examples/crd-sync/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func main() {
ctx := plugin.MustInit("crd-sync")
ctx := plugin.MustInit()
plugin.MustRegister(syncers.NewCarSyncer(ctx))
plugin.MustStart()
}
2 changes: 1 addition & 1 deletion examples/hooks/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/loft-sh/vcluster-pod-hooks
go 1.17

require (
github.com/loft-sh/vcluster-sdk v0.2.0
github.com/loft-sh/vcluster-sdk v0.3.0
github.com/pkg/errors v0.9.1
k8s.io/api v0.24.0
k8s.io/apimachinery v0.24.0
Expand Down
4 changes: 2 additions & 2 deletions examples/hooks/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0/go.mod h1:YBCo4D
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
github.com/loft-sh/vcluster-sdk v0.2.0 h1:d1uyWMZVcfFso7umN1W+ghLohv8LPLUbO8dSMgeRoVo=
github.com/loft-sh/vcluster-sdk v0.2.0/go.mod h1:HdQ75vqJuqiHiCtX+bmRAN9ZrCFimeYfQ5vKX1hEx2o=
github.com/loft-sh/vcluster-sdk v0.3.0 h1:/934jIw+kfpXS7ujX6pt4pDi06MiWyKY7S+Q7kI37Z4=
github.com/loft-sh/vcluster-sdk v0.3.0/go.mod h1:HdQ75vqJuqiHiCtX+bmRAN9ZrCFimeYfQ5vKX1hEx2o=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
Expand Down
2 changes: 1 addition & 1 deletion examples/hooks/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func main() {
_ = plugin.MustInit("hooks")
_ = plugin.MustInit()
plugin.MustRegister(hooks.NewPodHook())
plugin.MustRegister(hooks.NewServiceHook())
plugin.MustRegister(hooks.NewSecretHook())
Expand Down
2 changes: 1 addition & 1 deletion examples/pull-secret-sync/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/loft-sh/vcluster-pull-secret-sync
go 1.17

require (
github.com/loft-sh/vcluster-sdk v0.2.0
github.com/loft-sh/vcluster-sdk v0.3.0
k8s.io/api v0.24.0
k8s.io/apimachinery v0.24.0
sigs.k8s.io/controller-runtime v0.12.1
Expand Down
4 changes: 2 additions & 2 deletions examples/pull-secret-sync/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0/go.mod h1:YBCo4D
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
github.com/loft-sh/vcluster-sdk v0.2.0 h1:d1uyWMZVcfFso7umN1W+ghLohv8LPLUbO8dSMgeRoVo=
github.com/loft-sh/vcluster-sdk v0.2.0/go.mod h1:HdQ75vqJuqiHiCtX+bmRAN9ZrCFimeYfQ5vKX1hEx2o=
github.com/loft-sh/vcluster-sdk v0.3.0 h1:/934jIw+kfpXS7ujX6pt4pDi06MiWyKY7S+Q7kI37Z4=
github.com/loft-sh/vcluster-sdk v0.3.0/go.mod h1:HdQ75vqJuqiHiCtX+bmRAN9ZrCFimeYfQ5vKX1hEx2o=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
Expand Down
3 changes: 1 addition & 2 deletions examples/pull-secret-sync/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"github.com/loft-sh/vcluster-pull-secret-sync/constants"
"os"

"github.com/loft-sh/vcluster-pull-secret-sync/syncers"
Expand All @@ -20,7 +19,7 @@ func main() {
destinationNamespace = DefaultDestinationNamespace
}

ctx := plugin.MustInit(constants.PluginName)
ctx := plugin.MustInit()
plugin.MustRegister(syncers.NewPullSecretSyncer(ctx, destinationNamespace))
plugin.MustStart()
}

0 comments on commit b8b06c5

Please sign in to comment.