forked from opendatahub-io/opendatahub-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply OVMS template from dashboard for RHODS only (opendatahub-io#382) Splitting distributed workflows component into codeflare and ray. Fixes opendatahub-io#369 (opendatahub-io#377) Add ODHDashboardconfig in dasboard component Add admin group for downstream Signed-off-by: Wen Zhou <wenzhou@redhat.com> (cherry picked from commit 1c16d59)
- Loading branch information
1 parent
7931847
commit 9997738
Showing
21 changed files
with
256 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package codeflare | ||
|
||
import ( | ||
"github.com/opendatahub-io/opendatahub-operator/v2/components" | ||
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/deploy" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
) | ||
|
||
const ( | ||
ComponentName = "codeflare" | ||
CodeflarePath = deploy.DefaultManifestPath + "/" + "codeflare-stack" + "/base" | ||
) | ||
|
||
var imageParamMap = map[string]string{} | ||
|
||
type CodeFlare struct { | ||
components.Component `json:""` | ||
} | ||
|
||
func (d *CodeFlare) SetImageParamsMap(imageMap map[string]string) map[string]string { | ||
imageParamMap = imageMap | ||
return imageParamMap | ||
} | ||
|
||
func (d *CodeFlare) GetComponentName() string { | ||
return ComponentName | ||
} | ||
|
||
// Verifies that CodeFlare implements ComponentInterface | ||
var _ components.ComponentInterface = (*CodeFlare)(nil) | ||
|
||
func (d *CodeFlare) ReconcileComponent(owner metav1.Object, client client.Client, scheme *runtime.Scheme, enabled bool, namespace string) error { | ||
|
||
// Update image parameters | ||
if err := deploy.ApplyImageParams(CodeflarePath, imageParamMap); err != nil { | ||
return err | ||
} | ||
|
||
// Deploy Codeflare | ||
err := deploy.DeployManifestsFromPath(owner, client, ComponentName, | ||
CodeflarePath, | ||
namespace, | ||
scheme, enabled) | ||
|
||
return err | ||
|
||
} | ||
|
||
func (in *CodeFlare) DeepCopyInto(out *CodeFlare) { | ||
*out = *in | ||
out.Component = in.Component | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package ray | ||
|
||
import ( | ||
"github.com/opendatahub-io/opendatahub-operator/v2/components" | ||
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/deploy" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
) | ||
|
||
const ( | ||
ComponentName = "ray" | ||
RayPath = deploy.DefaultManifestPath + "/" + "ray/operator" + "/base" | ||
) | ||
|
||
var imageParamMap = map[string]string{} | ||
|
||
type Ray struct { | ||
components.Component `json:""` | ||
} | ||
|
||
func (d *Ray) SetImageParamsMap(imageMap map[string]string) map[string]string { | ||
imageParamMap = imageMap | ||
return imageParamMap | ||
} | ||
|
||
func (d *Ray) GetComponentName() string { | ||
return ComponentName | ||
} | ||
|
||
// Verifies that Ray implements ComponentInterface | ||
var _ components.ComponentInterface = (*Ray)(nil) | ||
|
||
func (d *Ray) ReconcileComponent(owner metav1.Object, client client.Client, scheme *runtime.Scheme, enabled bool, namespace string) error { | ||
|
||
// Update image parameters | ||
if err := deploy.ApplyImageParams(RayPath, imageParamMap); err != nil { | ||
return err | ||
} | ||
// Deploy Ray Operator | ||
err := deploy.DeployManifestsFromPath(owner, client, ComponentName, | ||
RayPath, | ||
namespace, | ||
scheme, enabled) | ||
return err | ||
|
||
} | ||
|
||
func (in *Ray) DeepCopyInto(out *Ray) { | ||
*out = *in | ||
out.Component = in.Component | ||
} |
Oops, something went wrong.