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

Operator should emite lifecycle events #127

Closed
ruivieira opened this issue Oct 17, 2023 · 0 comments · Fixed by #139
Closed

Operator should emite lifecycle events #127

ruivieira opened this issue Oct 17, 2023 · 0 comments · Fixed by #139
Assignees
Labels
kind/enhancement New feature or request rhods-2.5

Comments

@ruivieira
Copy link
Member

ruivieira commented Oct 17, 2023

Add Kubernetes events to the TrustyAIService:

PVCCreated
InferenceServiceConfigured
ServiceMonitorCreated

The Ready condition has also been refactored, in order to be set only at the end of a successful (for the Readiness criteria) reconcilition.

By moving the Readiness check as the last step of the reconciliation, this PR also addresses #76.

Validation

Assuming

  • A namespace test
  • A TrustyAIService deployed in test

Running this script

#!/bin/bash

cr_name="trustyai-service"
cr_type="TrustyAIService"
NAMESPACE="test"

# Events
declare -a events=("PVCCreated" "InferenceServiceConfigured" "ServiceMonitorCreated")

for event in "${events[@]}"; do
  event_count=$(kubectl get events -n ${NAMESPACE} --field-selector involvedObject.name="$cr_name",involvedObject.kind="$cr_type" | grep "$event" | wc -l | xargs)
  
  if [ "$event_count" -gt 0 ]; then
      echo "$event: present, count: $event_count"
  else
      echo "$event: MISSING"
  fi
done

Should return whether the events were emited. The result will depend on the deployment status.
e.g. if the TrustyAIService was successfully deployed, but there's still no InferenceService, the result should be:

PVCCreated: present, count: 1
InferenceServiceConfigured: MISSING
ServiceMonitorCreated: present, count: 1
@ruivieira ruivieira added the kind/enhancement New feature or request label Oct 17, 2023
@ruivieira ruivieira added this to the Release 1.11.0 (Operator) milestone Oct 17, 2023
@ruivieira ruivieira self-assigned this Oct 17, 2023
@ruivieira ruivieira moved this from Todo to In Progress in TrustyAI planning Oct 26, 2023
@ruivieira ruivieira linked a pull request Nov 3, 2023 that will close this issue
@ruivieira ruivieira moved this from In Progress to In Review in TrustyAI planning Nov 3, 2023
@github-project-automation github-project-automation bot moved this from In Review to Done in TrustyAI planning Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request rhods-2.5
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant