trustyai-explainability / trustyai-service-operator

Kubernetes operator for the TrustyAI service
Apache License 2.0
2 stars 16 forks source link

TrustyAI CRs not deleting after ODH deletion #218

Open RobGeada opened 6 months ago

RobGeada commented 6 months ago

TrustyAIService CRs are stuck in deletion after the ODH install (and therefore the TrustyAI Operator) is deleted. To delete the TrustyAIService CR, their finalizers have to be manually patched

RobGeada commented 6 months ago

Example orphaned CR:

apiVersion: trustyai.opendatahub.io/v1alpha1
kind: TrustyAIService
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"trustyai.opendatahub.io/v1alpha1","kind":"TrustyAIService","metadata":{"annotations":{},"name":"trustyai-service","namespace":"opendatahub-model"},"spec":{"data":{"filename":"data.csv","format":"CSV"},"metrics":{"schedule":"5s"},"storage":{"folder":"/inputs","format":"PVC","size":"1Gi"}}}
  deletionTimestamp: '2024-02-26T14:04:03Z'
  resourceVersion: '63540142'
  name: trustyai-service
  uid: 05c24a4c-3347-4988-91a4-087706b242f4
  deletionGracePeriodSeconds: 0
  creationTimestamp: '2024-02-26T14:03:04Z'
  generation: 2
  managedFields:
    - apiVersion: trustyai.opendatahub.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:kubectl.kubernetes.io/last-applied-configuration': {}
        'f:spec':
          .: {}
          'f:data':
            .: {}
            'f:filename': {}
            'f:format': {}
          'f:metrics':
            .: {}
            'f:schedule': {}
          'f:storage':
            .: {}
            'f:folder': {}
            'f:format': {}
            'f:size': {}
      manager: kubectl-client-side-apply
      operation: Update
      time: '2024-02-26T14:03:04Z'
    - apiVersion: trustyai.opendatahub.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:finalizers':
            .: {}
            'v:"trustyai.opendatahub.io/finalizer"': {}
      manager: manager
      operation: Update
      time: '2024-02-26T14:03:04Z'
  namespace: opendatahub-model
  finalizers:
    - trustyai.opendatahub.io/finalizer
spec:
  data:
    filename: data.csv
    format: CSV
  metrics:
    schedule: 5s
  storage:
    folder: /inputs
    format: PVC
    size: 1Gi