opendatahub-io / model-registry-operator

Apache License 2.0
3 stars 17 forks source link

feat: set authorino config properties in odh overlay from odh operator configmap auth-refs, fixes RHOAIENG-5076 #130

Closed dhirajsb closed 2 weeks ago

dhirajsb commented 3 weeks ago

Description

ODH operator writes authorino auth config to a configmap auth-refs in the same namespace as the odh component operators Set authorino config properties in odh overlay from this configmap Fixes RHOAIENG-5076

How Has This Been Tested?

Tested by creating operator image locally and using the ODH overlay to test whether configmap properties are injected and used correctly in the operator for a model registry with the yaml:

apiVersion: modelregistry.opendatahub.io/v1alpha1
kind: ModelRegistry
metadata:
  annotations:
  labels:
    app.kubernetes.io/created-by: model-registry-operator
    app.kubernetes.io/instance: modelregistry-sample
    app.kubernetes.io/managed-by: kustomize
    app.kubernetes.io/name: modelregistry
    app.kubernetes.io/part-of: model-registry-operator
  name: modelregistry-sample
  namespace: odh-model-registries
spec:
  grpc: {}
  rest: {}
  istio:
    gateway:
      grpc:
        tls: {}
      rest:
        tls: {}
  mysql:
    database: model_registry
    host: model-registry-db
    passwordSecret:
      key: database-password
      name: model-registry-db
    port: 3306
    skipDBCreation: false
    sslRootCertificateSecret:
      key: ca.crt
      name: model-registry-db-credential
    username: mlmduser

The operator automatically populates the missing auth config properties.

Merge criteria:

dhirajsb commented 3 weeks ago

@rareddy this fix will set the last default properties from odh

dhirajsb commented 2 weeks ago

@Al-Pragliola good observation on the deepcopy/patch. Do you see any obvious memory issues right now that we need to address immediately? Can you create an issue to address this post MVP? Thanks. :pray: