Skip to content

Commit 006d75e

Browse files
adding version to ocmaddonstatus
1 parent 79272bc commit 006d75e

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

apis/addons/v1alpha1/addons_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ type OCMAddOnStatus struct {
398398
AddonID string `json:"addonID"`
399399
// Correlation ID for co-relating current AddonCR revision and reported status.
400400
CorrelationID string `json:"correlationID"`
401+
// Version of the addon
402+
AddonVersion string `json:"version"`
401403
// Reported addon status conditions
402404
StatusConditions []AddOnStatusCondition `json:"statusConditions"`
403405
// The most recent generation a status update was based on.

docs/api-reference/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ Struct used to hash the reported addon status (along with correlationID).
422422
| ----- | ----------- | ------ | -------- |
423423
| addonID | ID of the addon. | string | true |
424424
| correlationID | Correlation ID for co-relating current AddonCR revision and reported status. | string | true |
425+
| version | Version of the addon | string | true |
425426
| statusConditions | Reported addon status conditions | [][AddOnStatusCondition.addons.managed.openshift.io/v1alpha1](#addonstatusconditionaddonsmanagedopenshiftiov1alpha1) | true |
426427
| observedGeneration | The most recent generation a status update was based on. | int64 | true |
427428

internal/controllers/addon/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ func HashCurrentAddonStatus(addon *addonsv1alpha1.Addon) string {
557557
ocmAddonStatus := addonsv1alpha1.OCMAddOnStatus{
558558
AddonID: addon.Name,
559559
CorrelationID: addon.Spec.CorrelationID,
560+
AddonVersion: addon.Spec.Version,
560561
StatusConditions: mapToAddonStatusConditions(addon.Status.Conditions),
561562
}
562563
return hashOCMAddonStatus(ocmAddonStatus)

0 commit comments

Comments
 (0)