|
| 1 | +### Code Ownership Structure |
| 2 | + |
| 3 | +This document outlines the ownership structure for directories within `pkg/` and `cmd/glbc/`. Ownership is categorized into three groups: L7, L4_NEG_PSC, and Shared. The designated owners for each category can be found in the `L7_OWNERS`, `L4_NEG_PSC_OWNERS` and `OWNERS` files respectively. |
| 4 | + |
| 5 | +#### 1. L7 Ownership |
| 6 | + |
| 7 | +These directories contain code exclusive to the L7 Ingress controller. |
| 8 | + |
| 9 | +* **`pkg/apis/backendconfig`**: Defines the `BackendConfig` CRD for L7 features. |
| 10 | +* **`pkg/apis/frontendconfig`**: Defines the `FrontendConfig` CRD for L7 frontend configurations. |
| 11 | +* **`pkg/backendconfig`**: Implements the `BackendConfig` CRD logic. |
| 12 | +* **`pkg/controller`**: Contains the core reconciliation loop for the L7 Ingress controller. |
| 13 | +* **`pkg/frontendconfig`**: Implements the `FrontendConfig` CRD logic. |
| 14 | +* **`pkg/healthchecks`**, **`pkg/healthchecksprovider`**: Manages generic health check resources. |
| 15 | +* **`pkg/loadbalancers`**: Manages L7 load balancer resources (URL maps, proxies). |
| 16 | +* **`pkg/metrics`**: Exposes L7 Prometheus metrics. |
| 17 | +* **`pkg/translator`**: Translates Ingress/Service state into L7 load balancer configurations. |
| 18 | +* **`pkg/utils/healthcheck`**: Used by `pkg/healthchecks` and `pkg/translator`. |
| 19 | + |
| 20 | +#### 2. L4_NEG_PSC Ownership |
| 21 | + |
| 22 | +These directories contain code exclusive to the L4 (Internal Load Balancer), NEG (Network Endpoint Group), and PSC (Private Service Connect) controllers. |
| 23 | + |
| 24 | +* **`pkg/apis/serviceattachment`**: Defines the `ServiceAttachment` CRD for PSC. |
| 25 | +* **`pkg/apis/svcneg`**: Defines APIs for Service NEGs, used by L4/NEG controllers. |
| 26 | +* **`pkg/apis/providerconfig`**: Contains shared API types for cloud provider configuration. |
| 27 | +* **`pkg/healthchecksl4`**: Manages health checks specifically for L4 load balancers. |
| 28 | +* **`pkg/l4lb`**: Contains the core implementation of the L4 ILB controller. |
| 29 | +* **`pkg/neg`**: Home of the NEG controller. |
| 30 | +* **`pkg/multiproject`**: Shared logic for multi-project support. |
| 31 | +* **`pkg/providerconfig`**: Shared cloud provider configuration. |
| 32 | +* **`pkg/network`**: Provides network-related utilities for L4/NEG controllers. |
| 33 | +* **`pkg/psc`**: Implements the Private Service Connect controller. |
| 34 | +* **`pkg/serviceattachment`**: Implements the `ServiceAttachment` CRD logic. |
| 35 | +* **`pkg/svcneg`**: Implements the Service NEG controller for L4 and standalone NEGs. |
| 36 | +* **`pkg/utils/serviceattachment`**: Used by `pkg/psc`. |
| 37 | + |
| 38 | +#### 3. Shared Ownership |
| 39 | + |
| 40 | +These directories contain shared components, utilities, and abstractions used by all controllers. |
| 41 | + |
| 42 | +* **`cmd/glbc`** and **`cmd/glbc/app`**: Main entrypoint for the controller binary. |
| 43 | +* **`pkg/address`**: Manages shared IP address resources. |
| 44 | +* **`pkg/annotations`**: Manages annotations for both Ingress and Service resources. |
| 45 | +* **`pkg/backends`**: Provides common abstractions for managing backend services. |
| 46 | +* **`pkg/backoff`**, **`pkg/ratelimit`**, **`pkg/throttling`**: Shared utilities for managing API calls. |
| 47 | +* **`pkg/common`**: Collections of common data structures and helper functions. |
| 48 | +* **`pkg/composite`**: Shared utilities for handling composite Google Cloud resources. |
| 49 | +* **`pkg/context`**: Manages the shared controller context. |
| 50 | +* **`pkg/crd`**: Shared logic for interacting with CRDs. |
| 51 | +* **`pkg/e2e`**, **`pkg/fuzz`**, **`pkg/test`**: Shared testing infrastructure. |
| 52 | +* **`pkg/events`**, **`pkg/recorders`**: Provides a standardized way to emit Kubernetes events. |
| 53 | +* **`pkg/experimental`**: Contains experimental features not tied to a specific controller. |
| 54 | +* **`pkg/firewalls`**: Manages firewall rules. |
| 55 | +* **`pkg/flags`**: Defines and parses command-line flags. |
| 56 | +* **`pkg/forwardingrules`**: Manages forwarding rules. |
| 57 | +* **`pkg/instancegroups`**: Manages instance groups. |
| 58 | +* **`pkg/klog`**: A shared logging wrapper. |
| 59 | +* **`pkg/nodetopology`**: Shared logic for node topology. |
| 60 | +* **`pkg/storage`**: Shared storage utilities. |
| 61 | +* **`pkg/sync`**: Contains the shared sync loop implementation. |
| 62 | +* **`pkg/systemhealth`**: Shared system health monitoring. |
| 63 | +* **`pkg/validation`**: Shared resource validation logic. |
| 64 | +* **`pkg/version`**: Provides shared controller version information. |
| 65 | +* **`pkg/utils/common`**: Used by both L4 and L7 controllers. |
| 66 | +* **`pkg/utils/descutils`**: Used by `pkg/utils/healthcheck` (L7) and `pkg/utils/serviceattachment` (L4). |
| 67 | +* **`pkg/utils/endpointslices`**: Used by `pkg/neg` (L4) and `pkg/controller/translator` (L7). |
| 68 | +* **`pkg/utils/namer`**: Used by a wide variety of L4 and L7 components. |
| 69 | +* **`pkg/utils/patch`**: Used by `pkg/neg` (L4), `pkg/psc` (L4), and `pkg/l4lb` (L4), and also by the shared `pkg/utils/common`. |
| 70 | +* **`pkg/utils/slice`**: Used by `pkg/psc` (L4), `pkg/loadbalancers` (L7), and `pkg/firewalls` (shared). |
| 71 | +* **`pkg/utils/zonegetter`**: Used by `pkg/neg` (L4), `pkg/l4lb` (L4), and `pkg/controller` (L7). |
| 72 | + |
| 73 | +#### 4. Updating Owners |
| 74 | + |
| 75 | +When an owners file is updated, please refer to this README to help understand which set of owners files need to be updated. |
0 commit comments