このページの目次
GCP展開のためのJCNR Helmチャートのカスタマイズ
GCP上でL3モードでJuniper Cloud-Native Routerを導入して運用できます。配置モードを設定するには、配置前にファイル内の values.yaml
適切な属性を編集します。
Helm チャートの属性と説明
ファイルを使用して Helm チャートをカスタマイズします Juniper_Cloud_Native_Router_release-number/helmchart/values.yaml
。ヘムルチャートの設定キーを以下の表に示します。
キー | 追加キー構成 | の説明 |
---|---|---|
レジストリ | vRouter、cRPD、jcnr-cniコンテナイメージがホストされているDockerレジストリを定義します。デフォルト値はJuniper Enterprise Hubに設定されています。 | |
リポジトリ | vRouter、cRPD、jcnr-cniコンテナイメージのリポジトリパスを定義します。これはグローバルキーであり、「共通」セクションの下の「リポジトリ」パスよりも優先されます。デフォルト値は jcnr-container-prod/ |
|
imagePullSecret | (オプション)レジストリ認証資格情報を定義します。資格情報は、ジュニパーリポジトリまたはプライベートレジストリのいずれかに設定できます。詳細については、「 リポジトリ資格情報の構成」 トピックを参照してください。 | |
レジストリ資格情報 | Docker レジストリの資格情報の Base64 表現。 | |
シークレット名 | 作成されるシークレット オブジェクトの名前。 | |
共通 | vRouter、cRPD、jcnr-cniコンテナイメージのリポジトリパスとタグを定義します。 | |
リポジトリ | リポジトリ パスを定義します。定義されている場合は、グローバルリポジトリキーが優先されます。 デフォルト値は |
|
タグ | イメージ タグを定義します。デフォルト値は、JCNR リリース・バージョンの適切なタグ番号に設定されます。 | |
レプリカ | (オプション)cRPDのレプリカの数を示します。値が指定されていない場合は、デフォルト値の 1 が考慮されます。 このキーの値は、マルチノード・クラスターに対して指定する必要があり、JCNR をデプロイする必要があるノードの数と一致する必要があります。 |
|
ストレージクラス | GCP展開には適用されません。 |
|
AWSリージョン | GCP展開には適用されません。 | |
いいえローカルスイッチング | GCP展開には適用されません。 | |
ファブリックインターフェイス | DPDK にバインドするインターフェイスのリストを指定します。インターフェイス名の代わりにサブネットを指定することもできます。インターフェイス名とサブネットの両方を指定した場合は、サブネット/ゲートウェイの組み合わせよりもインターフェイス名が優先されます。サブネット/ゲートウェイの組み合わせは、マルチノードクラスタ内でインターフェイス名が異なる場合に便利です。
メモ:
L3 onlyセクションを使用して、GCPのファブリックインターフェイスを設定します。L2 のみと L2-L3 セクションは、GCP 展開には適用されません。 例えば: # L3 only - eth1: ddp: "off" - eth2: ddp: "off" |
|
サブネット | インターフェイス名の入力の代替モード。例えば: - subnet: 10.40.1.0/24 gateway: 10.40.1.1 ddp: "off" オプションは |
|
Ddp | GCP展開には適用されません。 |
|
interface_mode | GCP展開には適用されません。 | |
vlan-id-list | GCP展開には適用されません。 |
|
ストーム制御プロファイル | GCP展開には適用されません。 |
|
ネイティブVLAN ID | GCP展開には適用されません。 | |
ローカルスイッチングなし | GCP展開には適用されません。 | |
ファブリックワークロードインターフェイス | GCP展開には適用されません。 | |
log_level | ログの重大度を定義します。使用可能な値のオプションは、DEBUG、INFO、WARN、ERR です。
メモ:
log_levelは、ジュニパーサポートから変更の指示がない限り、INFOのままにしてください。 |
|
log_path | 定義されたディレクトリーには、contrail-vrouter-agent.log、contrail-vrouter-dpdk.log などのさまざまな JCNR 関連の記述ログが保管されます。 |
|
syslog_notifications | syslog-ng で生成された通知を JSON 形式で格納するファイルへの絶対パスを示します。 |
|
コアパターン | コア ファイルの生成方法を示すコア パターンを示します。この設定を空白のままにすると、JCNR ポッドはデフォルトパターンを上書きしません。
メモ:
JCNR を展開する前に、ホストで corePattern 値を設定します。の値は |
|
コアファイルパス | コア ファイルのパスを示します。値を空白のままにすると、vRouter は /var/crashs をデフォルト値と見なします。 | |
ノードアフィニティ | (オプション)ノードのラベルを定義して、vRouter ポッドを配置する場所を決定します。デフォルトでは、vRouter ポッドはクラスターのすべてのノードにデプロイされます。 次の例では、ノード アフィニティ ラベルは "key1=jcnr" として定義されています。このラベルは、JCNR をデプロイする必要がある各ノードに適用する必要があります。 nodeAffinity: - key: key1 operator: In values: - jcnr
メモ:
このキーはグローバル設定です。 |
|
キー | ノード アフィニティを適用するために一致する必要があるノード ラベルを表すキーと値のペア。 | |
演算子 | ノード ラベルとポッド仕様の matchExpression パラメーターの値のセットとの関係を定義します。この値は、In、NotIn、Exists、DoesNotExist、Lt、または gt にすることができます。 | |
cni_bin_dir | (オプション)デフォルトのパスは /opt/cni/bin です。デフォルトの cni パスを、ディストリビューションで使用されているパス (/var/opt/cni/bin など) で上書きできます。 | |
grpcTelemetryPort | (オプション)このパラメーターの値を入力して、cRPD テレメトリ gRPC サーバーの既定のポートである 50051 をオーバーライドします。 |
|
grpcVrouterPort | (オプション)このパラメーターの値を入力して、vRouter gRPC サーバーのデフォルト ポートである 50052 を上書きします。 | |
復元インターフェイス | このキーの値を true に設定すると、vRouter ポッドがクラッシュまたは再起動した場合にインターフェイスが元の状態に戻ります。 | |
vRouterDeployerPort | (オプション)デフォルト値は 8081 です。デフォルトポートが使用できない場合に上書きするように設定します。 | |
bondInterfaceConfigs | GCP展開には適用されません。 | |
Mtu | すべての物理インターフェイス(VFおよびPF)の最大送信単位(MTU)値。デフォルト値は 9000 です。 | |
cpu_core_mask | vRouter フォワード コア マスクを示します。QoS が有効になっている場合は、4 つの CPU コア (プライマリと兄弟) を割り当てる必要があります。 |
|
ストームコントロールプロファイル | GCP展開には適用されません。 | |
dpdkCommandAdditionalArgs |
|
追加のdpdk cmd行パラメータを渡します。--yield_option 0 はデフォルトで設定されており、dpdk 転送コアが割り当てられている CPU コアを生成しないことを意味します。追加できる追加の共通パラメーターは、tx 記述子と rx 記述子、および mempool です。例えば: dpdkCommandAdditionalArgs: "--yield_option 0 --dpdk_txd_sz 2048 --dpdk_rxd_sz 2048 --vr_mempool_sz 131072" |
Ddp | GCP展開には適用されません。 | |
qosEnable | GCP デプロイの場合は false に設定します。 |
|
vrouter_dpdk_uio_driver | uio ドライバーは vfio-pci です。 |
|
agentModeType |
|
dpdk または xdp を指定できます。agentModeType を dpdk に設定すると、dpdk データパスが表示されます。agentModeType を xdp に設定すると、ebpf を使用します。デフォルト値は dpdk です。 |
ファブリックRpfチェック無効 |
|
このフラグを false に設定すると、JNCR のすべてのファブリック インターフェイスで RPF チェックが有効になります。デフォルトでは、RPF チェックは無効になっています。 |
persistConfig |
|
jcnr-cni で生成されたポッド構成をアンインストール後も保持する場合は、このフラグを true に設定します。このオプションは、L2 モードでのみ設定する必要があります。デフォルト値は false です。 |
GCP に JCNR をインストールする場合は、キーとセットtx
rx
および記述子を 256 に更新dpdkCommandAdditionalArgs
します。例えば:
dpdkCommandAdditionalArgs: "--yield_option 0 --dpdk_txd_sz 256 --dpdk_rxd_sz 256"
Helm チャートのサンプル
GCP JCNR ヘルム チャートのサンプルを以下に示します。
GCP導入のHelmチャート
有効な GCP L3 Helm チャートのサンプルを以下に示します。設定されたセクションは 太字で強調表示されています。
#################################################################### # Common Configuration (global vars) # #################################################################### global: registry: enterprise-hub.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: jcnr/ # uncomment below if you are using a private registry that needs authentication # registryCredentials - Base64 representation of your Docker registry credentials # secretName - Name of the Secret object that will be created #imagePullSecret: #registryCredentials: <base64-encoded-credential> #secretName: regcred common: vrouter: repository: atom-docker/cn2/bazel-build/dev/x86_64/ tag: R23.4-85 crpd: repository: junos-docker-local/warthog/amd64/ tag: 23.4R1.8 jcnrcni: repository: junos-docker-local/warthog/amd64/ tag: 23.4-20231215-50817e3 telemetryExporter: repository: atom-docker/cn2/bazel-build/dev/x86_64/ tag: R23.4-85 # Number of replicas for cRPD; this option must be used for multinode clusters # JCNR will take 1 as default if replicas is not specified replicas: “2” # storageClass: Name of the storage class for cRPD. This option is must for # cloud deployments such as AWS where gp2 can be used # storageClass: gp2 # Set AWS Region for AWS deployments # awsregion: us-east-1 #noLocalSwitching: [700] # fabricInterface: provide a list of interfaces to be bound to dpdk # You can also provide subnets instead of interface names. Interfaces name take precedence over # Subnet/Gateway combination if both specified (although there is no reason to specify both) # Subnet/Gateway combination comes handy when the interface names vary in a multi-node cluster fabricInterface: ######################### # L2 only #- eth1: # ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: 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 #- eth2: # ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off # interface_mode: trunk # vlan-id-list: [700] # storm-control-profile: rate_limit_pf1 # native-vlan-id: 100 # no-local-switching: true #- bond0: # ddp: "auto" # auto/on/off # ddp parameter is optional; options include auto or on or off; default: 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 #- eth11: # ddp: "off" # ddp parameter is optional; options include auto or on or off; default: off #- eth2: # ddp: "off" # ddp parameter is optional; options include auto or on or off; default: off ######################## # L2L3 #- eth1: # ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: off #- eth2: # ddp: "auto" # ddp parameter is optional; options include auto or on or off; default: 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 ################################## # Provide subnets instead of interface names # Interfaces will be auto-detected in each subnet # Only one of the interfaces or subnet range must # be configured. This form of input is particularly # helpful when the interface names vary in a multi-node # K8s cluster # - subnet: 10.0.3.0/24 # gateway: 10.0.3.1 # ddp: "off" # - subnet: 10.0.5.0/24 # gateway: 10.0.5.1 # ddp: "off" ################################## # fabricWorkloadInterface is applicable only for Pure L2 deployments # #fabricWorkloadInterface: #- enp59s0f1v0: # interface_mode: access # vlan-id-list: [700] #- enp59s0f1v1: # interface_mode: trunk # vlan-id-list: [800, 900] ######################### # 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" # core pattern to denote how the core file will be generated # if left empty, JCNR pods will not overwrite the default pattern corePattern: "" # path for the core file; vrouter considers /var/crashes as default value if not specified coreFilePath: /var/crash # nodeAffinity: Can be used to inject nodeAffinity for vRouter, cRPD and syslog-ng pods # You may label the nodes where we wish to deploy JCNR and inject affinity accodingly #nodeAffinity: #- key: key1 # operator: In # values: # - jcnr # cni_bin_dir: Path where the CNI binary will be put; default: /opt/cni/bin # this may be overriden in distributions other than vanilla K8s # e.g. OpenShift - you may use /var/lib/cni/bin or /etc/kubernetes/cni/net.d #cni_bin_dir: /var/lib/cni/bin # grpcTelemetryPort: use this parameter to override cRPD telemetry gRPC server default port of 50051 #grpcTelemetryPort: 50055 # grpcVrouterPort: use this parameter to override vRouter gRPC server default port of 50052 #grpcVrouterPort: 50060 # vRouterDeployerPort: use this parameter to override vRouter deployer port default port of 8081 #vRouterDeployerPort: 8082 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 # Enable bond interface configurations L2 only or L2 L3 deployment #bondInterfaceConfigs: # - name: "bond0" # mode: 1 # ACTIVE_BACKUP MODE # slaveInterfaces: # - "enp59s0f0v0" # - "enp59s0f0v1" # primaryInterface: "enp59s0f0v0" # MTU for all physical interfaces( all VF’s and PF’s) mtu: "9000" # vrouter fwd core mask # if qos is enabled, you will need to allocate 4 CPU cores (primary and siblings) cpu_core_mask: "2,3,22,23" # rate limit profiles for bum traffic on fabric interfaces in bytes per second stormControlProfiles: rate_limit_pf1: bandwidth: level: 0 #rate_limit_pf2: # bandwidth: # level: 0 dpdkCommandAdditionalArgs: "--yield_option 0" # Set ddp to enable Dynamic Device Personalization (DDP) # Provides datapath optimization at NIC for traffic like GTPU, SCTP etc. # Options include auto or on or off; default: off ddp: "auto" # Set true/false to Enable or Disable QOS, note: QOS is not supported on X710 NIC. qosEnable: false # uio driver will be vfio-pci or uio_pci_generic vrouter_dpdk_uio_driver: "vfio-pci" # agentModeType will be dpdk or xdp. set agentModeType dpdk will bringup dpdk datapath. set agentModeType to xdp to use ebpf. agentModeType: dpdk # fabricRpfCheckDisable: Set this flag to false to enable the RPF check on all the fabric interfaces of the JNCR, by default RPF check is disabled #fabricRpfCheckDisable: false #jcnr-cni: # persistConfig: set this flag to true if you wish jcnr-cni generated pod configuration to persist even after uninstallation # use this option only in case of l2 mode # default value is false if not specfied #persistConfig: true