Skip to content

Commit

Permalink
feat(k8s/amour): volsync
Browse files Browse the repository at this point in the history
  • Loading branch information
uhthomas committed Jan 28, 2024
1 parent 643548f commit 88a6cc5
Show file tree
Hide file tree
Showing 24 changed files with 3,873 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Code generated by cue get go. DO NOT EDIT.

//cue:generate cue get go github.com/backube/volsync/api/v1alpha1

package v1alpha1

// CopyMethodType defines the methods for creating point-in-time copies of
// volumes.
// +kubebuilder:validation:Enum=Direct;None;Clone;Snapshot
#CopyMethodType: string // #enumCopyMethodType

#enumCopyMethodType:
#CopyMethodDirect |
#CopyMethodNone |
#CopyMethodClone |
#CopyMethodSnapshot

// CopyMethodDirect indicates a copy should not be performed. Data will be copied directly to/from the PVC.
#CopyMethodDirect: #CopyMethodType & "Direct"

// CopyMethodNone indicates a copy should not be performed. Deprecated (replaced by CopyMethodDirect).
#CopyMethodNone: #CopyMethodType & "None"

// CopyMethodClone indicates a copy should be created using volume cloning.
#CopyMethodClone: #CopyMethodType & "Clone"

// CopyMethodSnapshot indicates a copy should be created using a volume
// snapshot.
#CopyMethodSnapshot: #CopyMethodType & "Snapshot"

// Namespace annotation to indicate that elevated permissions are ok for movers
#PrivilegedMoversNamespaceAnnotation: "volsync.backube/privileged-movers"

#ConditionSynchronizing: "Synchronizing"
#SynchronizingReasonSync: "SyncInProgress"
#SynchronizingReasonSched: "WaitingForSchedule"
#SynchronizingReasonManual: "WaitingForManual"
#SynchronizingReasonCleanup: "CleaningUp"
#SynchronizingReasonError: "Error"

// SyncthingPeer Defines the necessary information needed by VolSync
// to configure a given peer with the running Syncthing instance.
#SyncthingPeer: {
// The peer's address that our Syncthing node will connect to.
address: string @go(Address)

// The peer's Syncthing ID.
ID: string

// A flag that determines whether this peer should
// introduce us to other peers sharing this volume.
// It is HIGHLY recommended that two Syncthing peers do NOT
// set each other as introducers as you will have a difficult time
// disconnecting the two.
introducer: bool @go(Introducer)
}

// SyncthingPeerStatus Is a struct that contains information pertaining to
// the status of a given Syncthing peer.
#SyncthingPeerStatus: {
// The address of the Syncthing peer.
address: string @go(Address)

// ID Is the peer's Syncthing ID.
ID: string

// Flag indicating whether peer is currently connected.
connected: bool @go(Connected)

// The ID of the Syncthing peer that this one was introduced by.
introducedBy?: string @go(IntroducedBy)

// A friendly name to associate the given device.
name?: string @go(Name)
}

#MoverResult: string // #enumMoverResult

#enumMoverResult:
#MoverResultSuccessful |
#MoverResultFailed

#MoverResultSuccessful: #MoverResult & "Successful"
#MoverResultFailed: #MoverResult & "Failed"

#MoverStatus: {
result?: #MoverResult @go(Result)
logs?: string @go(Logs)
}

#CustomCASpec: {
// The name of a Secret that contains the custom CA certificate
// If SecretName is used then ConfigMapName should not be set
secretName?: string @go(SecretName)

// The name of a ConfigMap that contains the custom CA certificate
// If ConfigMapName is used then SecretName should not be set
configMapName?: string @go(ConfigMapName)

// The key within the Secret or ConfigMap containing the CA certificate
key?: string @go(Key)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Code generated by cue get go. DO NOT EDIT.

//cue:generate cue get go github.com/backube/volsync/api/v1alpha1

package v1alpha1

#EvRTransferStarted: "TransferStarted"
#EvRTransferFailed: "TransferFailed"
#EvRSnapCreated: "VolumeSnapshotCreated"
#EvRSnapNotBound: "VolumeSnapshotNotBound"
#EvRPVCCreated: "PersistentVolumeClaimCreated"
#EvRPVCNotBound: "PersistentVolumeClaimNotBound"
#EvRSvcAddress: "ServiceAddressAssigned"
#EvRSvcNoAddress: "NoServiceAddressAssigned"

#EvANone: ""
#EvACreateMover: "CreateMover"
#EvADeleteMover: "DeleteMover"
#EvACreatePVC: "CreatePersistentVolumeClaim"
#EvACreateSnap: "CreateVolumeSnapshot"

#EvRVolPopPVCPopulatorFinished: "VolSyncPopulatorFinished"
#EvRVolPopPVCPopulatorError: "VolSyncPopulatorError"
#EvVolPopPVCReplicationDestMissing: "VolSyncPopulatorReplicationDestinationMissing"
#EvRVolPopPVCReplicationDestNoLatestImage: "VolSyncPopulatorReplicationDestinationNoLatestImage"
#EvRVolPopPVCCreationSuccess: "VolSyncPopulatorPVCCreated"
#EvRVolPopPVCCreationError: "VolSyncPopulatorPVCCreationError"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Code generated by cue get go. DO NOT EDIT.

//cue:generate cue get go github.com/backube/volsync/api/v1alpha1

// Package v1alpha1 contains API Schema definitions for the volsync v1alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=volsync.backube
package v1alpha1
Loading

0 comments on commit 88a6cc5

Please sign in to comment.