Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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$
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha1/applyconfiguration/api/v1alpha1/bmcspec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion api/v1alpha1/applyconfiguration/api/v1alpha1/endpoint.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions api/v1alpha1/bmc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/endpoint_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
8 changes: 6 additions & 2 deletions config/crd/bases/metal.ironcore.dev_bmcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down
11 changes: 10 additions & 1 deletion config/crd/bases/metal.ironcore.dev_endpoints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Comment thread
afritzler marked this conversation as resolved.
properties:
apiVersion:
description: |-
Expand Down
8 changes: 6 additions & 2 deletions dist/chart/templates/crd/metal.ironcore.dev_bmcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down
11 changes: 10 additions & 1 deletion dist/chart/templates/crd/metal.ironcore.dev_endpoints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
6 changes: 5 additions & 1 deletion docs/api-reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: \{\} <br /> |
| `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: \{\} <br /> |
| `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.<br />Deprecated: The Endpoint resource is deprecated. Specify the network access inline via<br />access (an InlineEndpoint carrying the MAC address and IP) instead of referencing an<br />Endpoint object. | | Optional: \{\} <br /> |
| `access` _[InlineEndpoint](#inlineendpoint)_ | Endpoint specifies inline network access details for the BMC. | | Optional: \{\} <br /> |
| `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<br />required to access the BMC. | | |
| `protocol` _[Protocol](#protocol)_ | Protocol specifies the protocol to be used for communicating with the BMC. | | |
Expand Down Expand Up @@ -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.




Expand Down
5 changes: 5 additions & 0 deletions docs/concepts/endpoints.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/servermaintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion docs/concepts/servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ spec:
address: "192.168.100.10"
bmcSecretRef:
name: my-bmc-secret
```
```
2 changes: 1 addition & 1 deletion docs/usage/metalctl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading