diff --git a/.golangci.yml b/.golangci.yml
index d70db8433..aab0828c1 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -50,6 +50,18 @@ linters:
- lll
- goconst
path: bmc/*
+ # The Endpoint resource is deprecated (see issue #1018). The operator still
+ # serves existing Endpoint objects and the endpointRef access path, so these
+ # legacy consumers reference the type until the resource is fully removed.
+ - linters:
+ - staticcheck
+ text: "SA1019.*metalv1alpha1\\.Endpoint"
+ # BMC.spec.endpointRef references the deprecated Endpoint resource. The operator
+ # still serves existing BMCs that use it, so legacy consumers reference the field
+ # until the Endpoint resource is fully removed.
+ - linters:
+ - staticcheck
+ text: "SA1019.*\\.EndpointRef is deprecated"
paths:
- third_party$
- builtin$
diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/bmcspec.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/bmcspec.go
index 83cdcadc9..e85ed2fde 100644
--- a/api/v1alpha1/applyconfiguration/api/v1alpha1/bmcspec.go
+++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/bmcspec.go
@@ -17,6 +17,10 @@ type BMCSpecApplyConfiguration struct {
// BMCUUID is the unique identifier for the BMC as defined in Redfish API.
BMCUUID *string `json:"bmcUUID,omitempty"`
// EndpointRef is a reference to the Endpoint object that contains the network access information for the BMC.
+ //
+ // Deprecated: The Endpoint resource is deprecated. Specify the network access inline via
+ // access (an InlineEndpoint carrying the MAC address and IP) instead of referencing an
+ // Endpoint object.
EndpointRef *v1.LocalObjectReference `json:"endpointRef,omitempty"`
// Endpoint specifies inline network access details for the BMC.
Endpoint *InlineEndpointApplyConfiguration `json:"access,omitempty"`
diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/endpoint.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/endpoint.go
index 6b6105d85..3dd449379 100644
--- a/api/v1alpha1/applyconfiguration/api/v1alpha1/endpoint.go
+++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/endpoint.go
@@ -17,7 +17,11 @@ import (
// EndpointApplyConfiguration represents a declarative configuration of the Endpoint type for use
// with apply.
//
-// Endpoint is the Schema for the endpoints API
+// # Endpoint is the Schema for the endpoints API
+//
+// Deprecated: The Endpoint resource is deprecated. Model the same information
+// inline via BMC.spec.access (an InlineEndpoint carrying the MAC address and IP)
+// instead of creating a separate Endpoint object.
type EndpointApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
diff --git a/api/v1alpha1/bmc_types.go b/api/v1alpha1/bmc_types.go
index 81f74a682..2668a951f 100644
--- a/api/v1alpha1/bmc_types.go
+++ b/api/v1alpha1/bmc_types.go
@@ -30,6 +30,10 @@ type BMCSpec struct {
BMCUUID string `json:"bmcUUID,omitempty"`
// EndpointRef is a reference to the Endpoint object that contains the network access information for the BMC.
+ //
+ // Deprecated: The Endpoint resource is deprecated. Specify the network access inline via
+ // access (an InlineEndpoint carrying the MAC address and IP) instead of referencing an
+ // Endpoint object.
// +optional
// +kubebuilder:validation:Optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="endpointRef is immutable"
diff --git a/api/v1alpha1/endpoint_types.go b/api/v1alpha1/endpoint_types.go
index 54994e0b2..9bf84aaeb 100644
--- a/api/v1alpha1/endpoint_types.go
+++ b/api/v1alpha1/endpoint_types.go
@@ -31,8 +31,13 @@ type EndpointStatus struct {
// +kubebuilder:printcolumn:name="MACAddress",type=string,JSONPath=`.spec.macAddress`
// +kubebuilder:printcolumn:name="IP",type=string,JSONPath=`.spec.ip`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
+// +kubebuilder:deprecatedversion:warning="metal.ironcore.dev/v1alpha1 Endpoints are deprecated; specify the network access inline via BMC.spec.access (an InlineEndpoint with macAddress and ip) instead"
// Endpoint is the Schema for the endpoints API
+//
+// Deprecated: The Endpoint resource is deprecated. Model the same information
+// inline via BMC.spec.access (an InlineEndpoint carrying the MAC address and IP)
+// instead of creating a separate Endpoint object.
type Endpoint struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
diff --git a/config/crd/bases/metal.ironcore.dev_bmcs.yaml b/config/crd/bases/metal.ironcore.dev_bmcs.yaml
index c3022281f..3503c3097 100644
--- a/config/crd/bases/metal.ironcore.dev_bmcs.yaml
+++ b/config/crd/bases/metal.ironcore.dev_bmcs.yaml
@@ -140,8 +140,12 @@ spec:
- port
type: object
endpointRef:
- description: EndpointRef is a reference to the Endpoint object that
- contains the network access information for the BMC.
+ description: |-
+ EndpointRef is a reference to the Endpoint object that contains the network access information for the BMC.
+
+ Deprecated: The Endpoint resource is deprecated. Specify the network access inline via
+ access (an InlineEndpoint carrying the MAC address and IP) instead of referencing an
+ Endpoint object.
properties:
name:
default: ""
diff --git a/config/crd/bases/metal.ironcore.dev_endpoints.yaml b/config/crd/bases/metal.ironcore.dev_endpoints.yaml
index 3587fc864..69a194939 100644
--- a/config/crd/bases/metal.ironcore.dev_endpoints.yaml
+++ b/config/crd/bases/metal.ironcore.dev_endpoints.yaml
@@ -26,10 +26,19 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
+ deprecated: true
+ deprecationWarning: metal.ironcore.dev/v1alpha1 Endpoints are deprecated; specify
+ the network access inline via BMC.spec.access (an InlineEndpoint with macAddress
+ and ip) instead
name: v1alpha1
schema:
openAPIV3Schema:
- description: Endpoint is the Schema for the endpoints API
+ description: |-
+ Endpoint is the Schema for the endpoints API
+
+ Deprecated: The Endpoint resource is deprecated. Model the same information
+ inline via BMC.spec.access (an InlineEndpoint carrying the MAC address and IP)
+ instead of creating a separate Endpoint object.
properties:
apiVersion:
description: |-
diff --git a/dist/chart/templates/crd/metal.ironcore.dev_bmcs.yaml b/dist/chart/templates/crd/metal.ironcore.dev_bmcs.yaml
index 831229924..ec35dba31 100755
--- a/dist/chart/templates/crd/metal.ironcore.dev_bmcs.yaml
+++ b/dist/chart/templates/crd/metal.ironcore.dev_bmcs.yaml
@@ -146,8 +146,12 @@ spec:
- port
type: object
endpointRef:
- description: EndpointRef is a reference to the Endpoint object that
- contains the network access information for the BMC.
+ description: |-
+ EndpointRef is a reference to the Endpoint object that contains the network access information for the BMC.
+
+ Deprecated: The Endpoint resource is deprecated. Specify the network access inline via
+ access (an InlineEndpoint carrying the MAC address and IP) instead of referencing an
+ Endpoint object.
properties:
name:
default: ""
diff --git a/dist/chart/templates/crd/metal.ironcore.dev_endpoints.yaml b/dist/chart/templates/crd/metal.ironcore.dev_endpoints.yaml
index 664b7fcd0..b2d8dca33 100755
--- a/dist/chart/templates/crd/metal.ironcore.dev_endpoints.yaml
+++ b/dist/chart/templates/crd/metal.ironcore.dev_endpoints.yaml
@@ -32,10 +32,19 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
+ deprecated: true
+ deprecationWarning: metal.ironcore.dev/v1alpha1 Endpoints are deprecated; specify
+ the network access inline via BMC.spec.access (an InlineEndpoint with macAddress
+ and ip) instead
name: v1alpha1
schema:
openAPIV3Schema:
- description: Endpoint is the Schema for the endpoints API
+ description: |-
+ Endpoint is the Schema for the endpoints API
+
+ Deprecated: The Endpoint resource is deprecated. Model the same information
+ inline via BMC.spec.access (an InlineEndpoint carrying the MAC address and IP)
+ instead of creating a separate Endpoint object.
properties:
apiVersion:
description: |-
diff --git a/docs/api-reference/api.md b/docs/api-reference/api.md
index 0e99c7925..d5c83c960 100644
--- a/docs/api-reference/api.md
+++ b/docs/api-reference/api.md
@@ -635,7 +635,7 @@ _Appears in:_
| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `bmcUUID` _string_ | BMCUUID is the unique identifier for the BMC as defined in Redfish API. | | Optional: \{\}
|
-| `endpointRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#localobjectreference-v1-core)_ | EndpointRef is a reference to the Endpoint object that contains the network access information for the BMC. | | Optional: \{\}
|
+| `endpointRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#localobjectreference-v1-core)_ | EndpointRef is a reference to the Endpoint object that contains the network access information for the BMC.
Deprecated: The Endpoint resource is deprecated. Specify the network access inline via
access (an InlineEndpoint carrying the MAC address and IP) instead of referencing an
Endpoint object. | | Optional: \{\}
|
| `access` _[InlineEndpoint](#inlineendpoint)_ | Endpoint specifies inline network access details for the BMC. | | Optional: \{\}
|
| `bmcSecretRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.36/#localobjectreference-v1-core)_ | BMCSecretRef is a reference to the BMCSecret object that contains the credentials
required to access the BMC. | | |
| `protocol` _[Protocol](#protocol)_ | Protocol specifies the protocol to be used for communicating with the BMC. | | |
@@ -984,6 +984,10 @@ _Appears in:_
Endpoint is the Schema for the endpoints API
+Deprecated: The Endpoint resource is deprecated. Model the same information
+inline via BMC.spec.access (an InlineEndpoint carrying the MAC address and IP)
+instead of creating a separate Endpoint object.
+
diff --git a/docs/concepts/endpoints.md b/docs/concepts/endpoints.md
index 0bb92ac99..04fccc4d0 100644
--- a/docs/concepts/endpoints.md
+++ b/docs/concepts/endpoints.md
@@ -1,5 +1,10 @@
# Endpoints
+> **Deprecation Notice:** The `Endpoint` resource is deprecated and will be removed in a future release.
+> The same information (MAC address and IP) can be modeled inline via
+> [`BMC.spec.access`](bmcs.md) (an `InlineEndpoint`) instead of creating a separate `Endpoint` object.
+> Creating or updating an `Endpoint` surfaces an admission warning pointing to this replacement.
+
The Endpoint Custom Resource Definition (CRD) is a Kubernetes resource used to represent and identify devices or
entities within an out-of-band (OOB) network. It serves as a means to catalog and manage devices such as Baseboard
Management Controllers (BMCs) by capturing their unique identifiers, specifically the MAC address and IP address.
diff --git a/docs/concepts/servermaintenance.md b/docs/concepts/servermaintenance.md
index a3d7471eb..deffde812 100644
--- a/docs/concepts/servermaintenance.md
+++ b/docs/concepts/servermaintenance.md
@@ -66,4 +66,4 @@ spec:
If `policy: OwnerApproval` and no `ok-to-maintenance` label exists on the `ServerClaim`, this `ServerMaintenance`
remains `Pending`, and the `Server` stays as is. Once the label is added (or if the operator setting
`alwaysPerformMaintenance` is enabled), the `metal-operator` transitions the `Server` to `Maintenance`, and the
-maintenance operator performs the maintenance task.
+maintenance operator performs the maintenance task.
\ No newline at end of file
diff --git a/docs/concepts/servers.md b/docs/concepts/servers.md
index ca1810de4..24e69b675 100644
--- a/docs/concepts/servers.md
+++ b/docs/concepts/servers.md
@@ -169,4 +169,4 @@ spec:
address: "192.168.100.10"
bmcSecretRef:
name: my-bmc-secret
-```
+```
\ No newline at end of file
diff --git a/docs/usage/metalctl.md b/docs/usage/metalctl.md
index b1ebf9e16..3f7571231 100644
--- a/docs/usage/metalctl.md
+++ b/docs/usage/metalctl.md
@@ -89,4 +89,4 @@ This can now be achieved with the following procedure:
#### Dry run
With `--dry-run` option you can dry-run the move action by only printing logs without taking any actual actions. Use
-`--verbose` flag to enable verbose logging.
+`--verbose` flag to enable verbose logging.
\ No newline at end of file