Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 11 additions & 0 deletions api/v1alpha1/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@ const (
// OnFuseChangedCleanPolicy cleans fuse pod when the fuse in runtime is updated and the fuse pod on some node is not needed
OnFuseChangedCleanPolicy FuseCleanPolicy = "OnFuseChanged"
)

type UpdateStrategy string

const (
// ReCreate is the default update strategy.
ReCreate UpdateStrategy = "ReCreate"

InPlace UpdateStrategy = "InPlace"

InPlaceIfPossible UpdateStrategy = "InPlaceIfPossible"
)
6 changes: 6 additions & 0 deletions api/v1alpha1/juicefsruntime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ type JuiceFSRuntimeSpec struct {
// RuntimeManagement defines policies when managing the runtime
// +optional
RuntimeManagement RuntimeManagement `json:"management,omitempty"`

// UpdateStrategy defines the update policy for worker pod.
// +kubebuilder:validation:Enum=ReCreate;InPlace;InPlaceIfPossible
// +kubebuilder:default=ReCreate
// +optional
UpdateStrategy UpdateStrategy `json:"updateStrategy,omitempty"`
}

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

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

64 changes: 64 additions & 0 deletions api/v1alpha1/persistentpodstate_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Copyright 2025 The Fluid Authors.

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 (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// PersistentPodStateSpec defines the desired state of PersistentPodState
type PersistentPodStateSpec struct {
}

type PodState struct {
NodeName string `json:"nodeName"`
}

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

// PodStates is the pod name mapping to state.
PodStates map[string]PodState `json:"podStates,omitempty"`
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
}

// PersistentPodState is the Schema for the PersistentPodState API
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Namespaced
type PersistentPodState struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec PersistentPodStateSpec `json:"spec,omitempty"`
Status PersistentPodStateStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

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

func init() {
SchemeBuilder.Register(&PersistentPodState{}, &PersistentPodStateList{})
}
Loading
Loading