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 @@ -3,6 +3,7 @@
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
- Add Plan BackOff functionality
- Fix Core InitContainers check
- Remove unused `status.members.<group>.sidecars-specs` variable

## [1.2.6](https://github.com/arangodb/kube-arangodb/tree/1.2.6) (2021-12-15)
- Add ArangoBackup backoff functionality
Expand Down
8 changes: 4 additions & 4 deletions pkg/apis/deployment/v1/member_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
package v1

import (
"reflect"
"time"

"github.com/arangodb/kube-arangodb/pkg/util/k8sutil"
Expand Down Expand Up @@ -69,8 +68,6 @@ type MemberStatus struct {
IsInitialized bool `json:"initialized"`
// CleanoutJobID holds the ID of the agency job for cleaning out this server
CleanoutJobID string `json:"cleanout-job-id,omitempty"`
// SideCarSpecs contains list of specifications specified for side cars
SideCarSpecs map[string]v1.Container `json:"sidecars-specs,omitempty"`
// ArangoVersion holds the ArangoDB version in member
ArangoVersion driver.Version `json:"arango-version,omitempty"`
// ImageId holds the members ArangoDB image ID
Expand All @@ -85,6 +82,10 @@ type MemberStatus struct {
Endpoint *string `json:"endpoint,omitempty"`
// Topology define topology member status assignment
Topology *TopologyMemberStatus `json:"topology,omitempty"`

// deprecated
// SideCarSpecs contains list of specifications specified for side cars
SideCarSpecs map[string]v1.Container `json:"sidecars-specs,omitempty"`
}

// Equal checks for equality
Expand All @@ -99,7 +100,6 @@ func (s MemberStatus) Equal(other MemberStatus) bool {
s.Conditions.Equal(other.Conditions) &&
s.IsInitialized == other.IsInitialized &&
s.CleanoutJobID == other.CleanoutJobID &&
reflect.DeepEqual(s.SideCarSpecs, other.SideCarSpecs) &&
s.ArangoVersion == other.ArangoVersion &&
s.ImageID == other.ImageID &&
s.Image.Equal(other.Image) &&
Expand Down
14 changes: 7 additions & 7 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.

8 changes: 4 additions & 4 deletions pkg/apis/deployment/v2alpha1/member_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
package v2alpha1

import (
"reflect"
"time"

"github.com/arangodb/kube-arangodb/pkg/util/k8sutil"
Expand Down Expand Up @@ -69,8 +68,6 @@ type MemberStatus struct {
IsInitialized bool `json:"initialized"`
// CleanoutJobID holds the ID of the agency job for cleaning out this server
CleanoutJobID string `json:"cleanout-job-id,omitempty"`
// SideCarSpecs contains list of specifications specified for side cars
SideCarSpecs map[string]v1.Container `json:"sidecars-specs,omitempty"`
// ArangoVersion holds the ArangoDB version in member
ArangoVersion driver.Version `json:"arango-version,omitempty"`
// ImageId holds the members ArangoDB image ID
Expand All @@ -85,6 +82,10 @@ type MemberStatus struct {
Endpoint *string `json:"endpoint,omitempty"`
// Topology define topology member status assignment
Topology *TopologyMemberStatus `json:"topology,omitempty"`

// deprecated
// SideCarSpecs contains list of specifications specified for side cars
SideCarSpecs map[string]v1.Container `json:"sidecars-specs,omitempty"`
}

// Equal checks for equality
Expand All @@ -99,7 +100,6 @@ func (s MemberStatus) Equal(other MemberStatus) bool {
s.Conditions.Equal(other.Conditions) &&
s.IsInitialized == other.IsInitialized &&
s.CleanoutJobID == other.CleanoutJobID &&
reflect.DeepEqual(s.SideCarSpecs, other.SideCarSpecs) &&
s.ArangoVersion == other.ArangoVersion &&
s.ImageID == other.ImageID &&
s.Image.Equal(other.Image) &&
Expand Down
14 changes: 7 additions & 7 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.

8 changes: 2 additions & 6 deletions pkg/deployment/resources/pod_creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ func (r *Resources) createPodForMember(ctx context.Context, cachedStatus inspect
if !found {
return errors.WithStack(errors.Newf("Member '%s' not found", memberID))
}
groupSpec := spec.GetServerGroupSpec(group)

// Update pod name
role := group.AsRole()
Expand Down Expand Up @@ -498,11 +497,8 @@ func (r *Resources) createPodForMember(ctx context.Context, cachedStatus inspect
m.ArangoVersion = m.Image.ArangoDBVersion
m.ImageID = m.Image.ImageID

// Check for missing side cars in
m.SideCarSpecs = make(map[string]core.Container)
for _, specSidecar := range groupSpec.GetSidecars() {
m.SideCarSpecs[specSidecar.Name] = *specSidecar.DeepCopy()
}
// reset old sidecar values to nil
m.SideCarSpecs = nil

log.Debug().Str("pod-name", m.PodName).Msg("Created pod")
if m.Image == nil {
Expand Down