Skip to content

Commit

Permalink
Merge branch 'master' into opent
Browse files Browse the repository at this point in the history
Signed-off-by: Jaydipkumar Arvindbhai Gabani <[email protected]>
  • Loading branch information
JaydipGabani authored Oct 26, 2023
2 parents 373c1e7 + 3a83700 commit 418eac3
Show file tree
Hide file tree
Showing 6 changed files with 334 additions and 303 deletions.
2 changes: 2 additions & 0 deletions cmd/build/helmify/static/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ controllerManager:
# cidr: 0.0.0.0/0
audit:
enablePubsub: false
connection: audit-connection
channel: audit-channel
hostNetwork: false
dnsPolicy: ClusterFirst
metricsPort: 8888
Expand Down
2 changes: 2 additions & 0 deletions manifest_staging/charts/gatekeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ controllerManager:
# cidr: 0.0.0.0/0
audit:
enablePubsub: false
connection: audit-connection
channel: audit-channel
hostNetwork: false
dnsPolicy: ClusterFirst
metricsPort: 8888
Expand Down
18 changes: 11 additions & 7 deletions test/pubsub/fake-subscriber/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"log"
"os"
"strconv"

"github.com/dapr/go-sdk/service/common"
Expand All @@ -30,15 +31,18 @@ type PubsubMsg struct {
ResourceLabels map[string]string `json:"resourceLabels,omitempty"`
}

var sub = &common.Subscription{
PubsubName: "pubsub",
Topic: "audit",
Route: "/checkout",
}

func main() {
auditChannel := os.Getenv("AUDIT_CHANNEL")
if auditChannel == "" {
auditChannel = "audit-channel"
}
sub := &common.Subscription{
PubsubName: "pubsub",
Topic: auditChannel,
Route: "/checkout",
}
s := daprd.NewService(":6002")
log.Printf("Listening...")
log.Printf("Listening on %s...", auditChannel)
if err := s.AddTopicEventHandler(sub, eventHandler); err != nil {
log.Fatalf("error adding topic subscription: %v", err)
}
Expand Down
3 changes: 3 additions & 0 deletions test/pubsub/fake-subscriber/manifest/subscriber.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ spec:
- name: go-sub
image: fake-subscriber:latest
imagePullPolicy: Never
env:
- name: AUDIT_CHANNEL
value: "audit-channel"
Loading

0 comments on commit 418eac3

Please sign in to comment.