6.6. 将切换配置添加到 control plane


要将交换机配置添加到 control plane,您可以通过 OpenStackControlPlane CR 中的 neutron 服务配置挂载交换机 03-ml2-genericswitch.conf 配置文件和 Secret 自定义资源(CR)。

流程

  1. 在工作站上打开 OpenStackControlPlane CR 文件 openstack_control_plane.yaml
  2. ironic 服务中添加以下配置,将网络接口更改为 neutron

    spec:
      ...
      ironic:
        template:
          customServiceConfig: |
            [DEFAULT]
            default_network_interface=neutron
    Copy to Clipboard Toggle word wrap
  3. 将通用开关作为 ML2 机制驱动程序添加到 neutron 服务规格:

    apiVersion: core.openstack.org/v1beta1
    kind: OpenStackControlPlane
    metadata:
      name: openstack-control-plane
      namespace: openstack
    spec:
      secret: osp-secret
      ...
      neutron:
      ...
        template:
          ml2MechanismDrivers:
          - genericswitch
          - ovn
    Copy to Clipboard Toggle word wrap
  4. neutron 服务规格中添加 extraMounts 参数,以挂载物理网络交换机的配置:

      neutron:
      ...
        template:
          ...
          extraMounts:
          - name: switchConf
            extraVol:
            - volumes:
              - name: neutron-switch-config
                secret:
                  secretName: neutron-switch-config
              mounts:
              - name: neutron-switch-config
                mountPath: /etc/neutron/neutron.conf.d/03-ml2-genericswitch.conf
                subPath: 03-ml2-genericswitch.conf
                readOnly: true
    Copy to Clipboard Toggle word wrap
  5. 如果需要为物理网络交换机分配身份验证密钥,请将私钥文件添加到挂载中:

              mounts:
              - name: neutron-switch-config
                mountPath: /etc/neutron/neutron.conf.d/03-ml2-genericswitch.conf
                subPath: 03-ml2-genericswitch.conf
                readOnly: true
              - name: neutron-switch-config
                mountPath: /etc/neutron/<key_file_name>
                subPath: <key_file_name>
                readOnly: true
    Copy to Clipboard Toggle word wrap

    mountPath 应该与 03-ml2-genericswitch.conf 文件中为交换机设备定义的密钥文件的路径匹配。

  6. 更新 control plane:

    $ oc apply -f openstack_control_plane.yaml -n openstack
    Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat