This commit is contained in:
wangying 2023-05-31 15:50:11 +08:00
parent 66598607c9
commit 1eba95af78
5 changed files with 64 additions and 60 deletions

View File

@ -15,8 +15,8 @@ limitations under the License.
*/
// Package v1alpha1 contains API Schema definitions for the game.kruise.io v1alpha1 API group
//+kubebuilder:object:generate=true
//+groupName=game.kruise.io
// +kubebuilder:object:generate=true
// +groupName=game.kruise.io
package v1alpha1
import (

View File

@ -89,11 +89,14 @@ const (
// 1. The payload is validated; if the payload is invalid, the function returns
// 2.  The current timestamped directory is detected by reading the data directory
// symlink
//
// 3. The old version of the volume is walked to determine whether any
// portion of the payload was deleted and is still present on disk.
//
// 4. The data in the current timestamped directory is compared to the projected
// data to determine if an update is required.
// 5.  A new timestamped dir is created
//
// 6. The payload is written to the new timestamped directory
// 7.  Symlinks and directory for new user-visible files are created (if needed).
//
@ -113,6 +116,7 @@ const (
// 8.  A symlink to the new timestamped directory ..data_tmp is created that will
// become the new data directory
// 9.  The new data directory symlink is renamed to the data directory; rename is atomic
//
// 10. Old paths are removed from the user-visible portion of the target directory
// 11.  The previous timestamped directory is removed, if it exists
func (w *Writer) Write(payload map[string]FileProjection) error {