Skip to content

Commit

Permalink
feat: support metadataList in runtime (fluid-cloudnative#2777)
Browse files Browse the repository at this point in the history
* feat: support pvcMetadata in runtime

Signed-off-by: weixiao-huang <hwx.simle@gmail.com>

* feat: use RuntimeInfoOption for much more elegant

Signed-off-by: 黄维啸 <huangweixiao@megvii.com>

* fix: code generation

Signed-off-by: weixiao-huang <hwx.simle@gmail.com>

* feat: use metadataList

Signed-off-by: weixiao-huang <hwx.simle@gmail.com>
Signed-off-by: 黄维啸 <huangweixiao@megvii.com>

---------

Signed-off-by: weixiao-huang <hwx.simle@gmail.com>
Signed-off-by: 黄维啸 <huangweixiao@megvii.com>
  • Loading branch information
weixiao-huang authored Mar 24, 2023
1 parent 8738ac0 commit 9627258
Show file tree
Hide file tree
Showing 25 changed files with 657 additions and 22 deletions.
4 changes: 4 additions & 0 deletions api/v1alpha1/alluxioruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ type AlluxioRuntimeSpec struct {
// RuntimeManagement defines policies when managing the runtime
// +optional
RuntimeManagement RuntimeManagement `json:"management,omitempty"`

// MetadataList defines labels and annotations that will be propagated to resources created by runtime
// +optional
MetadataList []Metadata `json:"metadataList,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
7 changes: 7 additions & 0 deletions api/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ type User struct {
GroupName string `json:"group"`
}

// Metadata defines subgroup properties of metav1.ObjectMeta
type Metadata struct {
PodMetadata `json:",inline"`

Selector metav1.GroupKind `json:"selector,omitempty"`
}

// PodMetadata defines subgroup properties of metav1.ObjectMeta
type PodMetadata struct {
// Labels are labels of pod specification
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha1/eacruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ type EACRuntimeSpec struct {
// PodMetadata defines labels and annotations that will be propagated to all EAC's pods
// +optional
PodMetadata PodMetadata `json:"podMetadata,omitempty"`

// MetadataList defines labels and annotations that will be propagated to resources created by runtime
// +optional
MetadataList []Metadata `json:"metadataList,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha1/goosefsruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ type GooseFSRuntimeSpec struct {
// CleanCachePolicy defines cleanCache Policy
// +optional
CleanCachePolicy CleanCachePolicy `json:"cleanCachePolicy,omitempty"`

// MetadataList defines labels and annotations that will be propagated to resources created by runtime
// +optional
MetadataList []Metadata `json:"metadataList,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha1/jindoruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ type JindoRuntimeSpec struct {
// CleanCachePolicy defines cleanCache Policy
// +optional
CleanCachePolicy CleanCachePolicy `json:"cleanCachePolicy,omitempty"`

// MetadataList defines labels and annotations that will be propagated to resources created by runtime
// +optional
MetadataList []Metadata `json:"metadataList,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha1/juicefsruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ type JuiceFSRuntimeSpec struct {
// CleanCachePolicy defines cleanCache Policy
// +optional
CleanCachePolicy CleanCachePolicy `json:"cleanCachePolicy,omitempty"`

// MetadataList defines labels and annotations that will be propagated to resources created by runtime
// +optional
MetadataList []Metadata `json:"metadataList,omitempty"`
}

// JuiceFSCompTemplateSpec is a description of the JuiceFS components
Expand Down
150 changes: 144 additions & 6 deletions api/v1alpha1/openapi_generated.go

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

4 changes: 4 additions & 0 deletions api/v1alpha1/thinruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ type ThinRuntimeSpec struct {
// Volumes is the list of Kubernetes volumes that can be mounted by runtime components and/or fuses.
// +optional
Volumes []corev1.Volume `json:"volumes,omitempty"`

// MetadataList defines labels and annotations that will be propagated to resources created by runtime
// +optional
MetadataList []Metadata `json:"metadataList,omitempty"`
}

// ThinCompTemplateSpec is a description of the thinRuntime components
Expand Down
Loading

0 comments on commit 9627258

Please sign in to comment.