github.com/argoproj/argo-events@v1.9.1/docs/eventsources/setup/minio.md (about) 1 # Minio 2 3 Minio event-source listens to minio bucket notifications and helps sensor trigger the workloads. 4 5 **_Note_**: Minio event-source is exclusive for the Minio server. If you want to trigger workloads on AWS S3 bucket notification, 6 please set up the AWS SNS event-source. 7 8 ## Event Structure 9 10 The structure of an event dispatched by the event-source over the eventbus looks like following, 11 12 { 13 "context": { 14 "type": "type_of_event_source", 15 "specversion": "cloud_events_version", 16 "source": "name_of_the_event_source", 17 "id": "unique_event_id", 18 "time": "event_time", 19 "datacontenttype": "type_of_data", 20 "subject": "name_of_the_configuration_within_event_source" 21 }, 22 "data": { 23 notification: [ 24 { 25 /* Minio notification. More info is available at https://docs.min.io/docs/minio-bucket-notification-guide.html 26 } 27 ] 28 } 29 } 30 31 ## Setup 32 33 1. Make sure to have the minio server deployed and reachable from the event-source. 34 35 1. If you are running Minio locally, make sure to `port-forward` to minio pod in order to make the service available outside local K8s cluster. 36 37 kubectl -n argo-events port-forward <minio-pod-name> 9000:9000 38 39 1. Configure the minio client `mc`. 40 41 mc config host add minio http://localhost:9000 minio minio123 42 43 1. Create a K8s secret that holds the access and secret key. This secret will be referred in the minio event source definition that we are going to install in a later step. 44 45 apiVersion: v1 46 data: 47 # base64 of minio 48 accesskey: bWluaW8= 49 # base64 of minio123 50 secretkey: bWluaW8xMjM= 51 kind: Secret 52 metadata: 53 name: artifacts-minio 54 namespace: argo-events 55 56 1. The event source we are going to use configures notifications for a bucket called `input`. 57 58 mc mb minio/input 59 60 1. Let's install event source in the `argo-events` namespace. 61 62 kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/event-sources/minio.yaml 63 64 1. Let's create the sensor. 65 66 kubectl apply -n argo-events -f https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/sensors/minio.yaml 67 68 1. Create a file named and `hello-world.txt` and upload it onto to the `input` bucket. This will trigger the argo workflow. 69 70 1. Run `argo list` to find the workflow. 71 72 ## Troubleshoot 73 74 Please read the [FAQ](https://argoproj.github.io/argo-events/FAQ/).