1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Feature] Fix ChaosMonkey (#642)

This commit is contained in:
Adam Janikowski 2020-10-07 20:33:17 +02:00 committed by GitHub
parent 12732997eb
commit 02f651c019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 4 deletions

View file

@ -5,6 +5,8 @@
- Enable by default and promote to Production Ready - JWT Rotation Feature, TLS Rotation Feature
- Deprecate K8S < 1.16
- Fix Upgrade procedure to safely evict pods during upgrade
- 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

View file

@ -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
}

View file

@ -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
}