Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Customize JCNR Helm Chart for OpenShift Deployment

SUMMARY Read this topic to learn about the deployment configuration available for the Juniper Cloud-Native Router.

You can deploy and operate Juniper Cloud-Native Router in the L2, L3, or L2-L3 mode. You configure the deployment mode by editing the appropriate attributes in the values.yaml file prior to deployment.

Note:
  • In the fabricInterface key of the values.yaml file:

    • When all the interfaces have an interface_mode key configured, then the mode of deployment would be L2.

    • When one or more interfaces have an interface_mode key configured along with the rest of the interfaces not having the interface_mode key, then the mode of deployment would be L2-L3.

    • When none of the interfaces have the interface_mode key configured, then the mode of deployment would be L3.

Customize the helm charts using the Juniper_Cloud_Native_Router_release-number/helmchart/values.yaml file. The configuration keys of the helm chart are shown in the table below.

Table 1: Helm Chart Attributes and Descriptions
Key Additional Key Configuration Description
registry   Defines the docker registry where the vRouter, cRPD and jcnr-cni container images are hosted. The default value is enterprise-hub.juniper.net.
repository   (Optional) Defines the repository path for the vRouter, cRPD and jcnr-cni container images. This is a global key and takes precedence over "repository" paths under "common" section.
imagePullSecret   (Optional) Defines the registry authentication credentials. You can configure credentials to either the Juniper repository or your private registry.
  registryCredentials Base64 representation of your Docker registry credentials. View the Configure Repository Credentials topic for more information.
  secretName Name of the secret object that will be created.
common   Defines repsitory paths and tags for the vRouter, cRPD and jcnr-cni container images. Use default unless using a private registry.
  repository Defines the repository path. The default value is atom-docker/cn2/bazel-build/dev/. The global repository key takes precedence if defined.
  tag Defines the image tag. The default value is configured to the appropriate tag number for the JCNR release version.
replicas (Optional) Indicates the number of replicas for cRPD. If the value is not specified, then the default value 1 is considered. The value for this key must be specified for multi-node clusters.
storageClass

Not applicable for OCP deployment.

awsregion   Not applicable for OCP deployment.
noLocalSwitching (Optional) Prevents interfaces in a bridge domain from transmitting and receiving ethernet frame copies. Enter one or more comma separated VLAN IDs to ensure that the interfaces belonging to the VLAN IDs do not transmit frames to one another. This key is specific for L2 and L2-L3 deployments. Enabling this key provides the functionality on all access interfaces. For enabling the functionality on trunk interfaces, configure the no-local-switching key in the fabricInterface key.
fabricInterface  

Provide a list of interfaces to be bound to the DPDK. You can also provide subnets instead of interface names. If both the interface name and the subnet are specified, then the interface name takes precedence over subnet/gateway combination. The subnet/gateway combination is useful when the interface names vary in a multi-node cluster.

Note:
  • When all the interfaces have an interface_mode key configured, then the mode of deployment would be L2.

  • When one or more interfaces have an interface_mode key configured along with the rest of the interfaces not having the interface_mode key, then the mode of deployment would be L2-L3.

  • When none of the interfaces have the interface_mode key configured, then the mode of deployment would be L3.

For example:

  # L2 only
  - eth1:
      ddp: "auto"                
      interface_mode: trunk
      vlan-id-list: [100, 200, 300, 700-705]
      storm-control-profile: rate_limit_pf1
      native-vlan-id: 100
      no-local-switching: true
  - bond0:
      ddp: "auto" # auto/on/off  
      interface_mode: trunk
      vlan-id-list: [100, 200, 300, 700-705]
      storm-control-profile: rate_limit_pf1
      #native-vlan-id: 100
      #no-local-switching: true
  # L3  only
  - eth1:
      ddp: "off"                 
  - eth2:
      ddp: "off"                
 # L2L3
  - eth1:
      ddp: "auto"                
  - eth2:
      ddp: "auto"                
      interface_mode: trunk
      vlan-id-list: [100, 200, 300, 700-705]
      storm-control-profile: rate_limit_pf1
      native-vlan-id: 100
      no-local-switching: true
  subnet An alternative mode of input for interface names. For example:
- subnet: 10.40.1.0/24 
  gateway: 10.40.1.1 
  ddp: "off"    

The subnet option is applicable only for L3 interfaces. With the subnet mode of input, interfaces are auto-detected in each subnet. Specify either subnet/gateway or the interface name. Do not configure both. The subnet/gateway form of input is particularly helpful in environments where the interface names vary for a multi-node K8s cluster.

  ddp

(Optional) Indicates the interface-level Dynamic Device Personalization (DDP) configuration. DDP provides datapath optimization at NIC for traffic like GTPU, SCTP, etc. For a bond interface, all slave interface NICs must support DDP for the DDP configuration to be enabled.

Setting options include auto, on, or off. The default setting is off.

Note:

The subnet/interface level ddp takes precedence over the global ddp configuration.

  interface_mode

Set to trunk for L2 interfaces and do not configure for L3 interfaces. For example,

interface_mode: trunk
  vlan-id-list

Provide a list of VLAN IDs associated with the interface.

  storm-control-profile

Use storm-control-profile to associate appropriate storm control profile for the interface. Profiles are defined under jcnr-vrouter.stormControlProfiles.

  native-vlan-id

Configure native-vlan-id with any of the VLAN IDs in the vlan-id-list to associate it with untagged data packets received on the physical interface of a fabric trunk mode interface. For example:

fabricInterface: 
  - bond0: 
      interface_mode: trunk 
      vlan-id-list: [100, 200, 300] 
      storm-control-profile: rate_limit_pf1 
      native-vlan-id: 100  
  no-local-switching Prevents interfaces from communicating directly with each other if the no-local-switching statement is configured. Allowed values are true or false.
fabricWorkloadInterface (Optional) Defines the interfaces to which different workloads are connected. They can be software-based or hardware-based interfaces.
log_level Defines the log severity. Available value options are: DEBUG, INFO, WARN, and ERR.
Note:

Leave the log_level set to the default INFO unless instructed to change it by Juniper support.

log_path

The defined directory stores various JCNR related descriptive logs such as contrail-vrouter-agent.log, contrail-vrouter-dpdk.log, etc. The default value is /var/log/jcnr/.

syslog_notifications

Indicates the absolute path to the file that stores syslog-ng generated notifications in JSON format. The default value is /var/log/jcnr/jcnr_notifications.json.

nodeAffinity

(Optional) Defines labels on nodes to determine where to place the vRouter and pods. For example:

  nodeAffinity:
  - key: node-role.kubernetes.io/worker
    operator: Exists
  - key: node-role.kubernetes.io/master
    operator: DoesNotExist
Note:

This key is a global setting.

On an OCP setup node affinity must be configured to bring up JCNR only on worker nodes.

key Key-value pair that represents a node label that must be matched to apply the node affinity.
operator Defines the relationship between the node label and the set of values in the matchExpression parameters in the pod specification. This value can be In, NotIn, Exists, DoesNotExist, Lt, or Gt.
cni_bin_dir (Optional) The default path is /opt/cni/bin. You can override the default cni path with a path of your choice e.g. /var/opt/cni/bin. For Red Hat OpenShift the default CNI path should be configured to /var/lib/cni/bin, which is the default path on any OCP deployment. Leaving the path variable (cni_bin_dir) empty, isn't a viable option in OCP.
grpcTelemetryPort

(Optional) Enter a value for this parameter to override cRPD telemetry gRPC server default port of 50051.

grpcVrouterPort (Optional) Enter a value for this parameter to override vRouter gRPC server default port of 50052.
vRouterDeployerPort   (Optional) Default value is 8081. Configure to override if the default port is unavailable.
restoreInterfaces Set the value of this key to true to restore the interfaces back to their original state in case the vRouter pod crashes or restarts.
bondInterfaceConfigs (Optional) Enable bond interface configurations only for L2 or L2-L3 deployments.
name Name of the bond interface.
mode Default value is 1 (Active_Backup)
slaveInterfaces Fabric interfaces to be aggregated.
mtu Maximum Transmission Unit (MTU) value for all physical interfaces (VFs and PFs).
cpu_core_mask

Indicates the vRouter forward core mask. If qos is enabled, you will need to allocate 4 CPU cores (primary and siblings).

stormControlProfiles Configure the rate limit profiles for BUM traffic on fabric interfaces in bytes per second.
  rate_limit_pf1  
  bandwidth  
  level  
ddp

(Optional) Indicates the global Dynamic Device Personalization (DDP) configuration. DDP provides datapath optimization at NIC for traffic like GTPU, SCTP, etc. For a bond interface, all slave interface NICs must support DDP for the DDP configuration to be enabled.

Setting options include auto, on, or off. The default setting is off.

Note:

The interface level ddp takes precedence over the global ddp configuration.

qosEnable

Set to true or false to enable or disable QoS.

Note:

QoS is not supported on Intel X710 NIC.

corePattern

Indicates the core pattern to denote how the core file is generated. If this configuration is left blank, then JCNR pods will not overwrite the default pattern.

Note:

Set the corePattern value on host before deploying JCNR. You may change the value in /etc/sysctl.conf. For example, kernel.core_pattern=/var/crash/core_%e_%p_%i_%s_%h_%t.gz

coreFilePath Indicates the path for the core file. If the value is left blank, then vRouter considers /var/crashes as the default value.
vrouter_dpdk_uio_driver The uio driver is vfio-pci.

Sample Helm Charts

Helm Chart for L2 Only Deployment on Red Hat OpenShift

A working L2 only helm chart sample is shown below. The configured sections are highlighted in bold:

Helm Chart for L3 Only Deployment on Red Hat OpenShift

A working L3 only helm chart sample is shown below. The configured sections are highlighted in bold:

Helm Chart for L2-L3 Deployment on Red Hat OpenShift

A working L2-L3 helm chart sample is shown below. The configured sections are highlighted in bold: