github.com/argoproj/argo-events@v1.9.1/examples/event-sources/gcp-pubsub.yaml (about)

     1  # ======================================================================================================================
     2  # SEE ALSO
     3  #   - Set up guide:   https://argoproj.github.io/argo-events/setup/gcp-pub-sub/
     4  #   - Specification:  https://github.com/argoproj/argo-events/blob/stable/api/event-source.md#pubsubeventsource
     5  # ----------------------------------------------------------------------------------------------------------------------
     6  
     7  apiVersion: argoproj.io/v1alpha1
     8  kind: EventSource
     9  metadata:
    10    name: gcp-pubsub
    11  spec:
    12    pubSub:
    13      example:
    14        # (optional) jsonBody specifies that all event body payload coming from this
    15        # source will be JSON
    16        jsonBody: true
    17        # (optional) GCP project ID for the subscription.
    18        # Required if you run Argo Events outside of GKE/GCE.
    19        # (otherwise, the default value is its project)
    20        projectID: argo-events-XXXXX
    21        # (optional) GCP project ID for the topic.
    22        # By default, it is same as ProjectID.
    23        # topicProjectID: "project-id"
    24        # (optional) Topic to which the subscription should belongs.
    25        # Required if you want the eventsource to create a new subscription.
    26        # If you specify this field along with an existing subscription,
    27        # it will be verified whether it actually belongs to the specified topic.
    28        topic: test
    29        # (optional) ID of subscription.
    30        # Required if you use existing subscription.
    31        # The default value will be auto generated hash based on this eventsource setting, so the subscription
    32        # might be recreated every time you update the setting, which has a possibility of event loss.
    33        subscriptionID: test-sub
    34        # (optional) Refers to a k8s secret which contains the credential JSON to access pubsub.
    35        # If it is missing, it implicitly uses Workload Identity.
    36        credentialSecret:
    37          name: my-secret
    38          key: secret-key
    39        # Deprecated, legacy approach
    40        # credentialsFile: ""
    41  
    42  # ----------------------------------------------------------------------------------------------------------------------
    43  # followings are example for using Workload Identity
    44  
    45  #   template:
    46  #     serviceAccountName: my-sa
    47  #     # (optional) you can add a PUBSUB_EMULATOR_HOST environment variable to the EventSource pod to connect
    48  #     # to a PubSub emulator (no credentials needed)
    49  #     container:
    50  #       env:
    51  #         - name: PUBSUB_EMULATOR_HOST
    52  #           value: pubsub-emulator:9030
    53  #   pubSub:
    54  #     example-workload-identity:
    55  #       # (optional) jsonBody specifies that all event body payload coming from this
    56  #       # source will be JSON
    57  #       jsonBody: true
    58  #       # (optional on GCP) GCP project ID for the subscription.
    59  #       # If you run Argo Events on GCP, the default value is its project (otherwise, it is required)
    60  #       projectID: argo-events-XXXXX
    61  #       # (optional) GCP project ID for the topic, same as projectID by default
    62  #       # topicProjectID: "project-id"
    63  #       # (optional) Topic on which a subscription will be created. Optional if you use existing subscription
    64  #       # (if you specified in such case, it will be verified whether it matches against the actual one)
    65  #       topic: test
    66  #       # (optional) ID of subscription.
    67  #       # If the subscription does not exist, it will be newly created.
    68  #       # The default value will be auto generated based on this eventsource setting, so the subscription
    69  #       # might be recreated every time you update the setting, which has a possibility of event loss.
    70  #       subscriptionID: test-sub
    71  #       # (optional) Refers to a k8s secret which contains the credential JSON to access pubsub.
    72  #       # If it is missing, it implicitly uses Workload Identity.