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

Enable support to create app in any namespace #43

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/weaver-kube/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ func deploy(ctx context.Context, args []string) error {
if config.Image == "" {
return fmt.Errorf("No image name provided in config file. See `weaver kube deploy --help` for details")
}
if config.Namespace == "" {
config.Namespace = "default"
}
binListeners, err := bin.ReadListeners(app.Binary)
if err != nil {
return fmt.Errorf("cannot read listeners from binary %s: %w", app.Binary, err)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/ServiceWeaver/weaver-kube
go 1.21

require (
github.com/ServiceWeaver/weaver v0.18.0
github.com/ServiceWeaver/weaver v0.18.1
github.com/google/uuid v1.3.0
go.opentelemetry.io/otel v1.16.0
go.opentelemetry.io/otel/exporters/jaeger v1.16.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ github.com/DataDog/hyperloglog v0.0.0-20220804205443-1806d9b66146 h1:S5WsRc58vIe
github.com/DataDog/hyperloglog v0.0.0-20220804205443-1806d9b66146/go.mod h1:hFPkswc42pKhRbeKDKXy05mRi7J1kJ2vMNbvd9erH0M=
github.com/DataDog/mmh3 v0.0.0-20210722141835-012dc69a9e49 h1:EbzDX8HPk5uE2FsJYxD74QmMw0/3CqSKhEr6teh0ncQ=
github.com/DataDog/mmh3 v0.0.0-20210722141835-012dc69a9e49/go.mod h1:SvsjzyJlSg0rKsqYgdcFxeEVflx3ZNAyFfkUHP0TxXg=
github.com/ServiceWeaver/weaver v0.18.0 h1:b62r1E9mYnCaPEH+KOT34FsMjSZNLFSlXEnNLTR0pyM=
github.com/ServiceWeaver/weaver v0.18.0/go.mod h1:/tJzitb+h8nLeHa4Mk7iIGU5ZV4OGB4C9IvIfD8n/1I=
github.com/ServiceWeaver/weaver v0.18.1 h1:SE3YhFO58xm3zjYY1wF4Lbz928m27tmQdnbEsdagil4=
github.com/ServiceWeaver/weaver v0.18.1/go.mod h1:/tJzitb+h8nLeHa4Mk7iIGU5ZV4OGB4C9IvIfD8n/1I=
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18=
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
Expand Down
2 changes: 1 addition & 1 deletion internal/impl/babysitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (b *babysitter) watchPods(ctx context.Context, component string) error {
rs := replicaSet(component, b.cfg.Deployment)
name := name{b.cfg.Deployment.App.Name, rs, b.cfg.Deployment.Id[:8]}.DNSLabel()
opts := metav1.ListOptions{LabelSelector: fmt.Sprintf("depName=%s", name)}
watcher, err := b.clientset.CoreV1().Pods("default").Watch(ctx, opts)
watcher, err := b.clientset.CoreV1().Pods(b.cfg.Namespace).Watch(ctx, opts)
if err != nil {
return fmt.Errorf("watch pods for component %s: %w", component, err)
}
Expand Down
Loading