Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions images/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
####
# This script generate server config file dynamically from VF PCI address
# given in Environment varible exported by device plugin in following
# format: PCIDEVICE_INTEL_COM_INTEL_ENP24S0F0=0000:18:02.2
# This script generates a server config file dynamically from VF PCI address
# provided by network device plugin. The environment variable is in the format:
# PCIDEVICE_<RESOURCE_NAME>=<PCI_ADDRESSES>
# E.g - PCIDEVICE_INTEL_COM_INTEL_ENP24S0F0=0000:18:02.2
#
# Device plugin also exposes a variable in the format of:
# PCIDEVICE_<RESOURCE_NAME>_INFO which contains additional information about
# the allocated devices. Information in that variable is not needed by this script
# and so it is ignored.
####
rawpci=$(env | grep PCIDEVICE_ | awk -F'=' '{ print $2 }')
rawpci=$(env | grep -P 'PCIDEVICE_[A-Z0-9_]{1,}(?<!_INFO)=' | awk -F'=' '{ print $2 }')
pciids=(${rawpci//,/ })

SERVER_CONF_FILE=/opt/dcf/server_conf.yaml
Expand Down