Skip to content

feat: add GCP Cloud Functions trigger with native auth#3923

Open
walsm232 wants to merge 6 commits into
argoproj:masterfrom
walsm232:feat/gcp-cloud-functions-trigger
Open

feat: add GCP Cloud Functions trigger with native auth#3923
walsm232 wants to merge 6 commits into
argoproj:masterfrom
walsm232:feat/gcp-cloud-functions-trigger

Conversation

@walsm232
Copy link
Copy Markdown

@walsm232 walsm232 commented Feb 16, 2026

Overview

Add a dedicated trigger type for invoking GCP Cloud Run Functions with built-in support for GCP authentication via Workload Identity and explicit service account JSON keys.

Unlike the generic HTTP trigger, this trigger uses Google's idtoken library to acquire and inject GCP ID tokens into requests, enabling authenticated invocations without any additional token management.

Checklist:

Testing

  • Deployed a Cloud Run function on GCP and configured a GCP service account key as a Kubernetes secret, then triggered it end-to-end from a sensor using both the credentialSecret and Workload Identity auth modes.
{"level":"info","ts":"2026-02-16T22:08:07.295869754Z","logger":"argo-events.sensor","caller":"gcp-cloud-functions/gcp_cloud_functions.go:169","msg":"invoking GCP Cloud Function...","sensorName":"gcp-function-sa-key","triggerName":"invoke-function","triggerType":"GCPCloudFunctions","url":"https://argo-events-testing-<MASKED_ID>.europe-west1.run.app"}
{"level":"info","ts":"2026-02-16T22:08:08.277221172Z","logger":"argo-events.sensor","caller":"sensors/listener.go:449","msg":"Successfully processed trigger 'invoke-function'","sensorName":"gcp-function-sa-key","triggerName":"invoke-function","triggerType":"GCPCloudFunctions","triggeredBy":["test-dep"],"triggeredByEvents":["ce3a3aa35231481091bf1084123611c6"]}

Cloud Function is just configured with:

const functions = require('@google-cloud/functions-framework');

functions.http('helloHttp', (req, res) => {
  console.log('Received request:', JSON.stringify(req.body));
  res.status(200).json({
    status: 'ok',
    received: req.body
  });
});

and logs:

POST 200 197B 46ms Go-http-client/2.0 https://argo-events-testing-<MASKED_ID>.europe-west1.run.app/
Received request: {"message":"hello"}

Notes

  • The credentialSecret field name and semantics follow the existing GCP PubSub event source convention
  • First contribution to argo-events, happy to adjust anything to match project preferences. Let me know if I'm missing anything!

walsm232 and others added 6 commits February 16, 2026 23:48
Add a dedicated trigger type for invoking GCP Cloud Functions (Cloud Run functions) with built-in support for GCP authentication via Workload Identity and explicit service account JSON keys.

Unlike the generic HTTP trigger, this trigger uses Google's idtoken library to acquire and inject GCP ID tokens into every requst, enablin authenticated invocations without any additional token management.

Signed-off-by: Michael Walsh <walshmichael310@gmail.com>
…#3915)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Michael Walsh <walshmichael310@gmail.com>
…1.34.0 (argoproj#3918)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Michael Walsh <walshmichael310@gmail.com>
…roj#3919)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Michael Walsh <walshmichael310@gmail.com>
…3917)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Michael Walsh <walshmichael310@gmail.com>
Signed-off-by: Michael Walsh <walshmichael310@gmail.com>
@walsm232 walsm232 force-pushed the feat/gcp-cloud-functions-trigger branch from 2bb00a0 to a2891f3 Compare February 16, 2026 22:48
@walsm232 walsm232 marked this pull request as ready for review February 16, 2026 23:09
@walsm232 walsm232 requested a review from whynowy as a code owner February 16, 2026 23:09
@whynowy whynowy requested a review from eduardodbr April 3, 2026 06:31
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

This Pull Request is stale because it has been open for 60 days with
no activity. It will be closed in 7 days if no further activity.

@github-actions github-actions Bot added the stale label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant