Skip to content

Commit

Permalink
WIP update APIs
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Weber <eric.weber@suse.com>
  • Loading branch information
ejweber committed Jul 18, 2023
1 parent b6fd84b commit d5ce687
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions k8s/pkg/apis/longhorn/v1beta2/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@ const (
ReplicaZoneSoftAntiAffinityDisabled = ReplicaZoneSoftAntiAffinity("disabled")
)

// +kubebuilder:validation:Enum=ignored;enabled;disabled
type ReplicaDiskSoftAntiAffinity string

const (
ReplicaDiskSoftAntiAffinityDefault = ReplicaDiskSoftAntiAffinity("ignored")
ReplicaDiskSoftAntiAffinityEnabled = ReplicaDiskSoftAntiAffinity("enabled")
ReplicaDiskSoftAntiAffinityDisabled = ReplicaDiskSoftAntiAffinity("disabled")
)

type BackendStoreDriverType string

const (
Expand Down Expand Up @@ -231,12 +240,15 @@ type VolumeSpec struct {
RevisionCounterDisabled bool `json:"revisionCounterDisabled"`
// +optional
UnmapMarkSnapChainRemoved UnmapMarkSnapChainRemoved `json:"unmapMarkSnapChainRemoved"`
// Replica soft anti affinity of the volume. Set enabled to allow replicas to be scheduled on the same node
// Replica soft anti affinity of the volume. Set enabled to allow replicas to be scheduled on the same node.
// +optional
ReplicaSoftAntiAffinity ReplicaSoftAntiAffinity `json:"replicaSoftAntiAffinity"`
// Replica zone soft anti affinity of the volume. Set enabled to allow replicas to be scheduled in the same zone
// Replica zone soft anti affinity of the volume. Set enabled to allow replicas to be scheduled in the same zone.
// +optional
ReplicaZoneSoftAntiAffinity ReplicaZoneSoftAntiAffinity `json:"replicaZoneSoftAntiAffinity"`
// Replica disk soft anti affinity of the volume. Set enabled to allow replicas to be scheduled in the same disk.
// +optional
ReplicaDiskSoftAntiAffinity ReplicaDiskSoftAntiAffinity `json:"replicaDiskSoftAntiAffinity"`
// +optional
LastAttachedBy string `json:"lastAttachedBy"`
// +optional
Expand Down

0 comments on commit d5ce687

Please sign in to comment.