这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
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: 1 addition & 2 deletions components/connector-service/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/gorilla/mux v1.7.3
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/prometheus/client_golang v1.12.1
github.com/sirupsen/logrus v1.6.0
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.4.0
github.com/tidwall/gjson v1.9.3
k8s.io/api v0.18.15
Expand All @@ -23,7 +23,6 @@ require (
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.1.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand Down
8 changes: 3 additions & 5 deletions components/connector-service/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
Expand Down Expand Up @@ -201,8 +199,8 @@ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
Expand Down Expand Up @@ -316,14 +314,14 @@ golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (c *Commander) Start() error {
c.logger.Info("Informers are synced successfully")

// configure event type cleaner
eventTypeCleaner := eventtype.NewCleaner(c.envCfg.LegacyEventTypePrefix, applicationLister, c.logger)
eventTypeCleaner := eventtype.NewCleaner(c.envCfg.EventTypePrefix, applicationLister, c.logger)

// start handler which blocks until it receives a shutdown signal
if err := nats.NewHandler(messageReceiver, &messageSenderToNats, c.envCfg.RequestTimeout, legacyTransformer, c.opts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
value: 5s
- name: LEGACY_NAMESPACE
value: kyma
- name: LEGACY_EVENT_TYPE_PREFIX
- name: EVENT_TYPE_PREFIX
value: sap.kyma.custom
image: ko://github.com/kyma-project/kyma/components/event-publisher-proxy/cmd/event-publisher-proxy
imagePullPolicy: IfNotPresent
Expand Down
8 changes: 4 additions & 4 deletions components/event-publisher-proxy/pkg/env/nats_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ type NatsConfig struct {

// Legacy Namespace is used as the event source for legacy events
LegacyNamespace string `envconfig:"LEGACY_NAMESPACE" default:"kyma"`
// LegacyEventTypePrefix is the prefix of each event as per the eventing specification, used for legacy events
// It follows the eventType format: <LegacyEventTypePrefix>.<appName>.<event-name>.<version>
LegacyEventTypePrefix string `envconfig:"LEGACY_EVENT_TYPE_PREFIX" default:"kyma"`
// EventTypePrefix is the prefix of each event as per the eventing specification
// It follows the eventType format: <eventTypePrefix>.<appName>.<event-name>.<version>
EventTypePrefix string `envconfig:"EVENT_TYPE_PREFIX" default:"kyma"`

// JetStream-specific configs
JSStreamName string `envconfig:"JS_STREAM_NAME" default:"kyma"`
Expand All @@ -32,7 +32,7 @@ type NatsConfig struct {
func (c *NatsConfig) ToConfig() *BebConfig {
cfg := &BebConfig{
BEBNamespace: c.LegacyNamespace,
EventTypePrefix: c.LegacyEventTypePrefix,
EventTypePrefix: c.EventTypePrefix,
}
return cfg
}
Expand Down
10 changes: 5 additions & 5 deletions components/event-publisher-proxy/pkg/handler/nats/mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func WithEventTypePrefix(eventTypePrefix string) NatsHandlerMockOpt {
// WithSubscription returns NatsHandlerMockOpt which sets the subscribed.Processor for the given NatsHandlerMock.
func WithSubscription(scheme *runtime.Scheme, subscription *eventingv1alpha1.Subscription) NatsHandlerMockOpt {
return func(m *NatsHandlerMock) {
m.natsConfig.LegacyEventTypePrefix = m.eventTypePrefix
m.natsConfig.EventTypePrefix = m.eventTypePrefix
dynamicTestClient := dynamicfake.NewSimpleDynamicClient(scheme, subscription)
dFilteredSharedInfFactory := dynamicinformer.NewFilteredDynamicSharedInformerFactory(dynamicTestClient, 10*time.Second, v1.NamespaceAll, nil)
genericInf := dFilteredSharedInfFactory.ForResource(subscribed.GVR)
Expand Down Expand Up @@ -191,9 +191,9 @@ func WithJetstream(jsEnabled bool) NatsHandlerMockOpt {

func newNatsConfig(port int) *env.NatsConfig {
return &env.NatsConfig{
Port: port,
LegacyNamespace: testingutils.MessagingNamespace,
LegacyEventTypePrefix: testingutils.MessagingEventTypePrefix,
JSStreamName: testingutils.StreamName,
Port: port,
LegacyNamespace: testingutils.MessagingNamespace,
EventTypePrefix: testingutils.MessagingEventTypePrefix,
JSStreamName: testingutils.StreamName,
}
}
4 changes: 2 additions & 2 deletions components/eventing-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This section explains how to use the Eventing Controller. It expects the followi
| `PUBLISHER_LIMITS_MEMORY` | The memory limits of the Event Publisher Proxy. |
| **For NATS** | |
| `NATS_URL` | The URL for the NATS server. |
| `EVENT_TYPE_PREFIX` | The Event Type Prefix for the NATS backend. |
| `EVENT_TYPE_PREFIX` | The event type prefix for the NATS and BEB backend. |
| `MAX_IDLE_CONNS` | The maximum number of idle connections for the HTTP transport of the NATS backend. |
| `MAX_CONNS_PER_HOST` | The maximum connections per host for the HTTP transport of the NATS backend. |
| `MAX_IDLE_CONNS_PER_HOST` | The maximum idle connections per host for the HTTP transport of the NATS backend. |
Expand Down Expand Up @@ -183,7 +183,7 @@ kubectl port-forward -n kyma-system svc/eventing-nats 4222
|--------------------------|----------------------------------------------------|----------|-----------------------------|
| `KUBECONFIG` | Path to a local kubeconfig file. | yes | ~/.kube/config |
| `NATS_URL` | URL of the NATS server. | no | nats.nats.svc.cluster.local |
| `EVENT_TYPE_PREFIX` | Path to a local kubeconfig file. | yes | sap.kyma.custom |
| `EVENT_TYPE_PREFIX` | The event type prefix for the NATS and BEB backend. | yes | sap.kyma.custom |
| `WEBHOOK_TOKEN_ENDPOINT` | The Kyma public endpoint to provide Access Tokens. | yes | WEBHOOK_TOKEN_ENDPOINT |
| `DOMAIN` | Domain. | yes | example.com |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,17 +308,6 @@ func getNATSEnvVars(natsConfig env.NatsConfig, publisherConfig env.PublisherConf
{Name: "NATS_URL", Value: natsURL},
{Name: "REQUEST_TIMEOUT", Value: publisherConfig.RequestTimeout},
{Name: "LEGACY_NAMESPACE", Value: "kyma"},
{
Name: "LEGACY_EVENT_TYPE_PREFIX",
ValueFrom: &v1.EnvVarSource{
ConfigMapKeyRef: &v1.ConfigMapKeySelector{
LocalObjectReference: v1.LocalObjectReference{
Name: configMapName,
},
Key: configMapKeyEventTypePrefix,
},
},
},
{
Name: "EVENT_TYPE_PREFIX",
ValueFrom: &v1.EnvVarSource{
Expand Down
4 changes: 2 additions & 2 deletions resources/eventing/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ global:
images:
eventing_controller:
name: eventing-controller
version: PR-14209
version: PR-13329
pullPolicy: "IfNotPresent"
publisher_proxy:
name: event-publisher-proxy
version: PR-14268
version: PR-13329
nats:
name: nats
version: 2.8.2-alpine
Expand Down