Merge pull request #54490 from ceph/nvmeof-controllerid-spec

mgr/cephadm: Expose nvmeof gateway configuration parameters through specifications

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Aviv Caro <Aviv.Caro@ibm.com>
This commit is contained in:
Adam King 2023-11-16 19:44:52 -05:00 committed by GitHub
commit 4998173909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View File

@ -7,6 +7,9 @@ port = {{ port }}
enable_auth = {{ spec.enable_auth }}
state_update_notify = True
state_update_interval_sec = 5
min_controller_id = {{ spec.min_controller_id }}
max_controller_id = {{ spec.max_controller_id }}
enable_spdk_discovery_controller = {{ spec.enable_spdk_discovery_controller }}
[ceph]
pool = {{ spec.pool }}

View File

@ -390,6 +390,9 @@ port = {default_port}
enable_auth = False
state_update_notify = True
state_update_interval_sec = 5
min_controller_id = 1
max_controller_id = 65519
enable_spdk_discovery_controller = False
[ceph]
pool = {pool}

View File

@ -1248,6 +1248,9 @@ class NvmeofServiceSpec(ServiceSpec):
port: Optional[int] = None,
pool: Optional[str] = None,
enable_auth: bool = False,
min_controller_id: Optional[str] = '1',
max_controller_id: Optional[str] = '65519',
enable_spdk_discovery_controller: Optional[bool] = False,
server_key: Optional[str] = None,
server_cert: Optional[str] = None,
client_key: Optional[str] = None,
@ -1288,6 +1291,12 @@ class NvmeofServiceSpec(ServiceSpec):
self.group = group
#: ``enable_auth`` enables user authentication on nvmeof gateway
self.enable_auth = enable_auth
#: ``min_controller_id`` minimum controller id used by SPDK, essential for multipath
self.min_controller_id = min_controller_id
#: ``max_controller_id`` maximum controller id used by SPDK, essential for multipath
self.max_controller_id = max_controller_id
#: ``enable_spdk_discovery_controller`` SPDK or ceph-nvmeof discovery service
self.enable_spdk_discovery_controller = enable_spdk_discovery_controller
#: ``server_key`` gateway server key
self.server_key = server_key or './server.key'
#: ``server_cert`` gateway server certificate