GCP導入のためのCloud-Native Router Helmチャートのカスタマイズ
Juniper Cloud-Native RouterをL3モードでGCP上に導入して運用できます。展開モードを設定するには、展開前に values.yaml
ファイル内の適切な属性を編集します。
Helm チャートの属性と説明
Juniper_Cloud_Native_Router_release-number/helmchart/values.yaml
ファイルを使用して Helm チャートをカスタマイズします。HEMLチャートの構成キーは、以下の表のとおりです。
キー | 追加のキー 構成の説明 | |
---|---|---|
記帳 | vRouter、cRPD、およびjcnr-cniコンテナイメージがホストされるDockerレジストリを定義します。デフォルト値は Juniper Enterprise Hub に設定されています。 | |
リポジトリ | vRouter、cRPD、およびjcnr-cniコンテナイメージのリポジトリパスを定義します。これはグローバルキーであり、「common」セクションの「repository」パスよりも優先されます。デフォルト値は jcnr-container-prod/ です |
|
imagePullSecret (英語) | (オプション)レジストリ認証資格情報を定義します。認証情報は、ジュニパーリポジトリまたはプライベートレジストリのいずれかに設定できます。詳細は、「 リポジトリ資格証明の構成 」トピックを参照してください。 | |
registryCredentials | Docker レジストリ資格情報の Base64 表現。 | |
secretName (シークレット名) | 作成される Secret オブジェクトの名前。 | |
コモン | vRouter、cRPD、およびjcnr-cniコンテナイメージのリポジトリパスとタグを定義します。 | |
リポジトリ | リポジトリ パスを定義します。グローバルリポジトリキーが定義されている場合、優先されます。 デフォルト値は |
|
タグ | イメージ タグを定義します。デフォルト値は、Cloud-Native Routerのリリースバージョンに適したタグ番号に設定されています。 | |
レプリカ | (オプション)cRPDのレプリカの数を示します。値を指定しない場合は、デフォルト値の 1 が考慮されます。 このキーの値は、マルチノードクラスタに対して指定する必要があり、Cloud-Native Routerを導入する必要があるノード数と一致する必要があります。 |
|
storageClass | GCP デプロイには適用されません。 |
|
awsリージョン | GCP デプロイには適用されません。 | |
noLocalSwitching | GCP デプロイには適用されません。 | |
ファブリックインターフェイス | DPDK にバインドするインターフェイスの一覧を指定します。インターフェイス名の代わりにサブネットを指定することもできます。インターフェイス名とサブネットの両方が指定されている場合、インターフェイス名がサブネット/ゲートウェイの組み合わせよりも優先されます。サブネット/ゲートウェイの組み合わせは、マルチノード クラスタでインターフェイス名が異なる場合に便利です。
手記:
GCPのファブリックインターフェイスを設定するには、L3のみセクションを使用します。[L2 のみ(L2 only)] セクションと [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 デプロイには適用されません。 | |
no-local-switching | GCP デプロイには適用されません。 | |
fabricワークロードインターフェイス | GCP デプロイには適用されません。 | |
log_level | ログの重大度を定義します。使用可能な値オプションは、DEBUG、INFO、WARN、および ERR です。
手記:
ジュニパーサポートから変更するように指示されない限り、log_levelはINFOに設定したままにしておきます。 |
|
log_path | 定義されたディレクトリには、contrail-vrouter-agent.log、contrail-vrouter-dpdk.logなど、Cloud-Native Routerに関連するさまざまな記述ログが格納されます。 |
|
syslog_notifications | syslog-ng で生成された通知を JSON 形式で保存するファイルへの絶対パスを示します。 |
|
コアパターン | コア ファイルの生成方法を示すコア パターンを示します。この設定を空白のままにすると、Cloud-Native Routerポッドはデフォルトパターンを上書きしません。
手記:
JCNR をデプロイする前に、ホストで corePattern 値を設定します。 |
|
coreFileパス | コア・ファイルのパスを示します。値を空白のままにすると、vRouter は /var/crashes をデフォルト値と見なします。 | |
nodeAffinity | (オプション)ノードのラベルを定義して、vRouter Pod を配置する場所を決定します。デフォルトでは、vRouter Pod はクラスタのすべてのノードにデプロイされます。 以下の例では、ノードアフィニティラベルは「key1=jcnr」と定義されています。このラベルは、Cloud-Native Routerを導入する必要がある各ノードに適用する必要があります。 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 Pod がクラッシュまたは再起動した場合にインターフェイスが元の状態に復元されます。 | |
vRouterDeployerPort | (オプション)デフォルト値は 8081 です。デフォルトポートが利用できない場合に上書きするように設定します。 | |
bondInterfaceConfigs (ボンドインターフェイス設定) | GCP デプロイには適用されません。 | |
MTU | すべての物理インターフェイス(VFおよびPF)のMTU(最大伝送単位)値。デフォルト値は 9000 です。 | |
cpu_core_mask | vRouter フォワード コア マスクを示します。qos が有効になっている場合は、4 つの CPU コア (プライマリと兄弟) を割り当てる必要があります。 |
|
stormControlProfiles | GCP デプロイには適用されません。 | |
dpdkコマンド追加引数 |
|
追加の 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 デプロイには適用されません。 | |
qos有効化 | GCP デプロイの場合は false に設定します。 |
|
vrouter_dpdk_uio_driver | uio ドライバは vfio-pci です。 |
|
agentModeType (エージェントモードタイプ) |
|
dpdk または xdp を指定できます。agentModeType を dpdk に設定すると、dpdk データパスが表示されます。agentModeType を xdp に設定すると、ebpf が使用されます。デフォルト値は dpdk です。 |
fabricRpfCheckDisable |
|
JNCR のすべてのファブリック インターフェイスで RPF チェックを有効にするには、このフラグを false に設定します。デフォルトでは、RPF チェックは無効になっています。 |
persistConfig |
|
jcnr-cni で生成されたポッド構成をアンインストール後も保持する場合は、このフラグを true に設定します。オプションは、L2モードでのみ設定する必要があります。デフォルト値は false です。 |
GCPにCloud-Native Routerをインストールする場合は、 dpdkCommandAdditionalArgs
キーを更新し、 tx
記述子と rx
記述子を256に設定します。例えば:
dpdkCommandAdditionalArgs: "--yield_option 0 --dpdk_txd_sz 256 --dpdk_rxd_sz 256"
サンプル Helm チャート
GCP Cloud-Native RouterのHelmチャートのサンプルを以下に示します。
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