Skip to content

Commit abba149

Browse files
authored
Update Otterize CRD versions following changes to the intents operator (#226)
1 parent 7d80f75 commit abba149

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

src/go.mod

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/kafka-watcher/cmd/main.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ func main() {
3737
TimestampFormat: time.RFC3339,
3838
})
3939
errgrp, errGroupCtx := errgroup.WithContext(signals.SetupSignalHandler())
40-
clusterUID, err := clusterutils.GetOrCreateClusterUID(errGroupCtx)
41-
if err != nil {
42-
logrus.WithError(err).Panic("Failed fetching cluster UID")
43-
}
40+
clusterUID := clusterutils.GetOrCreateClusterUID(errGroupCtx)
4441
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))
4542
errorreporter.Init("kafka-watcher", version.Version())
4643
defer errorreporter.AutoNotify()
@@ -53,6 +50,7 @@ func main() {
5350
mode := viper.GetString(config.KafkaLogReadModeKey)
5451

5552
var watcher logwatcher2.Watcher
53+
var err error
5654

5755
switch mode {
5856
case config.FileReadMode:

src/mapper/cmd/main.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ import (
3636

3737
"github.com/labstack/echo/v4"
3838
"github.com/labstack/echo/v4/middleware"
39-
otterizev1 "github.com/otterize/intents-operator/src/operator/api/v1"
4039
otterizev1alpha2 "github.com/otterize/intents-operator/src/operator/api/v1alpha2"
4140
otterizev1alpha3 "github.com/otterize/intents-operator/src/operator/api/v1alpha3"
41+
otterizev1beta1 "github.com/otterize/intents-operator/src/operator/api/v1beta1"
4242
"github.com/otterize/intents-operator/src/shared/serviceidresolver"
4343
"github.com/otterize/intents-operator/src/shared/telemetries/telemetriesgql"
4444
"github.com/otterize/intents-operator/src/shared/telemetries/telemetrysender"
@@ -69,7 +69,7 @@ func init() {
6969
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
7070
utilruntime.Must(otterizev1alpha2.AddToScheme(scheme))
7171
utilruntime.Must(otterizev1alpha3.AddToScheme(scheme))
72-
utilruntime.Must(otterizev1.AddToScheme(scheme))
72+
utilruntime.Must(otterizev1beta1.AddToScheme(scheme))
7373
utilruntime.Must(otterizev2alpha1.AddToScheme(scheme))
7474
}
7575

@@ -94,10 +94,7 @@ func main() {
9494
})
9595
signalHandlerCtx := ctrl.SetupSignalHandler()
9696

97-
clusterUID, err := clusterutils.GetOrCreateClusterUID(signalHandlerCtx)
98-
if err != nil {
99-
logrus.WithError(err).Panic("Failed fetching cluster UID")
100-
}
97+
clusterUID := clusterutils.GetOrCreateClusterUID(signalHandlerCtx)
10198

10299
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))
103100

src/sniffer/cmd/main.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ func main() {
3535
TimestampFormat: time.RFC3339,
3636
})
3737
errgrp, errGroupCtx := errgroup.WithContext(signals.SetupSignalHandler())
38-
clusterUID, err := clusterutils.GetOrCreateClusterUID(errGroupCtx)
39-
if err != nil {
40-
logrus.WithError(err).Panic("Failed fetching cluster UID")
41-
}
38+
clusterUID := clusterutils.GetOrCreateClusterUID(errGroupCtx)
4239
componentinfo.SetGlobalContextId(telemetrysender.Anonymize(clusterUID))
4340
errorreporter.Init("sniffer", version.Version())
4441
defer errorreporter.AutoNotify()
@@ -87,7 +84,7 @@ func main() {
8784
return snifferInstance.RunForever(errGroupCtx)
8885
})
8986

90-
err = errgrp.Wait()
87+
err := errgrp.Wait()
9188
if err != nil && !errors.Is(err, http.ErrServerClosed) {
9289
logrus.WithError(err).Panic("Error when running server or HTTP server")
9390
}

0 commit comments

Comments
 (0)