Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
- Update 'github.com/arangodb/arangosync-client' dependency to v0.7.0
- Add HighPriorityPlan to ArangoDeployment Status

## [1.2.1](https://github.com/arangodb/kube-arangodb/tree/1.2.1) (2021-07-28)
- Fix ArangoMember race with multiple ArangoDeployments within single namespace
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/deployment/v1/deployment_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ type DeploymentStatus struct {
// Plan to update this deployment
Plan Plan `json:"plan,omitempty"`

// HighPriorityPlan to update this deployment. Executed before plan
HighPriorityPlan Plan `json:"highPriorityPlan,omitempty"`

// AcceptedSpec contains the last specification that was accepted by the operator.
AcceptedSpec *DeploymentSpec `json:"accepted-spec,omitempty"`

Expand Down
18 changes: 18 additions & 0 deletions pkg/apis/deployment/v1/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,31 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// ActionPriority define action priority
type ActionPriority int

const (
// ActionPriorityNormal define normal priority plan
ActionPriorityNormal ActionPriority = iota
// ActionPriorityHigh define high priority plan
ActionPriorityHigh
)

// ActionType is a strongly typed name for a plan action item
type ActionType string

func (a ActionType) String() string {
return string(a)
}

// Priority returns plan priority
func (a ActionType) Priority() ActionPriority {
switch a {
default:
return ActionPriorityNormal
}
}

const (
// ActionTypeIdle causes a plan to be recalculated.
ActionTypeIdle ActionType = "Idle"
Expand Down
7 changes: 7 additions & 0 deletions pkg/apis/deployment/v1/zz_generated.deepcopy.go

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

3 changes: 3 additions & 0 deletions pkg/apis/deployment/v2alpha1/deployment_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ type DeploymentStatus struct {
// Plan to update this deployment
Plan Plan `json:"plan,omitempty"`

// HighPriorityPlan to update this deployment. Executed before plan
HighPriorityPlan Plan `json:"highPriorityPlan,omitempty"`

// AcceptedSpec contains the last specification that was accepted by the operator.
AcceptedSpec *DeploymentSpec `json:"accepted-spec,omitempty"`

Expand Down
18 changes: 18 additions & 0 deletions pkg/apis/deployment/v2alpha1/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,31 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// ActionPriority define action priority
type ActionPriority int

const (
// ActionPriorityNormal define normal priority plan
ActionPriorityNormal ActionPriority = iota
// ActionPriorityHigh define high priority plan
ActionPriorityHigh
)

// ActionType is a strongly typed name for a plan action item
type ActionType string

func (a ActionType) String() string {
return string(a)
}

// Priority returns plan priority
func (a ActionType) Priority() ActionPriority {
switch a {
default:
return ActionPriorityNormal
}
}

const (
// ActionTypeIdle causes a plan to be recalculated.
ActionTypeIdle ActionType = "Idle"
Expand Down
7 changes: 7 additions & 0 deletions pkg/apis/deployment/v2alpha1/zz_generated.deepcopy.go

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

Loading