Sample Configuration Files
Read this section to find sample YAML configuration files for use in deploying Juniper Cloud-Native Router. These YAML files control the features and functions available to cloud-native router by affecting the deployment instructions. YAML files for workload configuration are also included. The workload configuration files control the workload functions.
We've included the following sample configuration files:
- Juniper Cloud-Native Router Main Configuration FIle
-
- main
values.yaml
file
- main
- Juniper Cloud-Native Router vRouter-Specific Configuration File
- Juniper Cloud-Native Router JCNR-CNI-Specific Configuration File
- Workload Configuration Files
Use these files to understand the configuration options available for deployment of Juniper Cloud-Native Router. The workload configuration files display how you can configure trunk and access interfaces and configure various VLANs for each type. Each of the files contain comments that start with a hash mark (#) and are highlighted in bold in these examples.
-
values.yaml
This is the main values.yaml file. There are 3 other values.yaml files supplied in the TAR file. 1 values.yaml for each of the installation components: jcnr-cni, jcnr-vrouter, and syslog-ng.
If there are conflicting settings between the individual values.yaml files and the main values.yaml file, the settings in the main values.yaml file take precedence.
#################################################################### # Common Configuration (global vars) # #################################################################### global: registry: svl-artifactory.juniper.net/ # uncomment below if all images are available in the same path; it will # take precedence over "repository" paths under "common" section below #repository: path/to/allimages/ common: vrouter: repository: atom-docker/cn2/bazel-build/dev/ tag: JCNR-22.3-6 crpd: repository: junos-docker-local/warthog/ tag: 22.3R1.8 jcnrcni: repository: junos-docker-local/warthog/ tag: 20220918-4adf886 # defines the log severity. Possible options: DEBUG, INFO, WARN, ERR log_level: "INFO" # "log_path": this directory will contain various jcnr related descriptive logs # such as contrail-vrouter-agent.log, contrail-vrouter-dpdk.log etc. log_path: "/var/log/jcnr/" # "syslog_notifications": absolute path to the file that will contain syslog-ng # generated notifications in json format syslog_notifications: "/var/log/jcnr/jcnr_notifications.json" # fabricInterface: NGDU or tor side interface, expected all types # of traffic; interface_mode is always trunk for this mode fabricInterface: - bond0: interface_mode: trunk vlan-id-list: [100, 200, 300, 700-705] # fabricWorkloadInterface: RU side interfaces, expected traffic is only # management/control traffic; interface mode is always access for this mode fabricWorkloadInterface: - enp59s0f1v0: interface_mode: access vlan-id-list: [700] jcnr-vrouter: # restoreInterfaces: setting this to true will restore the interfaces # back to their original state in case vrouter pod crashes or restarts restoreInterfaces: false # bond interface configurations bondInterfaceConfigs: - name: "bond0" mode: 1 # ACTIVE_BACKUP MODE -- This is the only supported mode slaveInterfaces: - "enp59s0f0v0" - "enp59s0f0v1" # MTU for all physical interfaces( all VF’s and PF’s) mtu: "9000" # vrouter fwd core mask cpu_core_mask: "2,3" # rate limit for broadcast/multicast traffic on fabric interfaces in bytes per second fabricBMCastRateLimit: 0 # Set ddp to true to enable Dynamic Device Personalization (DDP) # It provides datapath optimization at NIC for traffic like GTPU, SCTP etc. ddp: true #set to false if you use the Intel XL710 NIC
-
jcnr-vrouter specific
values.yaml
This values.yaml file is specific to the jcnr-vrouter Pod. It is located under the Juniper_Cloud_Native_Router_<release-number>/helm_charts/jcnr/charts/jcnr-vrouter directory. If you enter any values in this file that conflict with values in the main values.yaml file, the values in the main values.yaml file take precedence.
# # This is a YAML-formatted file. # # Declare variables to be passed into your templates. common: registry: svl-artifactory.juniper.net/ repository: atom-docker/cn2/bazel-build/dev/ # anchor tag for vrouter container images vrouter-tag: &vrouter_tag JCNR-22.3-6 contrail_init: image: contrail-init tag: *vrouter_tag pullPolicy: IfNotPresent contrail_vrouter_kernel_init_dpdk: image: contrail-vrouter-kernel-init-dpdk tag: *vrouter_tag pullPolicy: IfNotPresent contrail_vrouter_agent: image: contrail-vrouter-agent tag: *vrouter_tag pullPolicy: IfNotPresent contrail_vrouter_agent_dpdk: image: contrail-vrouter-dpdk tag: *vrouter_tag pullPolicy: IfNotPresent resources: limits: memory: 4Gi hugepages-1Gi: 4Gi # Hugepages must be enabled with default size as 1G; minimum 4Gi to be used requests: memory: 4Gi hugepages-1Gi: 4Gi contrail_vrouter_telemetry_exporter: image: contrail-telemetry-exporter tag: *vrouter_tag pullPolicy: IfNotPresent contrail_k8s_deployer: image: contrail-k8s-deployer tag: *vrouter_tag pullPolicy: IfNotPresent contrail_k8s_crdloader: image: contrail-k8s-crdloader tag: *vrouter_tag pullPolicy: IfNotPresent contrail_k8s_applier: image: contrail-k8s-applier tag: *vrouter_tag pullPolicy: IfNotPresent busyBox: image: busybox tag: "latest" pullPolicy: IfNotPresent vrouter_name: master # uio driver will be vfio-pci or uio_pci_generic vrouter_dpdk_uio_driver: "vfio-pci" # MTU for all physical interfaces( all VF’s and PF’s) mtu: "9000" vrouter_log_path: "/var/log/jcnr/" # Defines the log severity. Possible options: DEBUG, INFO, WARN, ERR log_level: "INFO" dpdkCommandAdditionalArgs: "--yield_option 0" # Set ddp to true to enable Dynamic Device Personalization (DDP) # It provides datapath optimization at NIC for traffic like GTPU, SCTP etc. ddp: true # vrouter fwd core mask cpu_core_mask: "2,3" # vrouter service thread mask service_core_mask: "" # vrouter control thread mask dpdk_ctrl_thread_mask: "" # dpdk_mem_per_socket: "1024" # L3 disabled for switching mode jcnr_mode: "l2_only" # global Mac table size - We recommend leaving this at the default value mac_table_size: "10240" # timeout (seconds) for aging Mac table entries (S) mac_table_ageout: 60 # parameters for vRouter livenessProbe livenessProbe: initialDelaySeconds: 10 periodSeconds: 20 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 # parameters for vRouter startupProbe startupProbe: initialDelaySeconds: 10 periodSeconds: 20 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 # setting this to true will restore the interfaces back to # their original state in case vrouter pod crashes or restarts restoreInterfaces: false # tor side interface, expected all types of traffic fabricInterface: - enp4s0f0vf0 - bond0 # RU side interfaces, expected traffic is only management/control traffic fabricWorkloadInterface: - enp4s0f1vf0 # bond interface configurations bondInterfaceConfigs: - name: "bond0" mode: 1 # ACTIVE_BACKUP MODE slaveInterfaces: - "enp1s0f1" - "enp2s0f1" # rate limit for broadcast/multicast traffic on fabric interfaces in bytes per second fabricBMCastRateLimit: 0
-
jcnr-cni specific
values.yaml
This values.yaml file is specific to the jcnr-cni Pod. The jcnr-cni specfic values.yaml file is located under the Juniper_Cloud_Native_Router_<release-number>/helm_charts/jcnr/charts/jcnr-cni directory. If you enter any values in this file that conflict with values in the main values.yaml file, the values in the main values.yaml file take precedence.
# Default values for jcnr. # This is a YAML-formatted file. # Declare variables to be passed into your templates. common: registry: svl-artifactory.juniper.net/ repository: junos-docker-local/warthog/ crpdImage: image: crpd tag: "22.3R1.8" pullPolicy: IfNotPresent jcnrCNIImage: image: jcnr-cni tag: "20220918-fadf886" pullPolicy: IfNotPresent crpdConfigGeneratorImage: image: crpdconfig-generator tag: "v3" pullPolicy: IfNotPresent busyBox: image: busybox tag: "latest" pullPolicy: IfNotPresent #data plane default is dpdk for vrouter case, linux for kernel module dataplane: dpdk networkAttachmentDefinitionName: vswitch crpd_log_path: "/var/log/jcnr/" # Defines the log severity. Possible options: panic, fatal, error, # warn or warning, info, debug, trace log_level: "info" # parameters for cRPD livenessProbe livenessProbe: initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 # parameters for cRPD startupProbe startupProbe: initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 crpdConfigs: interface_groups: fabricInterface: # TOR side interface, expected all types of traffic - bond0: interface_mode: trunk # interface mode is always trunk for fabricInterface vlan-id-list: [100, 200, 700] # vlan-id-lists - enp4s0f0vf0: interface_mode: trunk # interface mode is always trunk for fabricInterface vlan-id-list: [300, 500, 3001, 3002] # vlan-id-lists - enp4s0f0vf1: interface_mode: trunk # interface mode is always trunk for fabricInterface vlan-id-list: [3003, 3004, 3201-3250, 900] # vlan-id-lists - enp4s0f0vf2: interface_mode: trunk # interface mode is always trunk for fabricInterface vlan-id-list: [3251-3255] # vlan-id-lists fabricWorkloadInterface: # RU side interfaces, expected traffic is only management/control traffic - enp4s0f1vf0: interface_mode: access # interface mode is always access for fabricWorkloadInterface vlan-id-list: [700] # vlan-id-list must always be a single value for fabricWorkloadInterface - enp4s1f1vf0: interface_mode: access # interface mode is always access for fabricWorkloadInterface vlan-id-list: [900] # vlan-id-list must always be a single value for fabricWorkloadInterface routing_instances: - vswitch: instance-type: virtual-switch
-
nad-dpdk_trunk_vlan_3002.yaml
apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: nad-vswitch-bd3002 spec: config: '{ "cniVersion":"0.4.0", "name": "nad-vswitch-bd3002", "capabilities":{"ips":true}, "plugins": [ { "type": "jcnr", "args": { "instanceName": "vswitch", "instanceType": "virtual-switch", "bridgeDomain": "bd3002", "bridgeVlanId": "3002", "dataplane":"dpdk", "mtu": "9000" }, "ipam": { "type": "static", "capabilities":{"ips":true}, "addresses":[ { "address":"2001:db8:3002::10.2.0.1/64", "gateway":"2001:db83002::10.2.0.254" }, { "address":"10.2.0.1/24", "gateway":"10.2.0.254" } ] }, "kubeConfig":"/etc/kubernetes/kubelet.conf" } ] }'
-
nad-kernel_access_vlan_3001.yaml
apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: pod1-vswitch-bd3001-1 spec: config: '{ "cniVersion":"0.4.0", "name": "pod1-vswitch-bd3001-1", "capabilities":{"ips":true}, "plugins": [ { "type": "jcnr", "args": { "instanceName": "vswitch", "instanceType": "virtual-switch", "bridgeDomain": "bd3001", "bridgeVlanId": "3001", "dataplane":"dpdk", "mtu": "9000", "interfaceType":"veth" }, "ipam": { "type": "static", "capabilities":{"ips":true}, "addresses":[ { "address":"2001:db8:3001::10.1.0.1/64", "gateway":"2001:db8:3001::10.1.0.254" }, { "address":"10.1.0.1/24", "gateway":"10.1.0.254" } ] }, "kubeConfig":"/etc/kubernetes/kubelet.conf" } ] }'
-
nad-odu-bd3003-sub.yaml
apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: vswitch-bd3003-sub spec: config: '{ "cniVersion":"0.4.0", "name": "vswitch-bd3003-sub", "capabilities":{"ips":true}, "plugins": [ { "type": "jcnr", "args": { "instanceName": "vswitch", "instanceType": "virtual-switch", "bridgeDomain": "bd3003", "bridgeVlanId": "3003", "parentInterface":"net1", "interface":"net1.3003", "dataplane":"dpdk" }, "ipam": { "type": "static", "capabilities":{"ips":true}, "addresses":[ { "address":"10.3.0.1/24", "gateway":"10.3.0.254" }, { "address":"2001:db8:3003::10.3.0.1/120", "gateway":"2001:db8:3003::10.3.0.1" } ] }, "kubeConfig":"/etc/kubernetes/kubelet.conf" } ] }'
-
nad-odu-bd3004-sub.yaml
apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: vswitch-bd3004-sub spec: config: '{ "cniVersion":"0.4.0", "name": "vswitch-bd3004-sub", "capabilities":{"ips":true}, "plugins": [ { "type": "jcnr", "args": { "instanceName": "vswitch", "instanceType": "virtual-switch", "bridgeDomain": "bd3004", "bridgeVlanId": "3004", "parentInterface":"net1", "interface":"net1.3004", "dataplane":"dpdk" }, "ipam": { "type": "static", "capabilities":{"ips":true}, "addresses":[ { "address":"30.4.0.1/24", "gateway":"30.4.0.254" }, { "address":"2001:db8:3004::10.4.0.1/120", "gateway":"2001:db8:3004::10.4.0.1" } ] }, "kubeConfig":"/etc/kubernetes/kubelet.conf" } ] }'
-
odu-virtio-subinterface.yaml
apiVersion: v1 kind: Pod metadata: name: odu-subinterface-1 annotations: k8s.v1.cni.cncf.io/networks: | [ { "name": "vswitch-bd3003-sub" }, { "name": "vswitch-bd3004-sub" } ] spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 5d7s39.englab.juniper.net containers: - name: odu-subinterface image: svl-artifactory.juniper.net/junos-docker-local/warthog/pktgen19116:subint imagePullPolicy: IfNotPresent securityContext: privileged: false resources: requests: memory: 2Gi limits: hugepages-1Gi: 2Gi env: - name: KUBERNETES_POD_UID valueFrom: fieldRef: fieldPath: metadata.uid volumeMounts: - name: dpdk mountPath: /dpdk subPathExpr: $(KUBERNETES_POD_UID) - mountPath: /dev/hugepages name: hugepage volumes: - name: dpdk hostPath: path: /var/run/jcnr/containers - name: hugepage emptyDir: medium: HugePages
-
pod-dpdk-trunk-vlan3002.yaml
apiVersion: v1 kind: Pod metadata: name: odu-trunk-1 annotations: k8s.v1.cni.cncf.io/networks: nad-vswitch-bd3002 spec: containers: - name: odu-trunk image: svl-artifactory.juniper.net/junos-docker-local/warthog/pktgen19116:trunk imagePullPolicy: IfNotPresent securityContext: privileged: true resources: requests: memory: 2Gi limits: hugepages-1Gi: 2Gi env: - name: KUBERNETES_POD_UID valueFrom: fieldRef: fieldPath: metadata.uid volumeMounts: - name: dpdk mountPath: /dpdk subPathExpr: $(KUBERNETES_POD_UID) - mountPath: /dev/hugepages name: hugepage volumes: - name: dpdk hostPath: path: /var/run/jcnr/containers - name: hugepage emptyDir: medium: HugePages
-
pod-kernel-access-vlan-3001.yaml
apiVersion: v1 kind: Pod metadata: name: odu-kenel-pod-bd3001-1 annotations: k8s.v1.cni.cncf.io/networks: pod1-vswitch-bd3001-1 spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 5d8s7.englab.juniper.net containers: - name: odu-kenel-pod-bd3001-1 image: vinod-iperf3:latest imagePullPolicy: IfNotPresent command: ["/bin/bash","-c","sleep infinity"] securityContext: privileged: false env: - name: KUBERNETES_POD_UID valueFrom: fieldRef: fieldPath: metadata.uid volumeMounts: - name: dpdk mountPath: /dpdk subPathExpr: $(KUBERNETES_POD_UID) volumes: - name: dpdk hostPath: path: /var/run/jcnr/containers