{"id":16931356,"url":"https://github.com/maxgio92/cloudevents-podgateway-client-provisioner","last_synced_at":"2026-04-20T03:36:57.008Z","repository":{"id":65839970,"uuid":"601072062","full_name":"maxgio92/cloudevents-podgateway-client-provisioner","owner":"maxgio92","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-16T16:56:10.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T03:29:43.357Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxgio92.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-13T10:02:36.000Z","updated_at":"2024-02-07T01:48:15.000Z","dependencies_parsed_at":"2023-02-25T19:30:17.190Z","dependency_job_id":null,"html_url":"https://github.com/maxgio92/cloudevents-podgateway-client-provisioner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxgio92/cloudevents-podgateway-client-provisioner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgio92%2Fcloudevents-podgateway-client-provisioner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgio92%2Fcloudevents-podgateway-client-provisioner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgio92%2Fcloudevents-podgateway-client-provisioner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgio92%2Fcloudevents-podgateway-client-provisioner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxgio92","download_url":"https://codeload.github.com/maxgio92/cloudevents-podgateway-client-provisioner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxgio92%2Fcloudevents-podgateway-client-provisioner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267664592,"owners_count":24124347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T20:43:48.387Z","updated_at":"2026-04-20T03:36:51.982Z","avatar_url":"https://github.com/maxgio92.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event-driven pod-gateway client provisioner\n\n\u003e Disclaimer: this is a proof of concept.\n\nThis service provisions pods for which traffic needs to be routed through a `pod-gateway`.\n\nThe provisioning is event-driven using CloudEvents.\n\nThe event must be of type `io.podgateway.client.pending` and its content must specify the fields:\n- `gateway_name` (string)\n\nThe value must reference a valid [pod-gateway](https://github.com/angelnu/pod-gateway/)'s `setGateway` label/annotation value, as configured in its [gateway-admission-controller](https://github.com/angelnu/gateway-admision-controller).\n\n\u003e More on the admission controller configuration [here](https://github.com/angelnu/gateway-admision-controller/blob/main/internal/config/config.go).\n\n```ascii\n                            ┌───────────────────┐\n                            │                   │\n                            │  gtw mutating     │\n                            │  admission        │\n                            └─────┬─┬─┬────┬─┬─┬┘\n                                  │ │ │    │ │ │\n                                ┌─▼─┴─┴──┐ │ │ │   ┌────────────┐\n                                │client  │ │ │ │   │            │\n                           ┌───►│        │ ▼ │ │   │ gateway    │\n┌──────┐                   │    │gtw=foo ├───┴─┴───┤ foo        │\n│      │                   │    │        │ tunnel  │            ├────►\n│events│  ┌────────────┐   │    └───┬─┬──┘   │ │   │            │\n│      │  │            │   │        │ │      │ │   │            │\n│      │  │ provisioner├───┘    ┌───▼─┴──┐   │ │   └────────────┘\n│      ├─►│            │        │client  │   │ │\n│      │  │            ├───────►│        │   ▼ │   ┌────────────┐\n│      │  │            │        │gtw=bar ├─────┴───┤            │\n│      │  │            ├───┐    │        │ tunnel  │ gateway    │\n│      │  │            │   │    └─────┬──┘     │   │ bar        ├────►\n│      │  └────────────┘   │          │        │   │            │\n│      │                   │    ┌─────▼──┐     ▼   │            │\n└──────┘                   │    │client  ├─────────┤            │\n                           └───►│        │ tunnel  └────────────┘\n                                │gtw=bar │\n                                │        │\n                                └────────┘\n```\n\n## Usage\n\n```shell\ncloudevents-podgateway-client-provisioner [--client-namespace=\u003cclient namespace\u003e] [--client-command=\u003ccommand\u003e] [--client-image=\u003cclient container image\u003e]\n```\n\n## Quickstart\n\nAs the only supported event spec is CloudEvents, a quickstart setup can be configured with Knative.\n\nAll of that will run in a local Kubernetes cluster.\n\nDeploy a KinD cluster with Knative Eventing and Service components locally:\n\n```shell\nkn quickstart kind\n```\n\nDeploy pod-gateways (e.g. named `foo` and `bar`):\n\n```shell\n\nhelm upgrade --install -n gateway-system --create-namespace pod-gateway-foo angelnu/pod-gateway -f $deploydir/pod-gateway-foo-values.yaml --version 6.1.0\nhelm upgrade --install -n gateway-system --create-namespace pod-gateway-bar angelnu/pod-gateway -f $deploydir/pod-gateway-bar-values.yaml --version 6.1.0\n```\n\nDeploy a Knative Broker for the CloudEvents:\n\n```shell\nkubectl apply -f deploy/namespace.yaml\nkubectl apply -f deploy/broker.yaml\n```\n\nDeploy the provisioner as a Knative Service:\n\n```shell\nkubectl apply -f deploy/rbac.yaml\nkubectl apply -f deploy/service.yaml\n```\n\n(optional) Deploy a CloudEvents dashboard:\n\n```shell\nkubectl apply -f deploy/cloudevents-player.yaml\n```\n\nand open the browser at http://cloudevents-player.client-system.127.0.0.1.sslip.io.\n\nYou can now send events of Type `io.podgateway.client.pending`, and specify the gateway for the client in a field `gateway_name`.\nThe value must reference an installed pod-gateway.\n\n\u003e Specifically, the value must match the pod-gateway [admission controller](https://github.com/angelnu/gateway-admision-controller)'s `setGatewayLabelValue`/`setGatewayAnnotationValue` flag.\n\nFor example:\n\n- ID: *generated*\n- Type: `io.podgateway.client.pending`\n- Source: `mySource`\n- SpecVersion: 1.0\n- Message:\n  ```json\n  {\n   \"gateway_name\": \"foo\"\n  }\n  ```\n\nThe event will trigger (see [here](deploy/service.yaml)) the provisioner Service that will create the client pod.\n\nFinally, the provisioner will notify the success or failure of that operation, with a `io.podgateway.client.scheduling.done` or `io.podgateway.client.scheduling.failed` event.\n\nOn success, The `io.podgateway.client.scheduling.done` event will contain Data of the client Pod just created, such as:\n- `pod_name`\n- `namespace`\n\nOn failure, The `io.podgateway.client.scheduling.failed` event will contain the related error message.\n\n## Development\n\n### Build\n\n```shell\nmake build\n```\n\n### Publish the OCI image to a local registry\n\n```shell\nmake publish/local\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgio92%2Fcloudevents-podgateway-client-provisioner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxgio92%2Fcloudevents-podgateway-client-provisioner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxgio92%2Fcloudevents-podgateway-client-provisioner/lists"}