github.com/argoproj/argo-events@v1.9.1/docs/eventsources/gcp-pubsub.md (about) 1 # GCP PubSub 2 3 ## Topic And Subscription ID 4 5 GCP PubSub event source can listen to a PubSub with given `topic`, or 6 `subscriptionID`. Here is the logic with different `topic` and `subscriptionID` 7 combination. 8 9 | Topic Provided/Existing | Sub ID Provided/Existing | Actions | 10 | ----------------------- | ------------------------ | --------------------------------------------------------------------- | 11 | Yes/Yes | Yes/Yes | Validate if given topic matches subscription's topic | 12 | Yes/Yes | Yes/No | Create a subscription with given ID | 13 | Yes/Yes | No/- | Create or re-use subscription with auto generated subID | 14 | Yes/No | Yes/No | Create a topic and a subscription with given subID | 15 | Yes/No | Yes/Yes | Invalid | 16 | Yes/No | No/- | Create a topic, create or re-use subscription w/ auto generated subID | 17 | No/- | Yes/Yes | OK | 18 | No/- | Yes/No | Invalid | 19 20 ## Workload Identity 21 22 If you have configured 23 [Workload Identity](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity) 24 and want to use it for a PubSub EventSource, leave `credentialSecret` nil. 25 26 Full spec is available [here](https://github.com/argoproj/argo-events/tree/stable/api/event-source.md#pubsubeventsource). 27 28 See a PubSub EventSource 29 [example](https://github.com/argoproj/argo-events/tree/stable/examples/event-sources/gcp-pubsub.yaml). 30 31 ## Running With PubSub Emulator 32 33 You can point this event source at the 34 [PubSub Emulator](https://cloud.google.com/pubsub/docs/emulator) by 35 configuring the `PUBSUB_EMULATOR_HOST` environment variable for the event 36 source pod. This can be configured on the `EventSource` resource under the 37 `spec.template.container.env` key. This option is also documented in the 38 PubSub EventSource 39 [example](https://github.com/argoproj/argo-events/tree/stable/examples/event-sources/gcp-pubsub.yaml).