Skip to content

Commit 9f1861c

Browse files
kvahedneunhoef
authored andcommitted
ArangoDB version in membership status (#423)
* add arangodb version to member status
1 parent 74232fd commit 9f1861c

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Change Log
22

33
## [0.3.13]() (XXXX-XX-XX)
4-
-
4+
- Added ArangoDB version and image id to member status
55

66
## [0.3.12](https://github.com/arangodb/kube-arangodb/tree/0.3.12) (2019-07-04)
77
- Limit source IP ranges for external services

pkg/apis/deployment/v1alpha/member_status.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ package v1alpha
2525
import (
2626
"time"
2727

28+
driver "github.com/arangodb/go-driver"
2829
"github.com/arangodb/kube-arangodb/pkg/util"
29-
"k8s.io/api/core/v1"
30+
v1 "k8s.io/api/core/v1"
3031
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3132
)
3233

@@ -53,6 +54,10 @@ type MemberStatus struct {
5354
IsInitialized bool `json:"initialized"`
5455
// CleanoutJobID holds the ID of the agency job for cleaning out this server
5556
CleanoutJobID string `json:"cleanout-job-id,omitempty"`
57+
// ArangoVersion holds the ArangoDB version in member
58+
ArangoVersion driver.Version `json:"arango-version,omitempty"`
59+
//ImageId holds the members ArangoDB image ID
60+
ImageID string `json:"image-id,omitempty"`
5661
}
5762

5863
// Equal checks for equality
@@ -64,7 +69,9 @@ func (s MemberStatus) Equal(other MemberStatus) bool {
6469
s.PodName == other.PodName &&
6570
s.Conditions.Equal(other.Conditions) &&
6671
s.IsInitialized == other.IsInitialized &&
67-
s.CleanoutJobID == other.CleanoutJobID
72+
s.CleanoutJobID == other.CleanoutJobID &&
73+
s.ArangoVersion == other.ArangoVersion &&
74+
s.ImageID == other.ImageID
6875
}
6976

7077
// Age returns the duration since the creation timestamp of this member.

pkg/deployment/resources/pod_creator.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,10 @@ func (r *Resources) createPodForMember(spec api.DeploymentSpec, memberID string,
667667
clusterJWTSecretName, groupSpec.GetNodeSelector(), groupSpec.PriorityClassName, groupSpec.Resources, exporter, groupSpec.GetSidecars(), groupSpec.VolumeClaimTemplate); err != nil {
668668
return maskAny(err)
669669
}
670+
671+
m.ArangoVersion = status.CurrentImage.ArangoDBVersion
672+
m.ImageID = status.CurrentImage.ImageID
673+
670674
log.Debug().Str("pod-name", m.PodName).Msg("Created pod")
671675
} else if group.IsArangosync() {
672676
// Check image

0 commit comments

Comments
 (0)