Skip to content

Commit

Permalink
Update dependencies, renerate streamconfig.RePublish
Browse files Browse the repository at this point in the history
Signed-off-by: Waldemar Quevedo <[email protected]>
  • Loading branch information
wallyqs committed Nov 22, 2022
1 parent 1464dd8 commit 01d26ea
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 93 deletions.
2 changes: 1 addition & 1 deletion cmd/jetstream-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
var (
BuildTime = "build-time-not-set"
GitInfo = "gitinfo-not-set"
Version = "0.7.4"
Version = "0.8.0"
)

func main() {
Expand Down
15 changes: 12 additions & 3 deletions controllers/jetstream/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func createStream(ctx context.Context, c jsmClient, spec apis.StreamSpec) (err e
})

if spec.Republish != nil {
opts = append(opts, jsm.Republish(&jsmapi.SubjectMapping{
opts = append(opts, jsm.Republish(&jsmapi.RePublish{
Source: spec.Republish.Source,
Destination: spec.Republish.Destination,
}))
Expand Down Expand Up @@ -372,7 +372,7 @@ func updateStream(ctx context.Context, c jsmClient, spec apis.StreamSpec) (err e
return err
}

return js.UpdateConfiguration(jsmapi.StreamConfig{
config := jsmapi.StreamConfig{
Name: spec.Name,
Retention: retention,
Subjects: spec.Subjects,
Expand All @@ -386,7 +386,16 @@ func updateStream(ctx context.Context, c jsmClient, spec apis.StreamSpec) (err e
Replicas: spec.Replicas,
NoAck: spec.NoAck,
Duplicates: duplicates,
})
}
if spec.Republish != nil {
config.RePublish = &jsmapi.RePublish{
Source: spec.Republish.Source,
Destination: spec.Republish.Destination,
HeadersOnly: spec.Republish.HeadersOnly,
}
}

return js.UpdateConfiguration(config)
}

func deleteStream(ctx context.Context, c jsmClient, spec apis.StreamSpec) (err error) {
Expand Down
27 changes: 13 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.17

require (
github.com/fsnotify/fsnotify v1.5.4
github.com/nats-io/jsm.go v0.0.33
github.com/nats-io/nats.go v1.16.0
github.com/nats-io/jsm.go v0.0.35
github.com/nats-io/nats.go v1.20.0
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.7.1
k8s.io/api v0.24.0
k8s.io/apimachinery v0.24.0
k8s.io/client-go v0.24.0
Expand Down Expand Up @@ -36,12 +36,12 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.15.5 // indirect
github.com/klauspost/compress v1.15.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand All @@ -51,16 +51,15 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
golang.org/x/tools v0.1.10 // indirect
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/term v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/time v0.1.0 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit 01d26ea

Please sign in to comment.