{"id":13754898,"url":"https://github.com/brigadecore/brigade-k8s-gateway","last_synced_at":"2025-05-10T00:31:15.437Z","repository":{"id":29431682,"uuid":"114038895","full_name":"brigadecore/brigade-k8s-gateway","owner":"brigadecore","description":"Kubernetes event gateway for Brigade v1","archived":true,"fork":false,"pushed_at":"2022-06-01T13:24:49.000Z","size":7822,"stargazers_count":27,"open_issues_count":0,"forks_count":7,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-06-17T05:30:58.861Z","etag":null,"topics":["brigade","brigade-gateway","kubernetes","v1"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brigadecore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-12T21:03:12.000Z","updated_at":"2023-01-28T00:19:26.000Z","dependencies_parsed_at":"2022-08-29T00:01:01.045Z","dependency_job_id":null,"html_url":"https://github.com/brigadecore/brigade-k8s-gateway","commit_stats":null,"previous_names":["azure/brigade-k8s-gateway"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brigadecore%2Fbrigade-k8s-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brigadecore%2Fbrigade-k8s-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brigadecore%2Fbrigade-k8s-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brigadecore%2Fbrigade-k8s-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brigadecore","download_url":"https://codeload.github.com/brigadecore/brigade-k8s-gateway/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253346392,"owners_count":21894263,"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","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":["brigade","brigade-gateway","kubernetes","v1"],"created_at":"2024-08-03T10:00:36.169Z","updated_at":"2025-05-10T00:31:15.139Z","avatar_url":"https://github.com/brigadecore.png","language":"Go","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\u003e ⚠️\u0026nbsp;\u0026nbsp;This repo contains the source for a component of the Brigade\n\u003e v1.x ecosystem. Brigade v1.x reached end-of-life on June 1, 2022 and as a\n\u003e result, this component is no longer maintained.\n\n# Brigade Kubernetes Gateway\n\n**Experimental:** This should not be used in production. Misconfiguration can\nconsume massive amounts of cluster resources.\n\nThis is a Brigade gateway that listens to the Kubernetes event stream and triggers\nevents inside of Brigade.\n\nIssues for Brigade projects are all tracked [on the main Brigade project](https://github.com/brigadecore/brigade/issues).\n\n## Installation\n\nThe [Brigade K8s Gateway Helm Chart][brigade-k8s-gateway-chart] is hosted at the\n[brigadecore/charts][charts] repository.\n\nTo install the latest image into your cluster:\n\n```\n$ helm repo add brigade https://brigadecore.github.io/charts\n$ helm inspect values brigade/brigade-k8s-gateway \u003e myvalues.yaml\n# edit myvalues.yaml\n$ helm install -f myvalues brigade/brigade-k8s-gateway\n```\n\n### Building from Source\n\nYou must have the Go toolchain, make, and dep installed. For Docker support, you\nwill need to have Docker installed as well. From there:\n\n```\n$ make build\n```\n\nTo build a Docker image, you can `make docker-build`.\n\n## Configuring\n\nConfiguring the gateway is tricky: You don't want to cause a build to trigger\nanother build. In your Helm `values.yaml` file you will want to configure your\nfilters appropriately.\n\nHere is an example that listens to Pod events that occur in the namespace\n`pequod`.\n\n```yaml\nfilters:\n  # Ignore all events coming from kube-system\n  - namespace: kube-system\n    action: reject\n  # Ignore events on Nodes. We just care about Pods\n  - kind: Node\n    action: reject\n  # Ignore \"Killing\" messages for Pods\n  - kind: Pod\n    reasons:\n      - Killing\n    action: reject\n  # ONLY Listen to events for Pods in this namespace\n  - kind: Pod\n    namespace: pequod\n    action: accept\n  # Reject anything else (don't DOS yourself)\n  - action: reject\n```\n\nFor example, the following kinds (and more) produce events\n\n- Node\n- Pod\n- CronJob\n- Job\n- Deployment\n- ReplicaSet\n\nThe list of reasons is unconstrained (the value is a string in the Kubernetes\nAPI). But here are a few examples\n\n\n- Node `Starting`: A node is starting up\n- Pod `Killing`: Triggered when a pod has been terminated\n- ReplicaSet `SuccessfulCreate`: Triggered when a ReplicaSet has been created\n\nTo make it easier to see what the gateway sees, we log the events. You can use\n`kubectl logs $GATEWAY_POD_NAME` to see the data. HEre's an example log entry\nfor a `Pod`'s `Pulled` event:\n\n```\nProcessing default/wp-wordpress-69cfcc7544-nmsj5.1510e390827104e3: {\n  \"metadata\": {\n    \"name\": \"wp-wordpress-69cfcc7544-nmsj5.1510e390827104e3\",\n    \"namespace\": \"default\",\n    \"selfLink\": \"/api/v1/namespaces/default/events/wp-wordpress-69cfcc7544-nmsj5.1510e390827104e3\",\n    \"uid\": \"c2e459a8-0b9d-11e8-850f-080027ff61a5\",\n    \"resourceVersion\": \"95112\",\n    \"creationTimestamp\": \"2018-02-07T00:28:04Z\"\n  },\n  \"involvedObject\": {\n    \"kind\": \"Pod\",\n    \"namespace\": \"default\",\n    \"name\": \"wp-wordpress-69cfcc7544-nmsj5\",\n    \"uid\": \"ac2aa534-0b9d-11e8-850f-080027ff61a5\",\n    \"apiVersion\": \"v1\",\n    \"resourceVersion\": \"95051\",\n    \"fieldPath\": \"spec.containers{wp-wordpress}\"\n  },\n  \"reason\": \"Pulled\",\n  \"message\": \"Container image \\\"bitnami/wordpress:4.9.1-r0\\\" already present on machine\",\n  \"source\": {\n    \"component\": \"kubelet\",\n    \"host\": \"minikube\"\n  },\n  \"firstTimestamp\": \"2018-02-07T00:28:04Z\",\n  \"lastTimestamp\": \"2018-02-07T00:28:04Z\",\n  \"count\": 1,\n  \"type\": \"Normal\"\n}\n```\n\n### RBAC\n\nIf you are running with RBAC, you will need to write roles and role bindings for\nthe namespaces you want this service to attach to. The chart includes a role/role\nbinding for the `default` namespace. You may use this as a template.\n\n\n# Contributing\n\nThis Brigade project accepts contributions via GitHub pull requests. This document outlines the process to help get your contribution accepted.\n\n## Signed commits\n\nA DCO sign-off is required for contributions to repos in the brigadecore org.  See the documentation in\n[Brigade's Contributing guide](https://github.com/brigadecore/brigade/blob/master/CONTRIBUTING.md#signed-commits)\nfor how this is done.\n\n[charts]: https://github.com/brigadecore/charts\n[brigade-k8s-gateway-chart]: https://github.com/brigadecore/charts/tree/master/charts/brigade-k8s-gateway","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrigadecore%2Fbrigade-k8s-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrigadecore%2Fbrigade-k8s-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrigadecore%2Fbrigade-k8s-gateway/lists"}