bfcfg

package
v0.1.0-latest-stable Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxBFSize is the maximum size of the bf.cfg file is expanded to 128k since DOCA 2.8
	MaxBFSize     = 1024 * 128
	MaxTrustedSfs = 10

	// TemplateLabel is the label that identifies a ConfigMap as a dynamic bf.cfg template.
	// ConfigMaps with this label set to "true" are candidates for dynamic template resolution.
	TemplateLabel = cutil.DPUProvisioningPrefix + "bfcfg-template"

	// TemplateBFBNameAnnotation is the annotation on a bf.cfg template ConfigMap specifying the target BFB name.
	TemplateBFBNameAnnotation = cutil.DPUProvisioningPrefix + "bfcfg-template-bfb-name"

	// TemplateBFBNamespaceAnnotation is the annotation on a bf.cfg template ConfigMap specifying the target BFB namespace.
	TemplateBFBNamespaceAnnotation = cutil.DPUProvisioningPrefix + "bfcfg-template-bfb-namespace"

	// TemplateClusterNameAnnotation is the annotation on a bf.cfg template ConfigMap specifying the target DPUCluster name.
	TemplateClusterNameAnnotation = cutil.DPUProvisioningPrefix + "bfcfg-template-cluster-name"

	// TemplateClusterNamespaceAnnotation is the annotation on a bf.cfg template ConfigMap specifying the target DPUCluster namespace.
	TemplateClusterNamespaceAnnotation = cutil.DPUProvisioningPrefix + "bfcfg-template-cluster-namespace"

	// TemplateDPUFlavorNameAnnotation is the annotation on a bf.cfg template ConfigMap specifying the target DPUFlavor name.
	TemplateDPUFlavorNameAnnotation = cutil.DPUProvisioningPrefix + "bfcfg-template-dpuflavor-name"

	// TemplateDPUFlavorNamespaceAnnotation is the annotation on a bf.cfg template ConfigMap specifying the target DPUFlavor namespace.
	TemplateDPUFlavorNamespaceAnnotation = cutil.DPUProvisioningPrefix + "bfcfg-template-dpuflavor-namespace"
)

Variables

View Source
var (
	//go:embed bf.cfg.template
	DefaultBFCFGTemplateData []byte
	// ConfigMapDataKey is the key in the configmap where the bfb.cfg.template is stored if overwritten.
	ConfigMapDataKey = "BF_CFG_TEMPLATE"
)

Functions

func Generate

func Generate(flavor *provisioningv1.DPUFlavor, params cloudinit.Params, templateData []byte) ([]byte, error)

Generate renders a bf.cfg from a custom template. The caller must ensure flavor fields have already been applied to params (e.g. via ResolveParams).

func GenerateBFConfigWithParams

func GenerateBFConfigWithParams(ctx context.Context, controllerContext *util.ControllerContext, dpu *provisioningv1.DPU, flavor *provisioningv1.DPUFlavor, params cloudinit.Params, dpfOperatorConfig operatorv1.DPFOperatorConfig) ([]byte, error)

Types

type BFCFGData

type BFCFGData struct {
	cloudinit.Params
	BFGCFGParams []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL