Skip to content

Commit

Permalink
Reflect current Release in the Management status
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Pavlov <[email protected]>
  • Loading branch information
Kshatrix committed Oct 7, 2024
1 parent 852e7b0 commit 63a8a9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha1/management_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ type ManagementStatus struct {
AvailableProviders Providers `json:"availableProviders,omitempty"`
// Components indicates the status of installed HMC components and CAPI providers.
Components map[string]ComponentStatus `json:"components,omitempty"`
// Release indicates the current Release object.
Release string `json:"release,omitempty"`
}

// ComponentStatus is the status of Management component installation
Expand Down
1 change: 1 addition & 0 deletions internal/controller/management_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func (r *ManagementReconciler) Update(ctx context.Context, management *hmc.Manag
management.Status.ObservedGeneration = management.Generation
management.Status.AvailableProviders = detectedProviders
management.Status.Components = detectedComponents
management.Status.Release = management.Spec.Release
if err := r.Status().Update(ctx, management); err != nil {
errs = errors.Join(errs, fmt.Errorf("failed to update status for Management %s: %w",
management.Name, err))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ spec:
description: ObservedGeneration is the last observed generation.
format: int64
type: integer
release:
description: Release indicates the current Release object.
type: string
type: object
type: object
served: true
Expand Down

0 comments on commit 63a8a9f

Please sign in to comment.