Network Function Registration Properties

NRF Configuration Properties describes the properties for configuring SBA Gateway network function registration with a Network Repository Function (NRF).

Table 1. NRF Configuration Properties
Property Description
nrf.registerWithNrf When set to true, The network function registers with an NRF. The default value is false.
nrf.leaderSidecar.enabled When set to true, if registerWithNrf is true and leaderSidecar is enabled, the network function polls the URL specified with nrf.leaderSidecar.url to determine if it is the leader. If it is the leader, the network function registers and sends heartbeats. The default value is false.
nrf.leaderSidecar.url If registerWithNrf is true and leaderSidecar is enabled, SBA Gateway polls this URL to decide if it is the leader. If it is the leader, the network function registers and sends heartbeats. The default value is http://localhost:8080/leader.
nrf.leaderSidecar.delayMillis The amount of time, in milliseconds, to wait before the first request. The default value is 5000.
nrf.leaderSidecar.pollingIntervalMillis The amount of time, in milliseconds, to wait between requests. The default value is 10000.
nrf.nrfUris A list of URIs of NRFs to register with. For example:
nrfUris:
  - https://nrf1:9099
  - https://nrf2:9099
Note: NRFs can be individually configured if required.
nrf.nrfs A list of NRFs to register with. For each NRF, the default configuration from the nrf section is used unless overridden here. For example, to register with nrf1 and nrf2 using the default configuration, but nrf3 with a different accessTokenRequest and nfProfile:
nrfs:
  nrf1:
    uri: https://nrf1:9099
  nrf2:
    uri: https://nrf2:9099
  nrf3:
    uri: https://nrf3:9099
    nfProfile: /opt/mtx/conf/nfProfile.yaml
    accessTokenRequest: /opt/mtx/conf/nrfAccessTokenRequest2.yaml
nrf.mode The method for handling NRF registration and failure:
  • ACTIVE_ACTIVE (default): Register with all NRFs and re-try registering if a failure occurs.
  • ACTIVE_STANDBY: Register with the first NRF in the list, and fail over to the next if a failure occurs.
nrf.useOldNrfClient When set to true, causes the network function to switch back to the original NRF Client. This property and feature are deprecated and are planned to be removed in a future release. The default value is false.
nrf.checkIfRegistered When set to true, the network function checks if it is already registered and updates the nfProfile if necessary.
nrf.activeStandbyReturnToPrimary When nf.mode is set to ACTIVE_STANDBY and the network function is failed over to a standby NRF, the network function continues to try to re-register with the Primary NRF.
nrf.nfProfile Specifies the path to a file containing a full NF Profile object. This is the content of the message sent to the NRF on registration and is fully configurable. The default value is /opt/mtx/conf/nfProfile.yaml.
nrf.requestAccessTokenBeforeRegistration When set to true, The network function requests an OAuth token before registration. The default value is true.
nrf.accessTokenRequest Path to a file containing the body of the access token request sent to each NRF before registration if nrf.requestAccessTokenBeforeRegistration is set to true. The default value is /opt/mtx/conf/nrfAccessTokenRequest.yaml.
nrf.heartbeatPayload The payload of the heartbeat message. The default value is /opt/mtx/conf/nrfHeartbeatPayload.yaml.
nrf.heartbeatNoDelay When set to true, send the first heartbeat immediately. (For testing only.) The default value is false.
nrf.retryDelay The time to wait, in seconds between retrying NRF registration when a failure happens in ACTIVE_ACTIVE mode, or failing over to another NRF in ACTIVE_STANDBY mode. The default value is 10.
nrf.useLocationHeader When set to false, the network function ignores the location header in the NRF registration response and uses only the configured NRF URI. By default, if the NRF returns a location header in the response to registration, the URL in the location header is used for all later requests, for example, heartbeats. The default value is true.
nrf.heartBeatTimerDefault The default heartbeat interval, in seconds. The default value is 0.
Note: Set the heartBeatTimer in nfProfile.yaml. This is negotiated with the NRF during registration. Only set this if that method does not work for some reason.
nrf.heartbeatRetries The number of consecutive failed heartbeats before trying to re-register. Set this property to 0 to disable the feature. In ACTIVE_STANDBY mode, a failover occurs after the heartbeat retries and the attempt to re-register fails. The default value is 3.
nrf.registrationVariables Before sending a registration, set the nfProfile field specified in the field parameter to the value of the variable from the variables configuration section. The variables.restApi.values.jsonPath property defines the path to the field, with $ as the root. Set the load property to the value of the load variable. For example:
-
  jsonPath: $
  field: load
  variable: load
nrf.heartbeatVariables Before sending a heartbeat, set the nfProfile field specified in the field parameter to the value of the variable from the variables configuration section. The variables.restApi.values.jsonPath property defines the path to the field, with $ as the root. Set the load property to the value of the load variable. For example:
-
  # Set the "value" field in the object with a path equal to '/load' to the value of the variable "load"
  jsonPath: $[?(@.path == '/load')]
  field: value
  variable: load
-
  jsonPath: $[?(@.path == '/nfServices/0/nfServiceStatus')]
  field: value
  variable: nfStatus
-
  jsonPath: $[?(@.path == '/nfServices/1/nfServiceStatus')]
  field: value
  variable: nfStatus
Note: SBA Gateway de-registers from an NRF only when uninstalled with the helm uninstall command.

The following gateway.yaml excerpt shows the common configuration default values (where defaults exist) for these properties:

# Settings related to the NRF
nrf:
  # Should we register with an NRF?
  registerWithNrf: false
  # If registerWithNrf is true and leaderSidecar is enabled,
  # the SBA will poll this URL to see if it is the leader.
  # If it is the leader it will register/heartbeat.
  leaderSidecar:
    enabled: false
    url: http://localhost:8080/leader
    # How long to wait before the first request
    delayMillis: 5000
    # Interval between requests
    pollingIntervalMillis: 10000
  # Register with the following NRFs
  # Note: Alternatively there is an "nrfs" configuration option
  #       if different configuration is required per-nrf.
  # e.g:
  # nrfUris:
  #   - https://nrf1:9099
  #   - https://nrf2:9099
  nrfUris: []
  # Register with the following NRFs and override configuration per NRF.
  # For each NRF, the default configuration from the nrf section will be used unless overridden here.
  #
  # For example, to register with nrf1 and nrf2 using the default configuration, but nrf3
  # with a different accessTokenRequest and nfProfile:
  # nrfs:
  #   nrf1:
  #     uri: https://nrf1:9099
  #   nrf2:
  #     uri: https://nrf2:9099
  #   nrf3:
  #     uri: https://nrf3:9099
  #     nfProfile: /opt/mtx/conf/nfProfile.yaml
  #     accessTokenRequest: /opt/mtx/conf/nrfAccessTokenRequest2.yaml
  nrfs: []
  # How to handle NRF registration and failure:
  #   ACTIVE_ACTIVE (default): Register with all NRFs and re-try registering if a failure occurs.
  #   ACTIVE_STANDBY: Register with the first NRF in the list, and fail over to the next if 
  #   a failure occurs.
  mode: "ACTIVE_ACTIVE"
  # Switch back to the original NRF client (Deprecated - will be removed in a future version)
  useOldNrfClient: false
  # Check if already registered and update nfProfile if different
  checkIfRegistered: true
  # In Active/Standby mode, when failed-over to a standby NRF keep trying the Primary NRF and re-register with it when available
  activeStandbyReturnToPrimary: true
  # Contents of this file will be sent on registration
  nfProfile: /opt/mtx/conf/nfProfile.yaml
  # Should we request an OAuth access token from the NRF before registration?
  requestAccessTokenBeforeRegistration: true
  # If we do request an access token, send this request
  accessTokenRequest: /opt/mtx/conf/nrfAccessTokenRequest.yaml
  # Payload to send in the Heartbeat message
  heartbeatPayload: /opt/mtx/conf/nrfHeartbeatPayload.yaml
  # For testing - send the first heartbeat immediately
  heartbeatNoDelay: false
  # Time to wait (seconds) between retrying NRF registration in the case of failure 
  # for ACTIVE_ACTIVE or failing-over to another NRF for ACTIVE_STANDBY
  retryDelay: 10
  # By default, if the NRF returns a Location header in the response to registration,
  # the URL in the Location header will be used for all subsequent requests 
  # (e.g. Heartbeats). Set this value to false to ignore the Location header 
  # and just use the configured NRF URI.
  useLocationHeader: true
  # Default heartbeat interval (seconds). Note - this is a last-resort setting,
  # please specify the desired heartBeatTimer in nfProfile.yaml. This will be
  # negotiated with the NRF during registration. Only set this if nothing else works.
  heartBeatTimerDefault: 0
  # Before sending a registration/heartbeat, set the nfProfile field specified in the
  # field parameter to the value of the variable from the "variables" config section. The jsonPath
  # parameter defines the path to the field (with $ being the root).
  registrationVariables: []
  #  -
  #    # Set the "load" field to the value of the variable "load"
  #    jsonPath: $
  #    field: load
  #    variable: load
  heartbeatVariables: []
  #  -
  #    # Set the "value" field in the object with a path equal 
  #    # to '/load' to the value of the variable "load"
  #    jsonPath: $[?(@.path == '/load')]
  #    field: value
  #    variable: load