How do I configure a generic mediator?
Purpose
Use this procedure to install or uninstall a generic mediator to connect to an external controller. A generic mediator will handle authentication to the controller, allowing a call to be made to the controller from NSP without the need to provide credentials.
You can configure as many generic mediators as required, with different external controller parameters. container images and Helm charts are provided in the Nokia Git repository, along with the charts and images for other mediators.
To provide generic mediator parameters to the NSP you must create a values.yaml file; see the Intent Based Management Framework tutorial on the Network Developer Portal for information.
Naming
Each generic mediator must have a unique name.
Names must be unique in the following areas:
-
the name of the instance in Helm
You can allow Helm to autogenerate a unique name, however, using the -n option when installing the Helm chart will allow you to use a meaningful user identifiable name.
-
the name of the pod and Kubernetes configuration
This is specified in the values.yaml file using the mediator_name value. When the name is given, the Kubernetes structures will be given a name like nsp-mdt-<name>-mediator. For example, to name the mediator SF1, enter the mediator_name: "SF1" in the values.yaml file. This will produce a pod and Kubernetes structures prefixed with nsp-mdt-SF1-mediator. If multiple words are in the name, they must be separated with a dash character (-).
The Helm instance name and the mediator_name do not have to be the same, however, using the same name may make alignment simpler.
Certs files
Certs files may need to be copied into the pod for requests and authentication to work properly. This is done by a combination of the copy_certs and certsFileName properties and the --set-file flag on the Helm command.
When copy_certs is set to true, the NSP will attempt to copy a certs file into the pod in the /opt/nsp/os/ssl/certs/custom directory. Since the name of the certs file might be important and the mediator itself will not be aware of this, the file name to give this file is specified in the certsFileName value.
For example, if you have these values in the values.yaml file:
A file named ca.pem is created in the /opt/nsp/os/ssl/certs/custom directory.
If you specify copy_certs: true in the values.yaml file but do not add the --set-file flag to the Helm command, the pod will not initialize.