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

RHOAI 2.14 Upstream Sync #355

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7b2e431
deps: uplift controller_gen and envtest version (#1198)
zdtsw Aug 26, 2024
30fb432
deps: uplift crd-ref-docs to 0.1.0 (#1206)
zdtsw Aug 27, 2024
12867c1
docs: update old docs (#1188)
zdtsw Aug 28, 2024
28408f1
fix: add check for all platform offering on components (#1205)
zdtsw Aug 28, 2024
07dbeed
test: update e2e testcases (#1208)
zdtsw Aug 30, 2024
b60842e
tests: e2e: testApplicationCreation cleanup (#1215)
ykaliuta Sep 3, 2024
3754a54
feat: improve Operator performance by using caching to reduce api cal…
zdtsw Sep 3, 2024
29f13df
tests: e2e: do not wait for deployments of disabled components (#1213)
ykaliuta Sep 3, 2024
a4f5847
feat: enable trustyai to use different manifests path (#1218)
zdtsw Sep 4, 2024
5365261
tests: performance and time tuning in e2e (#1216)
zdtsw Sep 5, 2024
3eaedd3
fix(cache): since we add new secret from modelreg with cache, we need…
zdtsw Sep 5, 2024
bda7c2b
fix: dashboard image not get set in downstream due to devFlags config…
zdtsw Sep 5, 2024
9e227e4
add StevenTobin to owners (#1225)
StevenTobin Sep 9, 2024
cecb070
feat: enable Trusty's Bias Feature Flag (#1220)
zdtsw Sep 12, 2024
e2232bd
feat(tracker): allows to define ownerReferences for FeatureTrackers (…
bartoszmajsak Sep 13, 2024
8f6857c
Rename GetPlatform functions to not reflect implementation (#1232)
ykaliuta Sep 13, 2024
ee01058
feat: set DSCI application namespace to be immutable (#1222)
zdtsw Sep 13, 2024
ce46787
chore: simplifies generateCertSecret func (#1233)
bartoszmajsak Sep 13, 2024
371af7f
fix(test): makes DSCI-dependent tests self-contained (#1235)
bartoszmajsak Sep 14, 2024
9ce7a3c
refactor(feature): decouples Feature from client (#1234)
bartoszmajsak Sep 16, 2024
34bd8a5
Update manifests for 2.14
VaishnaviHire Sep 16, 2024
78e140c
Fix lint errors
VaishnaviHire Sep 16, 2024
76c835e
Update api docs
VaishnaviHire Sep 16, 2024
99eb5da
Update api docs
VaishnaviHire Sep 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 2.12.0
VERSION ?= 2.14.0
# IMAGE_TAG_BASE defines the opendatahub.io namespace and part of the image name for remote images.
# This variable is used to construct full image tags for bundle and catalog images.
#
Expand Down Expand Up @@ -69,13 +69,13 @@ CRD_REF_DOCS ?= $(LOCALBIN)/crd-ref-docs
YQ ?= $(LOCALBIN)/yq
## Tool Versions
KUSTOMIZE_VERSION ?= v5.0.2
CONTROLLER_GEN_VERSION ?= v0.9.2
CONTROLLER_GEN_VERSION ?= v0.16.1
OPERATOR_SDK_VERSION ?= v1.31.0
GOLANGCI_LINT_VERSION ?= v1.60.2
YQ_VERSION ?= v4.12.2
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.2
ENVTEST_PACKAGE_VERSION = v0.0.0-20240320141353-395cfc7486e6
ENVTEST_K8S_VERSION = 1.31.0
ENVTEST_PACKAGE_VERSION = v0.0.0-20240813183042-b901db121e1f
CRD_REF_DOCS_VERSION = 0.1.0

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
Expand Down
1 change: 1 addition & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ aliases:
- MarianMacik
- mattmahoneyrh
- Sara4994
- StevenTobin
- VaishnaviHire
- ykaliuta
- zdtsw
1 change: 0 additions & 1 deletion apis/datasciencecluster/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/dscinitialization/v1/dscinitialization_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
type DSCInitializationSpec struct {
// +kubebuilder:default:=redhat-ods-applications
// Namespace for applications to be installed, non-configurable, default to "redhat-ods-applications"
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ApplicationsNamespace is immutable"
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1
ApplicationsNamespace string `json:"applicationsNamespace"`
// Enable monitoring on specified namespace
Expand Down
1 change: 0 additions & 1 deletion apis/dscinitialization/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/features/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/infrastructure/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ spec:
description: Namespace for applications to be installed, non-configurable,
default to "redhat-ods-applications"
type: string
x-kubernetes-validations:
- message: ApplicationsNamespace is immutable
rule: self == oldSelf
devFlags:
description: Internal development useful field to test customizations.
This is not recommended to be used in production environment.
Expand Down
6 changes: 3 additions & 3 deletions bundle/manifests/rhods-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ metadata:
categories: AI/Machine Learning, Big Data
certified: "False"
containerImage: quay.io/opendatahub/opendatahub-operator:v2.0.0
createdAt: "2024-08-01T14:26:51Z"
createdAt: "2024-09-16T16:41:56Z"
features.operators.openshift.io/disconnected: "true"
features.operators.openshift.io/fips-compliant: "false"
features.operators.openshift.io/proxy-aware: "false"
Expand Down Expand Up @@ -169,7 +169,7 @@ metadata:
operators.operatorframework.io/builder: operator-sdk-v1.31.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/red-hat-data-services/rhods-operator
name: rhods-operator.v2.12.0
name: rhods-operator.v2.14.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -1791,7 +1791,7 @@ spec:
minKubeVersion: 1.25.0
provider:
name: Red Hat
version: 2.12.0
version: 2.14.0
webhookdefinitions:
- admissionReviewVersions:
- v1
Expand Down
1 change: 0 additions & 1 deletion components/codeflare/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions components/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (c *Component) GetManagementState() operatorv1.ManagementState {
return c.ManagementState
}

func (c *Component) Cleanup(_ context.Context, _ client.Client, _ *dsciv1.DSCInitializationSpec) error {
func (c *Component) Cleanup(_ context.Context, _ client.Client, _ metav1.Object, _ *dsciv1.DSCInitializationSpec) error {
// noop
return nil
}
Expand Down Expand Up @@ -80,7 +80,7 @@ type ManifestsConfig struct {
type ComponentInterface interface {
ReconcileComponent(ctx context.Context, cli client.Client, logger logr.Logger,
owner metav1.Object, DSCISpec *dsciv1.DSCInitializationSpec, platform cluster.Platform, currentComponentStatus bool) error
Cleanup(ctx context.Context, cli client.Client, DSCISpec *dsciv1.DSCInitializationSpec) error
Cleanup(ctx context.Context, cli client.Client, owner metav1.Object, DSCISpec *dsciv1.DSCInitializationSpec) error
GetComponentName() string
GetManagementState() operatorv1.ManagementState
OverrideManifests(ctx context.Context, platform cluster.Platform) error
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (d *Dashboard) ReconcileComponent(ctx context.Context,
if err := d.cleanOauthClient(ctx, cli, dscispec, currentComponentExist, l); err != nil {
return err
}
if d.DevFlags != nil {
if d.DevFlags != nil && len(d.DevFlags.Manifests) != 0 {
// Download manifests and update paths
if err := d.OverrideManifests(ctx, platform); err != nil {
return err
Expand Down
1 change: 0 additions & 1 deletion components/dashboard/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/datasciencepipelines/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions components/kserve/kserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ func (k *Kserve) ReconcileComponent(ctx context.Context, cli client.Client,
monitoringEnabled := dscispec.Monitoring.ManagementState == operatorv1.Managed

if !enabled {
if err := k.removeServerlessFeatures(ctx, dscispec); err != nil {
if err := k.removeServerlessFeatures(ctx, cli, owner, dscispec); err != nil {
return err
}
} else {
// Configure dependencies
if err := k.configureServerless(ctx, cli, l, dscispec); err != nil {
if err := k.configureServerless(ctx, cli, l, owner, dscispec); err != nil {
return err
}
if k.DevFlags != nil {
Expand All @@ -122,7 +122,7 @@ func (k *Kserve) ReconcileComponent(ctx context.Context, cli client.Client,
}
}

if err := k.configureServiceMesh(ctx, cli, dscispec); err != nil {
if err := k.configureServiceMesh(ctx, cli, owner, dscispec); err != nil {
return fmt.Errorf("failed configuring service mesh while reconciling kserve component. cause: %w", err)
}

Expand Down Expand Up @@ -176,10 +176,10 @@ func (k *Kserve) ReconcileComponent(ctx context.Context, cli client.Client,
return nil
}

func (k *Kserve) Cleanup(ctx context.Context, cli client.Client, instance *dsciv1.DSCInitializationSpec) error {
if removeServerlessErr := k.removeServerlessFeatures(ctx, instance); removeServerlessErr != nil {
func (k *Kserve) Cleanup(ctx context.Context, cli client.Client, owner metav1.Object, instance *dsciv1.DSCInitializationSpec) error {
if removeServerlessErr := k.removeServerlessFeatures(ctx, cli, owner, instance); removeServerlessErr != nil {
return removeServerlessErr
}

return k.removeServiceMeshConfigurations(ctx, cli, instance)
return k.removeServiceMeshConfigurations(ctx, cli, owner, instance)
}
15 changes: 8 additions & 7 deletions components/kserve/kserve_config_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/hashicorp/go-multierror"
operatorv1 "github.com/openshift/api/operator/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"

dsciv1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/dscinitialization/v1"
Expand Down Expand Up @@ -118,14 +119,14 @@ func (k *Kserve) setDefaultDeploymentMode(ctx context.Context, cli client.Client
return nil
}

func (k *Kserve) configureServerless(ctx context.Context, cli client.Client, logger logr.Logger, instance *dsciv1.DSCInitializationSpec) error {
func (k *Kserve) configureServerless(ctx context.Context, cli client.Client, logger logr.Logger, owner metav1.Object, instance *dsciv1.DSCInitializationSpec) error {
switch k.Serving.ManagementState {
case operatorv1.Unmanaged: // Bring your own CR
logger.Info("Serverless CR is not configured by the operator, we won't do anything")

case operatorv1.Removed: // we remove serving CR
logger.Info("existing Serverless CR (owned by operator) will be removed")
if err := k.removeServerlessFeatures(ctx, instance); err != nil {
if err := k.removeServerlessFeatures(ctx, cli, owner, instance); err != nil {
return err
}

Expand All @@ -147,19 +148,19 @@ func (k *Kserve) configureServerless(ctx context.Context, cli client.Client, log
return dependOpsErrors
}

serverlessFeatures := feature.ComponentFeaturesHandler(k.GetComponentName(), instance.ApplicationsNamespace, k.configureServerlessFeatures(instance))
serverlessFeatures := feature.ComponentFeaturesHandler(owner, k.GetComponentName(), instance.ApplicationsNamespace, k.configureServerlessFeatures(instance))

if err := serverlessFeatures.Apply(ctx); err != nil {
if err := serverlessFeatures.Apply(ctx, cli); err != nil {
return err
}
}
return nil
}

func (k *Kserve) removeServerlessFeatures(ctx context.Context, instance *dsciv1.DSCInitializationSpec) error {
serverlessFeatures := feature.ComponentFeaturesHandler(k.GetComponentName(), instance.ApplicationsNamespace, k.configureServerlessFeatures(instance))
func (k *Kserve) removeServerlessFeatures(ctx context.Context, cli client.Client, owner metav1.Object, instance *dsciv1.DSCInitializationSpec) error {
serverlessFeatures := feature.ComponentFeaturesHandler(owner, k.GetComponentName(), instance.ApplicationsNamespace, k.configureServerlessFeatures(instance))

return serverlessFeatures.Delete(ctx)
return serverlessFeatures.Delete(ctx, cli)
}

func checkDependentOperators(ctx context.Context, cli client.Client) *multierror.Error {
Expand Down
15 changes: 8 additions & 7 deletions components/kserve/servicemesh_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"path"

operatorv1 "github.com/openshift/api/operator/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

Expand All @@ -16,23 +17,23 @@ import (
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/feature/servicemesh"
)

func (k *Kserve) configureServiceMesh(ctx context.Context, cli client.Client, dscispec *dsciv1.DSCInitializationSpec) error {
func (k *Kserve) configureServiceMesh(ctx context.Context, cli client.Client, owner metav1.Object, dscispec *dsciv1.DSCInitializationSpec) error {
if dscispec.ServiceMesh != nil {
if dscispec.ServiceMesh.ManagementState == operatorv1.Managed && k.GetManagementState() == operatorv1.Managed {
serviceMeshInitializer := feature.ComponentFeaturesHandler(k.GetComponentName(), dscispec.ApplicationsNamespace, k.defineServiceMeshFeatures(ctx, cli, dscispec))
return serviceMeshInitializer.Apply(ctx)
serviceMeshInitializer := feature.ComponentFeaturesHandler(owner, k.GetComponentName(), dscispec.ApplicationsNamespace, k.defineServiceMeshFeatures(ctx, cli, dscispec))
return serviceMeshInitializer.Apply(ctx, cli)
}
if dscispec.ServiceMesh.ManagementState == operatorv1.Unmanaged && k.GetManagementState() == operatorv1.Managed {
return nil
}
}

return k.removeServiceMeshConfigurations(ctx, cli, dscispec)
return k.removeServiceMeshConfigurations(ctx, cli, owner, dscispec)
}

func (k *Kserve) removeServiceMeshConfigurations(ctx context.Context, cli client.Client, dscispec *dsciv1.DSCInitializationSpec) error {
serviceMeshInitializer := feature.ComponentFeaturesHandler(k.GetComponentName(), dscispec.ApplicationsNamespace, k.defineServiceMeshFeatures(ctx, cli, dscispec))
return serviceMeshInitializer.Delete(ctx)
func (k *Kserve) removeServiceMeshConfigurations(ctx context.Context, cli client.Client, owner metav1.Object, dscispec *dsciv1.DSCInitializationSpec) error {
serviceMeshInitializer := feature.ComponentFeaturesHandler(owner, k.GetComponentName(), dscispec.ApplicationsNamespace, k.defineServiceMeshFeatures(ctx, cli, dscispec))
return serviceMeshInitializer.Delete(ctx, cli)
}

func (k *Kserve) defineServiceMeshFeatures(ctx context.Context, cli client.Client, dscispec *dsciv1.DSCInitializationSpec) feature.FeaturesProvider {
Expand Down
1 change: 0 additions & 1 deletion components/kserve/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/kueue/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/modelmeshserving/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/ray/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/trainingoperator/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 17 additions & 5 deletions components/trustyai/trustyai.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import (
var (
ComponentName = "trustyai"
ComponentPathName = "trustyai-service-operator"
Path = deploy.DefaultManifestPath + "/" + ComponentPathName + "/base"
PathUpstream = deploy.DefaultManifestPath + "/" + ComponentPathName + "/overlays/odh"
PathDownstream = deploy.DefaultManifestPath + "/" + ComponentPathName + "/overlays/rhoai"
OverridePath = ""
)

// Verifies that TrustyAI implements ComponentInterface.
Expand All @@ -45,7 +47,7 @@ func (t *TrustyAI) OverrideManifests(ctx context.Context, _ cluster.Platform) er
if manifestConfig.SourcePath != "" {
defaultKustomizePath = manifestConfig.SourcePath
}
Path = filepath.Join(deploy.DefaultManifestPath, ComponentPathName, defaultKustomizePath)
OverridePath = filepath.Join(deploy.DefaultManifestPath, ComponentPathName, defaultKustomizePath)
}
return nil
}
Expand All @@ -60,6 +62,13 @@ func (t *TrustyAI) ReconcileComponent(ctx context.Context, cli client.Client, lo
"trustyaiServiceImage": "RELATED_IMAGE_ODH_TRUSTYAI_SERVICE_IMAGE",
"trustyaiOperatorImage": "RELATED_IMAGE_ODH_TRUSTYAI_SERVICE_OPERATOR_IMAGE",
}
entryPath := map[cluster.Platform]string{
cluster.SelfManagedRhods: PathDownstream,
cluster.ManagedRhods: PathDownstream,
cluster.OpenDataHub: PathUpstream,
cluster.Unknown: PathUpstream,
}[platform]

l := t.ConfigComponentLogger(logger, ComponentName, dscispec)

enabled := t.GetManagementState() == operatorv1.Managed
Expand All @@ -71,15 +80,18 @@ func (t *TrustyAI) ReconcileComponent(ctx context.Context, cli client.Client, lo
if err := t.OverrideManifests(ctx, platform); err != nil {
return err
}
if OverridePath != "" {
entryPath = OverridePath
}
}
if (dscispec.DevFlags == nil || dscispec.DevFlags.ManifestsUri == "") && (t.DevFlags == nil || len(t.DevFlags.Manifests) == 0) {
if err := deploy.ApplyParams(Path, imageParamMap); err != nil {
return fmt.Errorf("failed to update image %s: %w", Path, err)
if err := deploy.ApplyParams(entryPath, imageParamMap); err != nil {
return fmt.Errorf("failed to update image %s: %w", entryPath, err)
}
}
}
// Deploy TrustyAI Operator
if err := deploy.DeployManifestsFromPath(ctx, cli, owner, Path, dscispec.ApplicationsNamespace, t.GetComponentName(), enabled); err != nil {
if err := deploy.DeployManifestsFromPath(ctx, cli, owner, entryPath, dscispec.ApplicationsNamespace, t.GetComponentName(), enabled); err != nil {
return err
}
l.Info("apply manifests done")
Expand Down
1 change: 0 additions & 1 deletion components/trustyai/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/workbenches/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion components/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading