F5DiameterProtocolProfile¶
Overview¶
The F5DiameterProtocolProfile Custom Resource (CR) defines how specific Diameter messages are processed and how Diameter Attribute-Value Pairs (AVPs) are mapped to subscriber session attributes. It also supports adding AVPs into Diameter messages (based on message type and direction), setting AVP flags, and providing default values when an AVP is not present in a message.
This CR can be referenced by other Diameter resources (for example, a F5DiameterEndpoint) through a profile name.
Parameters¶
metadata¶
| Parameter | Description |
|---|---|
name |
The unique name identifying the resource (Kubernetes object name). |
namespace |
The Kubernetes namespace in which the resource is created. |
spec¶
The CR spec parameters used for configuring the Diameter protocol profile are:
| Parameter | Description | Default |
|---|---|---|
diameterAvp |
Specifies the name of the Diameter AVP. Pattern: ^[0-9a-zA-Z._-]+$, length 1-255. |
None |
subscriberIdType |
Specifies the type of subscriber ID used in the Diameter protocol profile. Valid values: nai, imsi, e164, private. |
e164 |
typeAvp |
Specifies the AVP in the message that should be matched to determine subscriber ID type. Pattern: ^[0-9a-zA-Z._-]+$, length 1-255. |
None |
diameterMessages |
Specifies the list of Diameter messages that will be processed for this profile. Max items: 8. Each entry selects a message type/direction and can define an AVP mapping list. |
[] |
diameterMessages.name |
A unique name for this message mapping entry. Pattern: ^[0-9a-zA-Z._-]+$, length 1-255. |
Required |
diameterMessages.messageType |
The Diameter message type. Valid values: ccr-i, cca-i, ccr-u, cca-u, ccr-t, rar, raa. |
Required |
diameterMessages.direction |
Direction in which the message should be processed. Valid values: in, out, any. Additional constraints apply based on messageType. |
any |
diameterMessages.avpList |
List of Diameter AVP mappings and insertion rules for this message entry. Min items: 1 (if present). Max items: 32. |
(optional) |
diameterMessages.avpList.avpName |
Specifies the name of the application service to which the AVP belongs. Pattern: ^[0-9a-zA-Z._-]+$, length 1-255. |
Required |
diameterMessages.avpList.diameterAvp |
Specifies the Diameter AVP to be processed/inserted. Pattern: ^[0-9a-zA-Z._-]+$, length 1-255. |
Required |
diameterMessages.avpList.subscriberAttribute |
Specifies the subscriber session attribute name to map to this AVP. Pattern: ^[0-9a-zA-Z._-]*$, length 1-255. |
Required |
diameterMessages.avpList.default |
Default value for the Diameter AVP if it is not present in the Diameter message. Pattern: ^[0-9a-zA-Z._-]+$, length 1-255. |
Required |
diameterMessages.avpList.protectedFlag |
Protected flag value to set when inserting the AVP. Applies to outgoing messages. Valid values: true, false. |
true |
diameterMessages.avpList.mandatoryFlag |
Mandatory flag value to set when inserting the AVP. Applies to outgoing messages. Valid values: true, false. |
true |
diameterMessages.avpList.vendorSpecificFlag |
Vendor-specific flag value to set when inserting the AVP. Applies to outgoing messages. Valid values: true, false. |
false |
diameterMessages.avpList.parentLabel |
String used to distinguish between different instances/types of grouped AVPs that share the same parent AVP code but serve different logical roles. Pattern: ^[0-9a-zA-Z._-]*$, length 0-255. |
"" |
diameterMessages.avpList.includeInterimMessage |
Whether to include this AVP in interim-message updates (CCR-U only) generated when session parameters change. Applies to outgoing messages. Valid values: true, false. |
false |
diameterMessages.avpList.includeReportingMessage |
Whether to include this AVP in reporting-message updates (CCR-U only) generated for reporting usage information. Applies to outgoing messages. Valid values: true, false. |
false |
The value must match the pattern ^[0-9a-zA-Z._-]*$, meaning it can only contain alphanumeric characters (0-9, a-z, A-Z), periods (.), underscores (_), and hyphens (-).
Sample CR¶
apiVersion: k8s.f5net.com/v1
kind: F5DiameterProtocolProfile
metadata:
name: gx-protocol-profile
namespace: f5-bnk
spec:
subscriberIdType: e164
diameterMessages:
- name: gx-ccr-i-out
messageType: ccr-i
direction: out
avpList:
- avpName: gx
diameterAvp: session-id-avp
subscriberAttribute: sessionId
default: default-session-id
protectedFlag: "true"
mandatoryFlag: "true"
vendorSpecificFlag: "false"
parentLabel: ""
includeInterimMessage: "false"
includeReportingMessage: "false"
- name: gx-ccr-u-out
messageType: ccr-u
direction: out
avpList:
- avpName: gx
diameterAvp: subscription-id-avp
subscriberAttribute: subscriberId
default: default-subscriber-id
includeInterimMessage: "true"
includeReportingMessage: "true"
Create and apply F5DiameterProtocolProfile CR¶
Copy the sample CR into a YAML
<diameter-protocol-profile.yaml>file.Apply the F5DiameterProtocolProfile CR:
kubectl create -f diameter-protocol-profile.yaml
Verify the resource:
kubectl get -f diameter-protocol-profile.yaml -n <namespace>
(Optional) View details:
kubectl describe -f diameter-protocol-profile.yaml -n <namespace>