> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/upg/3.2/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/upg/3.2/concepts/upgapplication.md).

# UPGApplication CR

The `UPGApplication` Custom Resource (CR) creates an application for Application Detection Function (ADF) in the Core Cluster.

User Plane Gateway (UPG) classifies network traffic destined for specific endpoints by application. This classification matches Packet Detection Information (PDI) with `Application ID`, which SMC specifies in PFCP Session Establishment and Modification Request messages.

To use this function, specify `UPGApplicationSet` objects in the Core Cluster, which define which IPs/URLs match which application.

You can modify the objects at runtime, however this system has some [limitations](#known-limitations).

## Parameters

- **rules** - List of `L7Regexp` and `IPFilter` rules
- **proxy** - Mandatory, boolean. Specifies whether to use the HTTP redirection function. Must be `true` if any `L7Regexp` is defined.

## Example

```yaml
apiVersion: upg-manager.cennso.com/v1alpha1
kind: UPGApplicationSet
metadata:
  labels:
    fpp-manager.cennso.com/plumbing-instance: some-upg1-inst01
    fpp-manager.cennso.com/created-for: upg-operator
  name: upg-test-app
  namespace: default
spec:
  applications:
  - name: some-application-proxy
    proxy: true
    rules:
    - type: L7Regexp
      rule: 'https?://theserver.example.com'
    # - type: IPFilter
    #   rule: 'permit out ip from 198.19.1.1/32'

```

## Known limitations

When working with `UPGApplicationSet` objects, it's important to be aware of certain limitations that govern their behaviour and configuration. Below are the key known limitations to consider:

- When modifying `UPGApplicationSet` objects, only new flows are matched against the new rules. All existing flows are not reclassified unless an external event triggers it. An example of such an event is any Session Modification Request that SMC may send regularly, depending on the configuration.
- The proxy flag cannot be changed. Once `UPGApplicationSet` is created, its proxy flag must remain the same for its entire lifetime.
- Both sides of a flow must match the same application.

## Verification

For ADF debug CLI commands, see the [Check ADF](https://docs.cennso.com/components/upg/3.2/troubleshooting/verification.md#check-adf) section.

## Notes

- `Application ID` in the context of PFCP is a string. In the context of ADF CLI, the PFCP `Application ID` is called just the application name.
