这是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
31 changes: 16 additions & 15 deletions components/application-connectivity-certs-setup-job/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,43 @@ require (
github.com/sirupsen/logrus v1.6.0
github.com/stretchr/testify v1.7.0
k8s.io/api v0.22.0
k8s.io/apimachinery v0.22.0
k8s.io/apimachinery v0.24.0
k8s.io/client-go v0.22.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.2.0 // indirect
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.26.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/klog/v2 v2.9.0 // indirect
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect
k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

Expand Down
61 changes: 48 additions & 13 deletions components/application-connectivity-certs-setup-job/go.sum

Large diffs are not rendered by default.

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