deprecation

package
v0.1.0-latest-s...-2f942cb Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package deprecation holds the types the runtime deprecated-field-usage scanner (internal/operator/controllers) needs to check whether a deprecated field is set on a live object. The CRD-schema discovery that produces these values (walking OpenAPI schemas for "Deprecated:" descriptions, building CEL expressions and warning messages) lives in hack/tools/dpfdev's codegen tool, which generates pkg/deprecation/zz_generated_deprecated_fields.go.

Index

Constants

This section is empty.

Variables

View Source
var KnownDeprecations = []GVKDeprecations{
	{
		GVK:      schema.GroupVersionKind{Group: "operator.dpu.nvidia.com", Version: "v1alpha1", Kind: "DPFOperatorConfig"},
		ListKind: "DPFOperatorConfigList",
		Fields: []DeprecatedField{
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "dpuDetector"}, {Name: "image"}},
				Description: "Image overrides the container image used by the DPUDetector Container.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `daemon` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "dpuServiceController"}, {Name: "image"}},
				Description: "Image overrides the container image used by the DPUService controller.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `controller` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "flannel"}, {Name: "image"}},
				Description: "Images overrides the container images used by flannel\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new fields `cni` and `daemon` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "kamajiClusterManager"}, {Name: "image"}},
				Description: "Image overrides the container image used by the Kamaji Cluster Manager.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `controller` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "multus"}, {Name: "image"}},
				Description: "Image overrides the container image used by the Multus Container.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `cni` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "nvipam"}, {Name: "image"}},
				Description: "Image overrides the container image used by the NVIPAM controller.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `controller` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "overrides"}, {Name: "provisioningIssuerCASecretName"}},
				Description: "ProvisioningIssuerCASecretName overrides the CA secret of the\nprovisioning Issuer during a rotation. The provisioning certificates are\nsigned by the platform intermediate CA now, and a rotation of it is\ndriven by cert-manager rather than by repointing an Issuer, so this only\nstill pins the provisioning Issuer of the CA chain the platform\nintermediate CA is taking over from, on a cluster the upgrade has not\nfinished migrating. It has no effect once that chain is gone, which\nis every cluster installed since.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "ovsCNI"}},
				Description: "OVSCNI is the configuration for OVSCNI\n\nDeprecated: OVS CNI is installed by CNIInstaller. Remove in 27.1.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "provisioningController"}, {Name: "bfCFGTemplateConfigMap"}},
				Description: "BFCFGTemplateConfigMap is the name of a configMap containing a template\nfor the BF.cfg file used by the DPU controller. By default the\nprovisioning controller use a hardcoded BF.cfg e.g.\nhttps://github.com/NVIDIA/doca-platform/blob/release-v24.10/internal/provisioning/controllers/dpu/bfcfg/bf.cfg.template\nNote: Replacing the bf.cfg is an advanced use case. The default bf.cfg is\ndesigned for most use cases.\n\nDeprecated: BFCFGTemplateConfigMap is deprecated and will be removed in\na future release. Use enableDynamicBFCFGTemplates instead for custom\nbf.cfg templates.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "provisioningController"}, {Name: "image"}},
				Description: "Image overrides the container image used by the Provisioning controller.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `controller` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "provisioningController"}, {Name: "installInterface"}, {Name: "installViaGNOI"}},
				Description: "InstallViaGNOI is the interface used to install the BFB via GNOI\n\nDeprecated: Use InstallViaHostAgent instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "provisioningController"}, {Name: "installInterface"}, {Name: "installViaRedfish"}, {Name: "bfbRegistry"}},
				Description: "BFBRegistry is the configuration for the BFB Registry\n\nDeprecated: Use RegistryConfiguration instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "provisioningController"}, {Name: "installInterface"}, {Name: "installViaRedfish"}, {Name: "bfbRegistryAddress"}},
				Description: "BFBRegistryAddress is the address of the BFB Registry\n\nDeprecated: Use RegistryConfiguration instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "provisioningController"}, {Name: "registry"}, {Name: "address"}},
				Description: "Address is the address used to access the BFB Registry. The address must\nstart with \"http://\" or \"https://\". By default, the BFB Registry can be\naccessed via its Service. For non-kubernetes environments, this must be\nset due to the lack of kubelet on worker nodes. For zero-trust\nenvironments, this must be set so that the BFB Registry can be accessed\nfrom DPU BMC.\n\nDeprecated: Address is deprecated and will be removed in a future\nrelease.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "provisioningController"}, {Name: "registry"}, {Name: "port"}},
				Description: "Port is the port on which the registry instances will listen\n\nDeprecated: Port is deprecated and will be removed in a future release.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "serviceSetController"}, {Name: "image"}},
				Description: "Image overrides the container image used by the ServiceChainSet\nController.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `controller` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "sfcController"}, {Name: "image"}},
				Description: "Image overrides the container image used by the SFC controller.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `controller` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "sriovDevicePlugin"}, {Name: "image"}},
				Description: "Image overrides the container image used by the SRIOV Device Plugin\ncontainer.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `deviceplugin` instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "staticClusterManager"}, {Name: "image"}},
				Description: "Image overrides the container image used by the Static Cluster Manager.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse the new field `controller` instead.",
			},
		},
	},
	{
		GVK:      schema.GroupVersionKind{Group: "svc.dpu.nvidia.com", Version: "v1alpha1", Kind: "DPUDeployment"},
		ListKind: "DPUDeploymentList",
		Fields: []DeprecatedField{
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "dpus"}, {Name: "dpuSetStrategy"}, {Name: "rollingUpdate"}, {Name: "maxUnavailable"}},
				Description: "MaxUnavailable is the maximum number of DPUs that can be unavailable\nduring the update.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "dpus"}, {Name: "dpuSets", IsArray: true}, {Name: "dpuSelector"}},
				Description: "DPUSelector defines the DPUs that the DPUSet should target\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse DPUDeviceSelector instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "dpus"}, {Name: "dpuSets", IsArray: true}, {Name: "nodeSelector"}},
				Description: "NodeSelector defines the nodes that the DPUSet should target\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse DPUNodeSelector instead.",
			},
		},
	},
	{
		GVK:      schema.GroupVersionKind{Group: "provisioning.dpu.nvidia.com", Version: "v1alpha1", Kind: "DPUDevice"},
		ListKind: "DPUDeviceList",
		Fields: []DeprecatedField{
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "opn"}},
				Description: "OPN is the Ordering Part Number of the device. It's used to track the\ndevice's compatibility with different software versions. This value is\nimmutable and should not be changed once set.\nExample: \"900-9D3B4-00SV-EA0\"\n\nDeprecated: This field is deprecated and will be removed in a future\nversion. Use status.opn instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "pf0Name"}},
				Description: "PF0Name is the name of the PF0 on the device.\nThis value is immutable and should not be changed once set.\nExample: \"eth0\"\n\nDeprecated: This field is deprecated and will be removed in a future\nversion. Use status.pf0Name instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "psid"}},
				Description: "PSID is the Product Serial ID of the device.\nIt's used to track the device's lifecycle and for inventory management.\nThis value is immutable and should not be changed once set.\nExample: \"MT_0001234567\", \"MT25066004C7\"\n\nDeprecated: This field is deprecated and will be removed in a future\nversion. Use status.psid instead.",
			},
		},
	},
	{
		GVK:      schema.GroupVersionKind{Group: "provisioning.dpu.nvidia.com", Version: "v1alpha1", Kind: "DPUNode"},
		ListKind: "DPUNodeList",
		Fields: []DeprecatedField{
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "nodeDMSAddress"}},
				Description: "The IP address and port where the DMS is exposed. Only applicable if\ndpuInstallInterface is set to gNOI.\n\nDeprecated: this field is no longer used.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "nodeRebootMethod"}, {Name: "gNOI"}},
				Description: "Use the DPU's DMS interface to reboot the host.\n\nDeprecated: Use HostAgent instead.",
			},
		},
	},
	{
		GVK:      schema.GroupVersionKind{Group: "provisioning.dpu.nvidia.com", Version: "v1alpha1", Kind: "DPU"},
		ListKind: "DPUList",
		Fields: []DeprecatedField{
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "bmcIP"}},
				Description: "BMCIP is the ip address of the DPU BMC\n\nDeprecated: Use BMCIP from DPUDevice instead.",
			},
		},
	},
	{
		GVK:      schema.GroupVersionKind{Group: "svc.dpu.nvidia.com", Version: "v1alpha1", Kind: "DPUServiceChain"},
		ListKind: "DPUServiceChainList",
		Fields: []DeprecatedField{
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "clusterSelector"}},
				Description: "Select the Clusters with specific labels, ServiceChainSet CRs will be\ncreated only for these Clusters\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse DPUClusterSelector instead.",
			},
		},
	},
	{
		GVK:      schema.GroupVersionKind{Group: "svc.dpu.nvidia.com", Version: "v1alpha1", Kind: "DPUServiceInterface"},
		ListKind: "DPUServiceInterfaceList",
		Fields: []DeprecatedField{
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "clusterSelector"}},
				Description: "Select the Clusters with specific labels, ServiceInterfaceSet CRs will be\ncreated only for these Clusters\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse DPUClusterSelector instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "template"}, {Name: "spec"}, {Name: "template"}, {Name: "spec"}, {Name: "ovn"}},
				Description: "The OVN definition\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nMigrate to interfaceType=\"patch\" with spec.patch.peerBridge and\nspec.patch.peerPatchName instead.",
			},
		},
	},
	{
		GVK:      schema.GroupVersionKind{Group: "svc.dpu.nvidia.com", Version: "v1alpha1", Kind: "DPUServiceIPAM"},
		ListKind: "DPUServiceIPAMList",
		Fields: []DeprecatedField{
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "clusterSelector"}},
				Description: "ClusterSelector determines in which clusters the DPUServiceIPAM\ncontroller should apply the configuration.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse DPUClusterSelector instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "ipv4Network"}},
				Description: "IPV4Network is the configuration related to splitting a network into\nsubnets per node, each with their own gateway.\n\nDeprecated: Use Network instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "ipv4Subnet"}},
				Description: "IPV4Subnet is the configuration related to splitting a subnet into blocks\nper node. In this setup, there is a single gateway.\n\nDeprecated: Use Subnet instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "network"}, {Name: "exclusions"}},
				Description: "Exclusions is a list of IPs that should be excluded when splitting the\nCIDR into subnets per node.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse ExcludeRanges instead.",
			},
		},
	},
	{
		GVK:      schema.GroupVersionKind{Group: "provisioning.dpu.nvidia.com", Version: "v1alpha1", Kind: "DPUSet"},
		ListKind: "DPUSetList",
		Fields: []DeprecatedField{
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "dpuSelector"}},
				Description: "Select the DPU with specific labels\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.\nUse DPUDeviceSelector instead.",
			},
			{
				Segments:    []PathSegment{{Name: "spec"}, {Name: "strategy"}, {Name: "rollingUpdate"}, {Name: "maxUnavailable"}},
				Description: "MaxUnavailable is the maximum number of DPUs that can be unavailable\nduring the update.\n\nDeprecated: This field is deprecated and will be removed with v31.0.0.",
			},
		},
	},
}

KnownDeprecations lists every deprecated field found across the DPF CRDs at build time.

Functions

This section is empty.

Types

type DeprecatedField

type DeprecatedField struct {
	// Segments is the structured path to the deprecated field.
	// e.g. for spec.bar[].baz.fuzz[].old:
	// [{Name:"spec"}, {Name:"bar", IsArray:true}, {Name:"baz"}, {Name:"fuzz", IsArray:true}, {Name:"old"}]
	Segments []PathSegment
	// Description is the full description text of the field (containing the Deprecated: text)
	Description string
}

DeprecatedField represents a deprecated field found in a CRD schema.

func (DeprecatedField) IsSetIn

func (d DeprecatedField) IsSetIn(obj map[string]any) bool

IsSetIn reports whether the deprecated field is set on obj, an unstructured object (e.g. unstructured.Unstructured.Object). For an array segment, the field is considered set if it is set on ANY element of the array.

func (DeprecatedField) JSONPath

func (d DeprecatedField) JSONPath() string

JSONPath returns a human-readable path, e.g. "spec.dpuSets[].nodeSelector".

type GVKDeprecations

type GVKDeprecations struct {
	GVK      schema.GroupVersionKind
	ListKind string
	Fields   []DeprecatedField
}

GVKDeprecations groups every deprecated field found on a single CRD's storage version, keyed by GroupVersionKind. This is the shape hack/tools/dpfdev generates into zz_generated_deprecated_fields.go's KnownDeprecations for the runtime scanner to consume without needing to discover or walk CRD schemas itself.

type PathSegment

type PathSegment struct {
	Name    string
	IsArray bool
}

PathSegment represents one named segment in a JSON path. If IsArray is true, this segment is an array and iteration is needed to inspect its elements.

Jump to

Keyboard shortcuts

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