Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Managed cluster events inventory for global hub manager #911

Merged
merged 3 commits into from
May 13, 2024

Conversation

yanmxa
Copy link
Member

@yanmxa yanmxa commented May 8, 2024

Summary

Provide the events inventory for managed clusters. The cluster event from the managed hub:

apiVersion: v1
items:
- action: AvailableUnknown
  apiVersion: v1
  eventTime: "2024-05-07T12:33:27.502217Z"
  firstTimestamp: null
  involvedObject:
    apiVersion: cluster.open-cluster-management.io/v1
    kind: ManagedCluster
    name: globalhub-cluster1
    namespace: globalhub-cluster1
    resourceVersion: "747936"
    uid: 39c1aeff-0f51-48f0-a380-2b36defa3f59
  kind: Event
  lastTimestamp: null
  message: The managed cluster (globalhub-cluster1) cannot connect to the hub cluster.
  metadata:
    creationTimestamp: "2024-05-07T12:33:27Z"
    name: globalhub-cluster1.17cd34e8c8b27fdd
    namespace: globalhub-cluster1
    resourceVersion: "754506"
    uid: c3c1ea9d-183e-4e7c-bb44-537f316669a6
  reason: AvailableUnknown
  reportingComponent: registration-controller
  reportingInstance: registration-controller-cluster-manager-registration-controller-6794cf54d9-j7lgm
  source: {}
  type: Warning
- action: Available
  apiVersion: v1
  eventTime: "2024-05-07T12:34:07.319090Z"
  firstTimestamp: null
  involvedObject:
    apiVersion: cluster.open-cluster-management.io/v1
    kind: ManagedCluster
    name: globalhub-cluster1
    namespace: globalhub-cluster1
    resourceVersion: "754531"
    uid: 39c1aeff-0f51-48f0-a380-2b36defa3f59
  kind: Event
  lastTimestamp: null
  message: The managed cluster (globalhub-cluster1) is available now
  metadata:
    creationTimestamp: "2024-05-07T12:34:07Z"
    name: globalhub-cluster1.17cd34f21203e39b
    namespace: globalhub-cluster1
    resourceVersion: "754951"
    uid: d1383786-f39a-4460-ace0-7dba464ced62
  reason: Available
  reportingComponent: klusterlet-agent
  reportingInstance: klusterlet-agent-klusterlet-agent-9f7f5d4d8-644hj
  source: {}
  type: Normal
- action: AvailableUnknown
  apiVersion: v1
  eventTime: "2024-05-07T12:40:59.895652Z"
  firstTimestamp: null
  involvedObject:
    apiVersion: cluster.open-cluster-management.io/v1
    kind: ManagedCluster
    name: globalhub-cluster1
    namespace: globalhub-cluster1
    resourceVersion: "755295"
    uid: 39c1aeff-0f51-48f0-a380-2b36defa3f59
  kind: Event
  lastTimestamp: null
  message: The managed cluster (globalhub-cluster1) cannot connect to the hub cluster.
  metadata:
    creationTimestamp: "2024-05-07T12:40:59Z"
    name: globalhub-cluster1.17cd35521d72897b
    namespace: globalhub-cluster1
    resourceVersion: "758945"
    uid: bf52a104-63ae-420c-a0fb-24aaa109c552
  reason: AvailableUnknown
  reportingComponent: registration-controller
  reportingInstance: registration-controller-cluster-manager-registration-controller-6794cf54d9-j7lgm
  source: {}
  type: Warning
kind: List
metadata:
  resourceVersion: ""

Deprecated source filed in event: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#event-v125

Related issue(s)

References # https://issues.redhat.com/browse/ACM-9676

@yanmxa yanmxa changed the title ✨ Managed cluster events inventory ✨ Managed cluster events inventory for global hub manager May 9, 2024
@yanmxa
Copy link
Member Author

yanmxa commented May 9, 2024

/cc @clyang82 @ldpliu

yanmxa added 3 commits May 9, 2024 18:12
Signed-off-by: myan <myan@redhat.com>
Signed-off-by: myan <myan@redhat.com>
Signed-off-by: myan <myan@redhat.com>
@yanmxa
Copy link
Member Author

yanmxa commented May 9, 2024

/retest

1 similar comment
@yanmxa
Copy link
Member Author

yanmxa commented May 10, 2024

/retest

leaf_hub_name character varying(256) NOT NULL,
message text,
reason text,
reporting_controller text,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean source is not recommended? use reporting_controller instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we need to modify the policy event table?

@yanmxa yanmxa requested a review from clyang82 May 10, 2024 11:06
Copy link
Contributor

@clyang82 clyang82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

openshift-ci bot commented May 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clyang82, yanmxa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yanmxa
Copy link
Member Author

yanmxa commented May 13, 2024

/test sonarcloud

Copy link

sonarcloud bot commented May 13, 2024

@openshift-merge-bot openshift-merge-bot bot merged commit ed91da8 into stolostron:main May 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants