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

[ORB-203] Enable sink status update by listening to otel-collector logs. #2135

Merged
merged 60 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
f390d70
feat(maestro): add hc on config.
lpegoraro Dec 27, 2022
8d5cbdf
feat(maestro): check true
lpegoraro Dec 28, 2022
76f277a
feat(maestro): remove debug
lpegoraro Dec 28, 2022
ace20bb
feat(maestro): remove logging exporter
lpegoraro Dec 28, 2022
7a3857d
feat(sinker): remove deprecated parameter
lpegoraro Dec 28, 2022
183e3cf
feat(maestro): wip monitor of otel collectors
lpegoraro Dec 28, 2022
bf8861c
feat(build): update kind mechanism.
lpegoraro Dec 28, 2022
8fdd424
feat(maestro): change params
lpegoraro Dec 28, 2022
1f80dd7
feat(maestro): add config.
lpegoraro Dec 28, 2022
5c9d956
Merge branch 'develop' into otel_hc
lpegoraro Dec 28, 2022
257c46b
Merge branch 'develop' into otel_hc
lpegoraro Dec 28, 2022
3b602a9
fix(gitignore): ignore kind/charts changes
lpegoraro Dec 30, 2022
b69b5e7
feat(maestro): add log collecting routine.
lpegoraro Jan 3, 2023
9b347e6
feat(maestro): add new redis cache usage.
lpegoraro Jan 4, 2023
86cc5f1
feat(maestro): fix kubectr initialization.
lpegoraro Jan 4, 2023
abb0b56
feat(sinks): add ownerID to sinks API.
lpegoraro Jan 5, 2023
a81fd68
feat(maestro): add ownerID and change update to listen to api and upd…
lpegoraro Jan 5, 2023
c51cd6c
feat(maestro): add stateFilter to api.
lpegoraro Jan 5, 2023
705fa74
feat(maestro): fix cycle dependency.
lpegoraro Jan 5, 2023
43d9640
feat(maestro): fix cycle dependency.
lpegoraro Jan 5, 2023
9bac01b
feat(maestro): wip get logs.
lpegoraro Jan 6, 2023
ebcdff8
feat(maestro): wip get logs.
lpegoraro Jan 9, 2023
b69c70b
Merge branch 'develop' into otel_hc
lpegoraro Jan 9, 2023
f791bf0
feat(maestro): get logs properly.
lpegoraro Jan 9, 2023
fee5854
feat(maestro): fix crash.
lpegoraro Jan 9, 2023
689371a
feat(maestro): add simple log analysis.
lpegoraro Jan 9, 2023
18fd15d
feat(maestro): add warning and notify change of state.
lpegoraro Jan 9, 2023
8e7fedf
feat(maestro): add missing data.
lpegoraro Jan 9, 2023
f299e2f
feat(maestro): integrate maestro and sinks, and prepare maestro to fe…
lpegoraro Jan 9, 2023
e455804
feat(maestro): add logging exporter, and analyse metrics as active or…
lpegoraro Jan 11, 2023
45e68a6
feat(maestro): fix config.
lpegoraro Jan 11, 2023
03734c7
feat(maestro): remove debug logs.
lpegoraro Jan 11, 2023
ec0f2e7
feat(maestro): fix time.
lpegoraro Jan 11, 2023
5ff2871
feat(maestro): fix test.
lpegoraro Jan 11, 2023
1d6c483
feat(maestro): code review adjustments.
lpegoraro Jan 12, 2023
b187692
feat(maestro): remove previous way of getting logs, it was changed us…
lpegoraro Jan 12, 2023
a66b47b
feat(maestro): fix typo.
lpegoraro Jan 12, 2023
4340767
feat(maestro): fix maestro-sinks interaction.
lpegoraro Jan 12, 2023
e199029
feat(maestro): fix maestro-sinks interaction.
lpegoraro Jan 13, 2023
27ab2ba
feat(mod): add go mod k8s client.
lpegoraro Jan 13, 2023
c23a907
Revert "feat(maestro): fix maestro-sinks interaction."
lpegoraro Jan 13, 2023
181d404
feat(maestro): add time control.
lpegoraro Jan 13, 2023
62f9ac2
feat(sinks): update proto.
lpegoraro Jan 16, 2023
7ba80ff
Revert "feat(sinks): update proto."
lpegoraro Jan 16, 2023
398be53
feat(sinks/maestro): update status using stream.
lpegoraro Jan 17, 2023
a9a741b
feat(maestro): fix redis client
lpegoraro Jan 17, 2023
5c15f93
feat(maestro): rollback new status
lpegoraro Jan 17, 2023
940863a
feat(maestro): fix interaction and added second layer of confirmation.
lpegoraro Jan 17, 2023
230b6bc
feat(maestro): fix Hset
lpegoraro Jan 17, 2023
d01ddfd
feat(maestro): simplify
lpegoraro Jan 17, 2023
0fa93ee
feat(maestro): add err to logs
lpegoraro Jan 17, 2023
3654e49
feat(maestro): change state methods
lpegoraro Jan 17, 2023
8887da9
feat(maestro): fix empty line logs
lpegoraro Jan 17, 2023
acee05c
feat(maestro): remove debug
lpegoraro Jan 17, 2023
d1c5efa
feat(maestro): nil safe
lpegoraro Jan 17, 2023
14b35c0
feat(maestro): fix duplicity of active and overriding error.
lpegoraro Jan 18, 2023
9f4ce21
feat(sinker): remove healthcheck.
lpegoraro Jan 20, 2023
3202d29
feat(sinker/maestro): update notifying method, fixing override of sta…
lpegoraro Jan 23, 2023
65060cf
feat(sinker): fix implementation.
lpegoraro Jan 24, 2023
4c63ead
Merge branch 'develop' into otel_hc
lpegoraro Jan 24, 2023
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ python-test/behave_orb
test_agent_name*
docker/otel-collector-config.yaml
!docker/otel-collector-config.yaml.tpl

kind/*
!kind/README.md
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ kind-install-orb:

kind-upgrade-orb:
helm upgrade -n orb kind-orb ./kind
kubectl rollout restart deployment -n orb

kind-delete-orb:
kubectl delete -f ./kind/nginx.yaml
Expand Down
50 changes: 45 additions & 5 deletions cmd/maestro/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"fmt"
sinksgrpc "github.com/ns1labs/orb/sinks/api/grpc"
"github.com/opentracing/opentracing-go"
"github.com/spf13/viper"
jconfig "github.com/uber/jaeger-client-go/config"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
Expand Down Expand Up @@ -41,7 +42,8 @@ const (

func main() {

esCfg := config.LoadEsConfig(envPrefix)
streamEsCfg := loadStreamEsConfig(envPrefix)
sinkerEsCfg := loadSinkerEsConfig(envPrefix)
svcCfg := config.LoadBaseServiceConfig(envPrefix, httpPort)
jCfg := config.LoadJaegerConfig(envPrefix)
sinksGRPCCfg := config.LoadGRPCConfig("orb", "sinks")
Expand Down Expand Up @@ -71,14 +73,20 @@ func main() {
_ = logger.Sync()
}(logger)
log := logger.Sugar()
esClient := connectToRedis(esCfg.URL, esCfg.Pass, esCfg.DB, logger)
streamEsClient := connectToRedis(streamEsCfg.URL, streamEsCfg.Pass, streamEsCfg.DB, logger)
defer func(esClient *r.Client) {
err := esClient.Close()
if err != nil {
return
}
}(esClient)

}(streamEsClient)
sinkerEsClient := connectToRedis(sinkerEsCfg.URL, sinkerEsCfg.Pass, sinkerEsCfg.DB, logger)
defer func(esClient *r.Client) {
err := esClient.Close()
if err != nil {
return
}
}(sinkerEsClient)
tracer, tracerCloser := initJaeger(svcName, jCfg.URL, logger)
defer func(tracerCloser io.Closer) {
err := tracerCloser.Close()
Expand All @@ -102,7 +110,7 @@ func main() {
sinksGRPCClient := sinksgrpc.NewClient(tracer, sinksGRPCConn, sinksGRPCTimeout, logger)
otelCfg := config.LoadOtelConfig(envPrefix)

svc := maestro.NewMaestroService(logger, esClient, sinksGRPCClient, esCfg, otelCfg)
svc := maestro.NewMaestroService(logger, streamEsClient, sinkerEsClient, sinksGRPCClient, streamEsCfg, otelCfg)
errs := make(chan error, 2)

mainContext, mainCancelFunction := context.WithCancel(context.Background())
Expand Down Expand Up @@ -189,3 +197,35 @@ func connectToRedis(redisURL, redisPass, redisDB string, logger *zap.Logger) *r.
DB: db,
})
}

func loadStreamEsConfig(prefix string) config.EsConfig {
cfg := viper.New()
cfg.SetEnvPrefix(fmt.Sprintf("%s_stream_es", prefix))

cfg.SetDefault("url", "localhost:6379")
cfg.SetDefault("pass", "")
cfg.SetDefault("db", "0")
cfg.SetDefault("consumer", fmt.Sprintf("%s-es-consumer", prefix))

cfg.AllowEmptyEnv(true)
cfg.AutomaticEnv()
var esC config.EsConfig
cfg.Unmarshal(&esC)
return esC
}

func loadSinkerEsConfig(prefix string) config.EsConfig {
cfg := viper.New()
cfg.SetEnvPrefix(fmt.Sprintf("%s_sinker_es", prefix))

cfg.SetDefault("url", "localhost:6378")
cfg.SetDefault("pass", "")
cfg.SetDefault("db", "0")
cfg.SetDefault("consumer", fmt.Sprintf("%s-sinker-es-consumer", prefix))

cfg.AllowEmptyEnv(true)
cfg.AutomaticEnv()
var esC config.EsConfig
cfg.Unmarshal(&esC)
return esC
}
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ require (
google.golang.org/protobuf v1.28.1
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.26.0
k8s.io/apimachinery v0.26.0
)

//These libs are used to allow orb extend opentelemetry features
Expand All @@ -54,7 +56,7 @@ require (
go.opentelemetry.io/otel/metric v0.32.1
go.opentelemetry.io/otel/trace v1.10.0
google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de
k8s.io/client-go v0.25.2
k8s.io/client-go v0.26.0
)

require (
Expand Down Expand Up @@ -186,22 +188,20 @@ require (
go.uber.org/goleak v1.2.0 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220927171203-f486391704dc // indirect
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect
golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7 // indirect
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/api v0.98.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
k8s.io/api v0.25.2 // indirect
k8s.io/apimachinery v0.25.2 // indirect
k8s.io/klog/v2 v2.70.1 // indirect
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Expand All @@ -214,7 +214,7 @@ require (
github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
Expand Down Expand Up @@ -245,6 +245,6 @@ require (
github.com/xdg-go/stringprep v1.0.3 // indirect
go.opentelemetry.io/collector/semconv v0.62.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
)
49 changes: 24 additions & 25 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/eclipse/paho.mqtt.golang v1.4.1 h1:tUSpviiL5G3P9SZZJPC4ZULZJsxQKXxfENpMvdbAXAI=
github.com/eclipse/paho.mqtt.golang v1.4.1/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA=
github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw=
github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE=
github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
Expand Down Expand Up @@ -294,7 +294,6 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
Expand Down Expand Up @@ -752,11 +751,11 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU=
github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys=
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.62.0 h1:EoidrEk6Dmap+Cw+lXipNL7IVGicS0N6V+oCvesIj/c=
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.62.0/go.mod h1:4BwkK9Fb1xZDxmXt7gSm5nxCxtVWJf61/UaCt54gVjU=
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.62.0 h1:PMUgwDspM+2DX2Ol8Tj/jUBQqzvykVwnFily/HjRDPA=
Expand Down Expand Up @@ -901,7 +900,6 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
Expand Down Expand Up @@ -1160,8 +1158,8 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220725212005-46097bf591d3/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM=
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20220927171203-f486391704dc h1:FxpXZdoBqT8RjqTy6i1E8nXHhW21wK7ptQ/EPIGxzPQ=
golang.org/x/net v0.0.0-20220927171203-f486391704dc/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc=
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -1303,11 +1301,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2 h1:wM1k/lXfpc5HdkJJyW9GELpd8ERGdnh8sMGL6Gzq3Ho=
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -1317,8 +1316,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -1631,19 +1631,18 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.25.2 h1:v6G8RyFcwf0HR5jQGIAYlvtRNrxMJQG1xJzaSeVnIS8=
k8s.io/api v0.25.2/go.mod h1:qP1Rn4sCVFwx/xIhe+we2cwBLTXNcheRyYXwajonhy0=
k8s.io/apimachinery v0.25.2 h1:WbxfAjCx+AeN8Ilp9joWnyJ6xu9OMeS/fsfjK/5zaQs=
k8s.io/apimachinery v0.25.2/go.mod h1:hqqA1X0bsgsxI6dXsJ4HnNTBOmJNxyPp8dw3u2fSHwA=
k8s.io/client-go v0.25.2 h1:SUPp9p5CwM0yXGQrwYurw9LWz+YtMwhWd0GqOsSiefo=
k8s.io/client-go v0.25.2/go.mod h1:i7cNU7N+yGQmJkewcRD2+Vuj4iz7b30kI8OcL3horQ4=
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ=
k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA=
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU=
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4=
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I=
k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg=
k8s.io/apimachinery v0.26.0 h1:1feANjElT7MvPqp0JT6F3Ss6TWDwmcjLypwoPpEf7zg=
k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74=
k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8=
k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg=
k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E=
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs=
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
4 changes: 2 additions & 2 deletions kind/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ appVersion: "1.0.0"

dependencies:
- name: orb
version: "1.0.39"
repository: "@ns1labs-orb"
version: "1.0.40"
repository: ""
4 changes: 2 additions & 2 deletions kind/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ orb:
dsn: "postgres://postgres:orb@kind-orb-postgresql-keto:5432/keto"

maestro:
replicaCount: 1
replicaCount: 2
kafka:
host: kind-orb-kafka.orb.svc.cluster.local
port: 9092
Expand All @@ -120,7 +120,7 @@ orb:
name: "orb-migrate"
pullPolicy: "IfNotPresent"
repository: ns1labs
tag: "0.17.0-11889e3a"
tag: "develop"
autoMigrate: false
logLevel: "debug"

Expand Down
34 changes: 23 additions & 11 deletions maestro/config/config_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ var k8sOtelCollector = `
"containers": [
{
"name": "otel-collector",
"image": "otel/opentelemetry-collector-contrib:0.60.0",
"image": "otel/opentelemetry-collector-contrib:0.68.0",
"ports": [
{
"containerPort": 13133,
Expand Down Expand Up @@ -208,9 +208,6 @@ func ReturnConfigYamlFromSink(_ context.Context, kafkaUrlConfig, sinkId, sinkUrl
},
},
Extensions: &Extensions{
HealthCheckExtConfig: &HealthCheckExtension{
Endpoint: "0.0.0.0:13133",
},
PProf: &PProfExtension{
Endpoint: "0.0.0.0:1888", // Leaving default for now, will need to change with more processes
},
Expand All @@ -228,6 +225,11 @@ func ReturnConfigYamlFromSink(_ context.Context, kafkaUrlConfig, sinkId, sinkUrl
Authenticator string `json:"authenticator" yaml:"authenticator"`
}{Authenticator: "basicauth/exporter"},
},
LoggingExporter: &LoggingExporterConfig{
Verbosity: "detailed",
SamplingInitial: 5,
SamplingThereAfter: 50,
},
},
Service: ServiceConfig{
Extensions: []string{"pprof", "health_check", "basicauth/exporter"},
Expand All @@ -244,7 +246,7 @@ func ReturnConfigYamlFromSink(_ context.Context, kafkaUrlConfig, sinkId, sinkUrl
Exporters []string `json:"exporters" yaml:"exporters"`
}{
Receivers: []string{"kafka"},
Exporters: []string{"prometheusremotewrite"},
Exporters: []string{"prometheusremotewrite", "logging"},
},
},
},
Expand Down Expand Up @@ -291,12 +293,15 @@ type Extensions struct {
}

type HealthCheckExtension struct {
Endpoint string `json:"endpoint" yaml:"endpoint"`
CollectorPipeline *struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Interval string `json:"interval" yaml:"interval"`
FailureThreshold int32 `json:"exporter_failure_threshold" yaml:"exporter_failure_threshold"`
} `json:"check_collector_pipeline,omitempty" yaml:"check_collector_pipeline,omitempty"`
Endpoint string `json:"endpoint" yaml:"endpoint"`
Path string `json:"path" yaml:"path"`
CollectorPipeline *CollectorPipelineExtension `json:"check_collector_pipeline,omitempty" yaml:"check_collector_pipeline,omitempty"`
}

type CollectorPipelineExtension struct {
Enabled string `json:"enabled" yaml:"enabled"`
Interval string `json:"interval" yaml:"interval"`
FailureThreshold int32 `json:"exporter_failure_threshold" yaml:"exporter_failure_threshold"`
}

type PProfExtension struct {
Expand All @@ -316,6 +321,13 @@ type BasicAuthenticationExtension struct {

type Exporters struct {
PrometheusRemoteWrite *PrometheusRemoteWriteExporterConfig `json:"prometheusremotewrite,omitempty" yaml:"prometheusremotewrite,omitempty"`
LoggingExporter *LoggingExporterConfig `json:"logging,omitempty" yaml:"logging,omitempty"`
}

type LoggingExporterConfig struct {
Verbosity string `json:"verbosity,omitempty" yaml:"verbosity,omitempty"`
SamplingInitial int `json:"sampling_initial,omitempty" yaml:"sampling_initial,omitempty"`
SamplingThereAfter int `json:"sampling_thereafter,omitempty" yaml:"sampling_thereafter,omitempty"`
}

type PrometheusRemoteWriteExporterConfig struct {
Expand Down
Loading