Add app_cred_interface_type config file option

Currently the interface field in generated app creds is parsed from nova_client.endpoint_type in magnum.conf which is undesirable. We fix the issue here by adding an extra config option to the capi_helm group with a default value of 'public'.

Change-Id: I2b714a1a7429f28bfbc82177f75706e11de657d4
This commit is contained in:
sd109 2024-03-18 13:12:06 +00:00
parent b214d3b22f
commit c7b0e16ff7
2 changed files with 9 additions and 1 deletions

View File

@ -62,7 +62,7 @@ def _create_app_cred(context, cluster):
"openstack": {
"identity_api_version": 3,
"region_name": osc.cinder_region_name(),
"interface": CONF.nova_client.endpoint_type.replace("URL", ""),
"interface": CONF.capi_helm.app_cred_interface_type,
# This config item indicates whether TLS should be
# verified when connecting to the OpenStack API
"verify": CONF.drivers.verify_ca,

View File

@ -117,6 +117,14 @@ capi_helm_opts = [
"volume binding and dynamic provisioning should occur."
),
),
cfg.StrOpt(
"app_cred_interface_type",
default="public",
help=(
"The value to use in the interface field of "
"generated application credentials."
),
),
]
CONF = cfg.CONF