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

Move DataMovementManager from nnf-dm and rename to NnfDataMovementManager #237

Merged
merged 4 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
10 changes: 5 additions & 5 deletions api/v1alpha1/nnf_datamovement_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
DataMovementNamespace = "nnf-dm-system"
)

// NnfDataMovementSpec defines the desired state of DataMovement
// NnfDataMovementSpec defines the desired state of NnfDataMovement
type NnfDataMovementSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
Expand Down Expand Up @@ -66,7 +66,7 @@ type NnfDataMovementSpec struct {
UserConfig *NnfDataMovementConfig `json:"userConfig,omitempty"`
}

// DataMovementSpecSourceDestination defines the desired source or destination of data movement
// NnfDataMovementSpecSourceDestination defines the desired source or destination of data movement
type NnfDataMovementSpecSourceDestination struct {

// Path describes the location of the user data relative to the storage instance
Expand Down Expand Up @@ -110,7 +110,7 @@ type NnfDataMovementConfig struct {
MaxSlots *int `json:"maxSlots,omitempty"`
}

// DataMovementCommandStatus defines the observed status of the underlying data movement
// NnfDataMovementCommandStatus defines the observed status of the underlying data movement
// command (MPI File Utils' `dcp` command).
type NnfDataMovementCommandStatus struct {
// The command that was executed during data movement.
Expand All @@ -134,7 +134,7 @@ type NnfDataMovementCommandStatus struct {
LastMessageTime metav1.MicroTime `json:"lastMessageTime,omitempty"`
}

// DataMovementStatus defines the observed state of DataMovement
// NnfDataMovementStatus defines the observed state of NnfDataMovement
type NnfDataMovementStatus struct {
// Current state of data movement.
// +kubebuilder:validation:Enum=Starting;Running;Finished
Expand Down Expand Up @@ -188,7 +188,7 @@ const (
//+kubebuilder:printcolumn:name="ERROR",type="string",JSONPath=".status.error.severity"
//+kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

// NnfDataMovement is the Schema for the datamovements API
// NnfDataMovement is the Schema for the nnfdatamovements API
type NnfDataMovement struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
89 changes: 89 additions & 0 deletions api/v1alpha1/nnf_datamovementmanager_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
* Copyright 2022 Hewlett Packard Enterprise Development LP
bdevcich marked this conversation as resolved.
Show resolved Hide resolved
* Other additional copyright holders may be indicated within.
*
* The entirety of this work is licensed under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
*
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const (
DataMovementWorkerLabel = "dm.cray.hpe.com/worker"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// NnfDataMovementManagerSpec defines the desired state of NnfDataMovementManager
type NnfDataMovementManagerSpec struct {
ajfloeder marked this conversation as resolved.
Show resolved Hide resolved
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Selector defines the pod selector used in scheduling the worker nodes. This value is duplicated
// to the template.spec.metadata.labels to satisfy the requirements of the worker's Daemon Set.
Selector metav1.LabelSelector `json:"selector"`

// Template defines the pod template that is used for the basis of the worker Daemon Set that
// manages the per node data movement operations.
Template corev1.PodTemplateSpec `json:"template"`

// Host Path defines the directory location of shared mounts on an individual worker node.
HostPath string `json:"hostPath"`

// Mount Path defines the location within the container at which the Host Path volume should be mounted.
MountPath string `json:"mountPath"`
}

// NnfDataMovementManagerStatus defines the observed state of NnfDataMovementManager
type NnfDataMovementManagerStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Ready indicates that the Data Movement Manager has achieved the desired readiness state
// and all managed resources are initialized.
Ready bool `json:"ready,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="READY",type="boolean",JSONPath=".status.ready",description="True if manager readied all resoures"
//+kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

// NnfDataMovementManager is the Schema for the nnfdatamovementmanagers API
type NnfDataMovementManager struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec NnfDataMovementManagerSpec `json:"spec,omitempty"`
Status NnfDataMovementManagerStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// NnfDataMovementManagerList contains a list of NnfDataMovementManager
type NnfDataMovementManagerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []NnfDataMovementManager `json:"items"`
}

func init() {
SchemeBuilder.Register(&NnfDataMovementManager{}, &NnfDataMovementManagerList{})
}
91 changes: 91 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Loading
Loading