Skip to content

Commit

Permalink
Update Otterize CRD versions following changes to the intents operator (
Browse files Browse the repository at this point in the history
  • Loading branch information
omris94 authored Jul 17, 2024
1 parent 7d80f75 commit abba149
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/go.mod

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

4 changes: 2 additions & 2 deletions src/go.sum

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

6 changes: 2 additions & 4 deletions src/kafka-watcher/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ func main() {
TimestampFormat: time.RFC3339,
})
errgrp, errGroupCtx := errgroup.WithContext(signals.SetupSignalHandler())
clusterUID, err := clusterutils.GetOrCreateClusterUID(errGroupCtx)
if err != nil {
logrus.WithError(err).Panic("Failed fetching cluster UID")
}
clusterUID := clusterutils.GetOrCreateClusterUID(errGroupCtx)
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))
errorreporter.Init("kafka-watcher", version.Version())
defer errorreporter.AutoNotify()
Expand All @@ -53,6 +50,7 @@ func main() {
mode := viper.GetString(config.KafkaLogReadModeKey)

var watcher logwatcher2.Watcher
var err error

switch mode {
case config.FileReadMode:
Expand Down
9 changes: 3 additions & 6 deletions src/mapper/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import (

"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
otterizev1 "github.com/otterize/intents-operator/src/operator/api/v1"
otterizev1alpha2 "github.com/otterize/intents-operator/src/operator/api/v1alpha2"
otterizev1alpha3 "github.com/otterize/intents-operator/src/operator/api/v1alpha3"
otterizev1beta1 "github.com/otterize/intents-operator/src/operator/api/v1beta1"
"github.com/otterize/intents-operator/src/shared/serviceidresolver"
"github.com/otterize/intents-operator/src/shared/telemetries/telemetriesgql"
"github.com/otterize/intents-operator/src/shared/telemetries/telemetrysender"
Expand Down Expand Up @@ -69,7 +69,7 @@ func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
utilruntime.Must(otterizev1alpha2.AddToScheme(scheme))
utilruntime.Must(otterizev1alpha3.AddToScheme(scheme))
utilruntime.Must(otterizev1.AddToScheme(scheme))
utilruntime.Must(otterizev1beta1.AddToScheme(scheme))
utilruntime.Must(otterizev2alpha1.AddToScheme(scheme))
}

Expand All @@ -94,10 +94,7 @@ func main() {
})
signalHandlerCtx := ctrl.SetupSignalHandler()

clusterUID, err := clusterutils.GetOrCreateClusterUID(signalHandlerCtx)
if err != nil {
logrus.WithError(err).Panic("Failed fetching cluster UID")
}
clusterUID := clusterutils.GetOrCreateClusterUID(signalHandlerCtx)

componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))

Expand Down
7 changes: 2 additions & 5 deletions src/sniffer/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ func main() {
TimestampFormat: time.RFC3339,
})
errgrp, errGroupCtx := errgroup.WithContext(signals.SetupSignalHandler())
clusterUID, err := clusterutils.GetOrCreateClusterUID(errGroupCtx)
if err != nil {
logrus.WithError(err).Panic("Failed fetching cluster UID")
}
clusterUID := clusterutils.GetOrCreateClusterUID(errGroupCtx)
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))
errorreporter.Init("sniffer", version.Version())
defer errorreporter.AutoNotify()
Expand Down Expand Up @@ -87,7 +84,7 @@ func main() {
return snifferInstance.RunForever(errGroupCtx)
})

err = errgrp.Wait()
err := errgrp.Wait()
if err != nil && !errors.Is(err, http.ErrServerClosed) {
logrus.WithError(err).Panic("Error when running server or HTTP server")
}
Expand Down

0 comments on commit abba149

Please sign in to comment.