Skip to content

Commit

Permalink
feat: introduces Features DSL (#8)
Browse files Browse the repository at this point in the history
- easy builder to define what particular feature consists of
- enables the use of existing YAML manifests
- allows the definition of additional resources programmatically with a simple func registration
- cleanup functions are now part of each feature and are called one after the other
- each feature has its own resource tracker object
- ability to test smaller parts of the whole thing by using `Feature`s in integration tests
  • Loading branch information
bartoszmajsak committed Sep 6, 2023
1 parent dbecd77 commit 3043502
Show file tree
Hide file tree
Showing 30 changed files with 1,487 additions and 1,024 deletions.
9 changes: 9 additions & 0 deletions apis/ossm.plugins.kubeflow.org/v1alpha1/ossm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ type OssmResourceTracker struct {
Status OssmResourceTrackerStatus `json:"status,omitempty"`
}

func (o *OssmResourceTracker) ToOwnerReference() metav1.OwnerReference {
return metav1.OwnerReference{
APIVersion: o.APIVersion,
Kind: o.Kind,
Name: o.Name,
UID: o.UID,
}
}

// OssmResourceTrackerSpec defines the desired state of OssmResourceTracker
type OssmResourceTrackerSpec struct {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ spec:
description: OssmPluginSpec defines the extra data provided by the Openshift
Service Mesh Plugin in KfDef spec.
properties:
appNamespace:
description: Additional non-user facing fields (should not be copied
to the CRD)
type: string
auth:
properties:
authorino:
Expand Down
4 changes: 2 additions & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: quay.io/opendatahub/opendatahub-operator
newTag: dev-0.0.1
newName: quay.io/maistra-dev/opendatahub-operator
newTag: dev-0.0.6
2 changes: 1 addition & 1 deletion pkg/kfapp/coordinator/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ func (kfapp *coordinator) Delete(resources kftypesv3.ResourceEnum) error {
}
} else {
ossmInstaller := p.(*ossm.OssmInstaller)
return ossmInstaller.CleanupOwnedResources()
return ossmInstaller.CleanupResources()
}
}

Expand Down
250 changes: 0 additions & 250 deletions pkg/kfapp/ossm/cleanup.go

This file was deleted.

Loading

0 comments on commit 3043502

Please sign in to comment.