vmware-archive / eventrouter

A simple introspective kubernetes service that forwards events to a specified sink.
Apache License 2.0
886 stars 252 forks source link

Example Config for S3 sink #123

Open tanujd11 opened 3 years ago

tanujd11 commented 3 years ago

Hey, I was looking at this project looks cool. Can I get an example of config.json for S3 as it will be very helpful. Thanks

alok87 commented 3 years ago
apiVersion: v1
data:
  config.json: |-
    {
        "sink": "s3sink",
        "s3SinkAccessKeyID": "sample",
        "s3SinkSecretAccessKey": "sample",
        "s3SinkRegion": "ap-south-1",
        "s3SinkBucket": "bucket",
        "s3SinkBucketDir": "events",
        "s3SinkBufferSize": 1500,
        "s3SinkDiscardMessages": true,
        "s3SinkOutputFormat": "flatjson",
        "s3SinkUploadInterval": 120
    }
kind: ConfigMap
metadata:
  name: eventrouter-cm
  namespace: kube-system

I am using this.

tanujd11 commented 3 years ago

@alok87 do this support authorization using instance profile or service account?

alok87 commented 3 years ago

Talking to s3: Based on this https://github.com/heptiolabs/eventrouter/blob/master/sinks/s3sink.go#L60 it requires AWS ACCESS credential to be passed into the pod (as specified above using config maps)

From what looks like it won't work by assuming node roles. Please try out and tell.