> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/fpp/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/fpp/latest/concepts/CGWDeployment.md).

# CGWDeployment

The [`CGWDeployment`](https://docs.cennso.com/components/fpp/latest/technical-reference/crds/CGWDeployment.md) Custom Resource (CR) is applied on the Management Cluster and deploys Connectivity Gateway (CGW) instances in the Core Cluster. A CGW is a deployment of a single FPP instance that serves as a network gateway for other FPP and CGW instances.

## Minimal example

```yaml
apiVersion: fpp.cennso.com/v1alpha1
kind: CGWDeployment
metadata:
  name: example-cgw
  namespace: cennso-infra
spec:
  version: <version>
  connectionSecretRef:
    name: example-core-cluster
    namespace: cennso-infra
  operatorName: vpp-operator
```

## Required parameters

To deploy a CGW instance in the Core Cluster, you must specify at least the following parameters:
- **spec.connectionSecretRef** - References the name and namespace of the Secret containing connection details (kubeconfig) for the Core Cluster where the FPP instance will be deployed.
- **spec.operatorRef** or **spec.operatorName** - specifies the VPP Operator deployed in the Core Cluster:
   - **spec.operatorRef** references a `VPPOperator` resource on the Management Cluster to resolve the operator name for the VPP Operator deployed in the Core Cluster.
   - **spec.operatorName** directly specifies the name of the VPP Operator. This name must match the **spec.releaseName** of the target [VPPOperator](https://docs.cennso.com/components/fpp/latest/concepts/VPPOperator.md).

For more information on running multiple operator instances, refer to the [Multiple VPP Operators guide](https://docs.cennso.com/components/fpp/latest/deployment-guides/multiple-vpp-operators.md).

The **spec.targetNamespace** parameter allows you to customize the namespace of the CGW instance in the target cluster. By default, the namespace is `cennso-system`.

## Optional features

> [!IMPORTANT]
> IPsec support and User Plane Function (UPF) load balancing are alpha features and are not suitable for production deployments.

FPP 3.2.0 adds the following optional CGW features:

- **spec.ipsec** - IPsec options. Set **spec.ipsec.metricsEnabled** to `true` to expose the metrics of the `ipsec-exporter` `VPPTool` on port `9536`. For the IPsec setup, refer to the [IPsec guide](https://docs.cennso.com/components/fpp/latest/deployment-guides/ipsec.md).
- **spec.upflbConfig** - Configuration of the UPF load balancer (UPF-LB). A non-empty **spec.upflbConfig.spec** enables UPF-LB in the CGW and creates a [`UPFLBConfig`](https://docs.cennso.com/components/fpp/latest/technical-reference/crds/UPFLBConfig.md) CR in the Core Cluster. For details, refer to the [UPF load balancing guide](https://docs.cennso.com/components/fpp/latest/deployment-guides/upflb.md).
