Skip to content

Commit

Permalink
Switch to lustre-fs-operator v1beta1 (#190)
Browse files Browse the repository at this point in the history
Signed-off-by: Dean Roehrich <[email protected]>
  • Loading branch information
roehrich-hpe authored May 9, 2023
1 parent cbf389e commit 296b0d1
Show file tree
Hide file tree
Showing 193 changed files with 4,409 additions and 9,623 deletions.
20 changes: 10 additions & 10 deletions controllers/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (

dwsv1alpha2 "github.com/HewlettPackard/dws/api/v1alpha2"
dwparse "github.com/HewlettPackard/dws/utils/dwdparse"
lusv1alpha1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1alpha1"
lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1"
nnfv1alpha1 "github.com/NearNodeFlash/nnf-sos/api/v1alpha1"
)

Expand Down Expand Up @@ -1035,15 +1035,15 @@ var _ = Describe("Integration Test", func() {

})

var lustre *lusv1alpha1.LustreFileSystem
var lustre *lusv1beta1.LustreFileSystem

BeforeEach(func() {
lustre = &lusv1alpha1.LustreFileSystem{
lustre = &lusv1beta1.LustreFileSystem{
ObjectMeta: metav1.ObjectMeta{
Name: "lustre-test",
Namespace: corev1.NamespaceDefault,
},
Spec: lusv1alpha1.LustreFileSystemSpec{
Spec: lusv1beta1.LustreFileSystemSpec{
Name: "lustre",
MgsNids: "172.0.0.1@tcp",
MountRoot: "/lus/maui",
Expand Down Expand Up @@ -1634,16 +1634,16 @@ var _ = Describe("Integration Test", func() {
When("using copy_in without jobdw", func() {
// Create a fake global lustre file system.
var (
lustre *lusv1alpha1.LustreFileSystem
lustre *lusv1beta1.LustreFileSystem
)

BeforeEach(func() {
lustre = &lusv1alpha1.LustreFileSystem{
lustre = &lusv1beta1.LustreFileSystem{
ObjectMeta: metav1.ObjectMeta{
Name: "maui",
Namespace: corev1.NamespaceDefault,
},
Spec: lusv1alpha1.LustreFileSystemSpec{
Spec: lusv1beta1.LustreFileSystemSpec{
Name: "maui",
MountRoot: "/lus/maui",
MgsNids: "10.0.0.1@tcp",
Expand All @@ -1670,16 +1670,16 @@ var _ = Describe("Integration Test", func() {
When("using copy_in without persistentdw", func() {
// Create a fake global lustre file system.
var (
lustre *lusv1alpha1.LustreFileSystem
lustre *lusv1beta1.LustreFileSystem
)

BeforeEach(func() {
lustre = &lusv1alpha1.LustreFileSystem{
lustre = &lusv1beta1.LustreFileSystem{
ObjectMeta: metav1.ObjectMeta{
Name: "maui",
Namespace: corev1.NamespaceDefault,
},
Spec: lusv1alpha1.LustreFileSystemSpec{
Spec: lusv1beta1.LustreFileSystemSpec{
Name: "maui",
MountRoot: "/lus/maui",
MgsNids: "10.0.0.1@tcp",
Expand Down
4 changes: 2 additions & 2 deletions controllers/nnf_workflow_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (
dwsv1alpha2 "github.com/HewlettPackard/dws/api/v1alpha2"
"github.com/HewlettPackard/dws/utils/dwdparse"
"github.com/HewlettPackard/dws/utils/updater"
lusv1alpha1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1alpha1"
lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1"
nnfv1alpha1 "github.com/NearNodeFlash/nnf-sos/api/v1alpha1"
"github.com/NearNodeFlash/nnf-sos/controllers/metrics"
)
Expand Down Expand Up @@ -551,7 +551,7 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo

} else if lustre := r.findLustreFileSystemForPath(ctx, param, r.Log); lustre != nil {
storageReference = &corev1.ObjectReference{
Kind: reflect.TypeOf(lusv1alpha1.LustreFileSystem{}).Name(),
Kind: reflect.TypeOf(lusv1beta1.LustreFileSystem{}).Name(),
Name: lustre.Name,
Namespace: lustre.Namespace,
}
Expand Down
6 changes: 3 additions & 3 deletions controllers/nnf_workflow_controller_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

dwsv1alpha2 "github.com/HewlettPackard/dws/api/v1alpha2"
"github.com/HewlettPackard/dws/utils/dwdparse"
lusv1alpha1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1alpha1"
lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1"
nnfv1alpha1 "github.com/NearNodeFlash/nnf-sos/api/v1alpha1"

"github.com/go-logr/logr"
Expand Down Expand Up @@ -643,8 +643,8 @@ func (r *NnfWorkflowReconciler) createNnfStorage(ctx context.Context, workflow *
return nnfStorage, nil
}

func (r *NnfWorkflowReconciler) findLustreFileSystemForPath(ctx context.Context, path string, log logr.Logger) *lusv1alpha1.LustreFileSystem {
lustres := &lusv1alpha1.LustreFileSystemList{}
func (r *NnfWorkflowReconciler) findLustreFileSystemForPath(ctx context.Context, path string, log logr.Logger) *lusv1beta1.LustreFileSystem {
lustres := &lusv1beta1.LustreFileSystemList{}
if err := r.List(ctx, lustres); err != nil {
log.Error(err, "Failed to list lustre file systems")
return nil
Expand Down
12 changes: 6 additions & 6 deletions controllers/nnf_workflow_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"k8s.io/apimachinery/pkg/types"

dwsv1alpha2 "github.com/HewlettPackard/dws/api/v1alpha2"
lusv1alpha1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1alpha1"
lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1"
nnfv1alpha1 "github.com/NearNodeFlash/nnf-sos/api/v1alpha1"
)

Expand Down Expand Up @@ -405,7 +405,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() {

// Create a fake global lustre file system.
var (
lustre *lusv1alpha1.LustreFileSystem
lustre *lusv1beta1.LustreFileSystem
)

BeforeEach(func() {
Expand All @@ -419,12 +419,12 @@ var _ = Describe("NNF Workflow Unit Tests", func() {
})

BeforeEach(func() {
lustre = &lusv1alpha1.LustreFileSystem{
lustre = &lusv1beta1.LustreFileSystem{
ObjectMeta: metav1.ObjectMeta{
Name: "maui",
Namespace: corev1.NamespaceDefault,
},
Spec: lusv1alpha1.LustreFileSystemSpec{
Spec: lusv1beta1.LustreFileSystemSpec{
Name: "maui",
MountRoot: "/lus/maui",
MgsNids: "10.0.0.1@tcp",
Expand Down Expand Up @@ -472,7 +472,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() {
Expect(dm.Spec.Source.StorageReference).ToNot(BeNil())
Expect(dm.Spec.Source.StorageReference).To(MatchFields(IgnoreExtras,
Fields{
"Kind": Equal(reflect.TypeOf(lusv1alpha1.LustreFileSystem{}).Name()),
"Kind": Equal(reflect.TypeOf(lusv1beta1.LustreFileSystem{}).Name()),
"Name": Equal(lustre.ObjectMeta.Name),
"Namespace": Equal(lustre.Namespace),
}))
Expand Down Expand Up @@ -541,7 +541,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() {
Expect(dm.Spec.Source.StorageReference).ToNot(BeNil())
Expect(dm.Spec.Source.StorageReference).To(MatchFields(IgnoreExtras,
Fields{
"Kind": Equal(reflect.TypeOf(lusv1alpha1.LustreFileSystem{}).Name()),
"Kind": Equal(reflect.TypeOf(lusv1beta1.LustreFileSystem{}).Name()),
"Name": Equal(lustre.ObjectMeta.Name),
"Namespace": Equal(lustre.Namespace),
}))
Expand Down
4 changes: 2 additions & 2 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (
"github.com/ghodss/yaml"

dwsv1alpha2 "github.com/HewlettPackard/dws/api/v1alpha2"
lusv1alpha1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1alpha1"
lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1"
nnf "github.com/NearNodeFlash/nnf-ec/pkg"

nnfv1alpha1 "github.com/NearNodeFlash/nnf-sos/api/v1alpha1"
Expand Down Expand Up @@ -149,7 +149,7 @@ var _ = BeforeSuite(func() {
err = dwsv1alpha2.AddToScheme(testEnv.Scheme)
Expect(err).NotTo(HaveOccurred())

err = lusv1alpha1.AddToScheme(testEnv.Scheme)
err = lusv1beta1.AddToScheme(testEnv.Scheme)
Expect(err).NotTo(HaveOccurred())

err = nnfv1alpha1.AddToScheme(scheme.Scheme)
Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.19

require (
github.com/HewlettPackard/dws v0.0.0-20230503202417-89973dea4801
github.com/NearNodeFlash/lustre-fs-operator v0.0.0-20230426150127-b7cba32758e5
github.com/NearNodeFlash/lustre-fs-operator v0.0.0-20230505195900-67d257c69292
github.com/NearNodeFlash/nnf-ec v0.0.0-20230427164720-dc73727a986f
github.com/ghodss/yaml v1.0.0
github.com/go-logr/logr v1.2.3
github.com/go-logr/logr v1.2.4
github.com/google/uuid v1.3.0
github.com/kubeflow/common v0.4.6
github.com/kubeflow/mpi-operator v0.3.1-0.20230228224311-5946ef415759
Expand All @@ -19,7 +19,7 @@ require (
k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1
k8s.io/client-go v0.26.1
k8s.io/mount-utils v0.26.1
k8s.io/mount-utils v0.27.1
sigs.k8s.io/controller-runtime v0.14.5
)

Expand All @@ -42,7 +42,7 @@ require (
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/golang/glog v1.1.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
Expand Down Expand Up @@ -75,26 +75,26 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
go.chromium.org/luci v0.0.0-20230227223707-c4460eb434d8 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.7.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.8-0.20221117013220-504804fb50de // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.26.1 // indirect
k8s.io/component-base v0.26.1 // indirect
k8s.io/klog/v2 v2.90.0 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
Loading

0 comments on commit 296b0d1

Please sign in to comment.