{"id":13846228,"url":"https://github.com/poidag-zz/vpc-peering-operator","last_synced_at":"2025-10-23T02:37:11.860Z","repository":{"id":217815017,"uuid":"148364469","full_name":"poidag-zz/vpc-peering-operator","owner":"poidag-zz","description":"A Kubernetes Operator to manage the lifecycle of AWS VPC Peering Connections","archived":false,"fork":false,"pushed_at":"2018-10-17T09:40:58.000Z","size":5105,"stargazers_count":23,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-25T12:01:16.950Z","etag":null,"topics":["amazon","aws","controller","ec2","k8s","kubernetes","operator","peering","routing","virtual-private-cloud","vpc","vpc-peering"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poidag-zz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-09-11T18:50:50.000Z","updated_at":"2020-09-10T08:06:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"b5c54d0b-66ba-480e-988a-6111fb2547bd","html_url":"https://github.com/poidag-zz/vpc-peering-operator","commit_stats":null,"previous_names":["poidag-zz/vpc-peering-operator","pickledrick/vpc-peering-operator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poidag-zz%2Fvpc-peering-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poidag-zz%2Fvpc-peering-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poidag-zz%2Fvpc-peering-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poidag-zz%2Fvpc-peering-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poidag-zz","download_url":"https://codeload.github.com/poidag-zz/vpc-peering-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225807224,"owners_count":17527212,"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":["amazon","aws","controller","ec2","k8s","kubernetes","operator","peering","routing","virtual-private-cloud","vpc","vpc-peering"],"created_at":"2024-08-04T18:00:20.336Z","updated_at":"2025-10-23T02:37:11.795Z","avatar_url":"https://github.com/poidag-zz.png","language":"Go","funding_links":[],"categories":["Operators vs Controllers"],"sub_categories":["Networking"],"readme":"# VPC Peering Operator\n\n[![Build Status](https://travis-ci.org/pickledrick/vpc-peering-operator.svg?branch=master)](https://travis-ci.org/pickledrick/vpc-peering-operator)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pickledrick/vpc-peering-operator)](https://goreportcard.com/report/github.com/pickledrick/vpc-peering-operator)\n\n\u003e Manage VPC Peerings in Kubernetes\n\nThe VPC Peering operator for Kubernetes provides a way to natively define a vpc peering as a Kubernetes object and handles the lifecycle around the Peering and Routing for a VPC.\n\nThe premise of this operator is to serve as a self service tool to allow users running in a multi tenant cluster to manage peerings to other AWS VPC's for consumption of their resources.\n\n## CustomResourceDefinitions\n\nThe Operator acts on the following [custom resource definitions (CRDs)](https://kubernetes.io/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions/):\n\n- **`VpcPeering`**, which defines a desired VPC Peering.\n  The Operator Creates a VPC Peering request upon creation of a VpcPeering CRD. A configurable wait timeout is defined to wait for an accept from the peered account, when the peering becomes active the source VPCs route tables can then be managed automatically.\n\n| Parameter                 | Description                                   | Default |\n| ------------------------- | --------------------------------------------- | ------- |\n| `Spec.PeerOwnerId`        | The account ID owning the VPC to be peered to | `nil`   |\n| `Spec.PeerVpcId`          | The VPC ID of the VPC to peer to              | `nil`   |\n| `Spec.PeerCIDR`           | The CIDR of the VPC to peer to                | `nil`   |\n| `Spec.PeerRegion`         | The region the peer vpc exists within         | `nil`   |\n| `Spec.AllowDNSResolution` | The region the peer vpc exists within         | `true`  |\n| `Spec.SourceVpcId`        | The VPC ID the operator is running within     | `nil`   |\n| `Status.PeeringId`        | The Peering connection ID once created        | `nil`   |\n\nAn example is shown in `example/cr.yaml`\n\n## Installation\n\nThe Nodes running the Operator require an IAM Instance profile to be associated with the following policy\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"VisualEditor0\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"ec2:CreateRoute\",\n        \"ec2:DeleteVpcPeeringConnection\",\n        \"ec2:DeleteRoute\",\n        \"ec2:CreateVpcPeeringConnection\"\n      ],\n      \"Resource\": [\n        \"arn:aws:ec2:*:*:vpc-peering-connection/*\",\n        \"arn:aws:ec2:*:*:route-table/*\",\n        \"arn:aws:ec2:*:*:vpc/*\"\n      ]\n    },\n    {\n      \"Sid\": \"VisualEditor1\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"ec2:DescribeVpcPeeringConnections\",\n        \"ec2:DescribeRouteTables\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\nInstall the Operator inside a cluster by running the following command:\n\n```sh\nkubectl apply -f deploy/\n```\n\n\u003e Note: make sure to adapt the namespace in the ClusterRoleBinding if deploying in another namespace than the default namespace.\n\nCreate an instance of a VPC Peering CRD\n\n\u003e Note: make sure to adapt the values of the CR defined in `example/cr.yaml`.\n\n```sh\nkubectl apply -f example/cr.yaml\n```\n\n## Removal\n\nTo remove the operator, first delete any custom resources you created in each namespace (please note this will remove routes in routetables associated with the VPC and delete peering connections).\n\n```sh\nfor n in $(kubectl get namespaces -o jsonpath={..metadata.name}); do\n  kubectl delete --all --namespace=$n vpcpeering\ndone\n```\n\nAfter a couple of minutes you can go ahead and remove the operator itself.\n\n```sh\nkubectl delete -f bundle.yaml\n```\n\n## Configuration\n\nConfiguration is built through environment variables currently defined in `deploy/operator.yaml`\nBelow are the available configuration options\n\n| Environment Variable   | Description                                                      | Default                |\n| ---------------------- | ---------------------------------------------------------------- | ---------------------- |\n| `MANAGE_ROUTES`        | Maintain routes in VPC route tables for the peering              | `true`                 |\n| `OPERATOR_NAME`        | The name of the operator                                         | `vpc-peering-operator` |\n| `WATCH_ALL_NAMESPACES` | Override the SDK and listen to events in all namespaces          | `false`                |\n| `POLLER_RETRIES`       | The amount of retries for waiting for a peering to become active | `5`                    |\n| `POLLER_WAIT_SECONDS`  | The number of seconds to wait between retries                    | `60`                   |\n| `WATCH_NAMESPACE`      | The namespace to watch for CRD events                            | `metadata.namespace`   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoidag-zz%2Fvpc-peering-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoidag-zz%2Fvpc-peering-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoidag-zz%2Fvpc-peering-operator/lists"}