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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Change Log

## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
- Fix Panics in Deployments without authentication
- Fix ChaosMonkey mode

## [1.0.8](https://github.com/arangodb/kube-arangodb/tree/1.0.8) (2020-09-10)
- Fix Volume rotation on AKS
Expand Down
19 changes: 19 additions & 0 deletions pkg/deployment/context_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,3 +570,22 @@ func (d *Deployment) SecretsInterface() k8sutil.SecretInterface {
func (d *Deployment) GetName() string {
return d.apiObject.GetName()
}

func (d *Deployment) GetOwnedPods() ([]v1.Pod, error) {
pods, err := d.GetKubeCli().CoreV1().Pods(d.apiObject.GetNamespace()).List(meta.ListOptions{})
if err != nil {
return nil, err
}

podList := make([]v1.Pod, 0, len(pods.Items))

for _, p := range pods.Items {
if !d.isOwnerOf(&p) {
continue
}
c := p.DeepCopy()
podList = append(podList, *c)
}

return podList, nil
}
8 changes: 4 additions & 4 deletions pkg/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ func New(config Config, deps Dependencies, apiObject *api.ArangoDeployment) (*De
go d.resources.RunDeploymentHealthLoop(d.stopCh)
go d.resources.RunDeploymentShardSyncLoop(d.stopCh)
}
//if config.AllowChaos {
// d.chaosMonkey = chaos.NewMonkey(deps.Log, d)
// go d.chaosMonkey.Run(d.stopCh)
//}
if config.AllowChaos {
d.chaosMonkey = chaos.NewMonkey(deps.Log, d)
go d.chaosMonkey.Run(d.stopCh)
}

return d, nil
}
Expand Down