mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-15 17:51:03 +00:00
[Feature] Fix ChaosMonkey (#642)
This commit is contained in:
parent
12732997eb
commit
02f651c019
3 changed files with 25 additions and 4 deletions
|
@ -5,6 +5,8 @@
|
||||||
- Enable by default and promote to Production Ready - JWT Rotation Feature, TLS Rotation Feature
|
- Enable by default and promote to Production Ready - JWT Rotation Feature, TLS Rotation Feature
|
||||||
- Deprecate K8S < 1.16
|
- Deprecate K8S < 1.16
|
||||||
- Fix Upgrade procedure to safely evict pods during upgrade
|
- 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)
|
## [1.0.8](https://github.com/arangodb/kube-arangodb/tree/1.0.8) (2020-09-10)
|
||||||
- Fix Volume rotation on AKS
|
- Fix Volume rotation on AKS
|
||||||
|
|
|
@ -570,3 +570,22 @@ func (d *Deployment) SecretsInterface() k8sutil.SecretInterface {
|
||||||
func (d *Deployment) GetName() string {
|
func (d *Deployment) GetName() string {
|
||||||
return d.apiObject.GetName()
|
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
|
||||||
|
}
|
||||||
|
|
|
@ -164,10 +164,10 @@ func New(config Config, deps Dependencies, apiObject *api.ArangoDeployment) (*De
|
||||||
go d.resources.RunDeploymentHealthLoop(d.stopCh)
|
go d.resources.RunDeploymentHealthLoop(d.stopCh)
|
||||||
go d.resources.RunDeploymentShardSyncLoop(d.stopCh)
|
go d.resources.RunDeploymentShardSyncLoop(d.stopCh)
|
||||||
}
|
}
|
||||||
//if config.AllowChaos {
|
if config.AllowChaos {
|
||||||
// d.chaosMonkey = chaos.NewMonkey(deps.Log, d)
|
d.chaosMonkey = chaos.NewMonkey(deps.Log, d)
|
||||||
// go d.chaosMonkey.Run(d.stopCh)
|
go d.chaosMonkey.Run(d.stopCh)
|
||||||
//}
|
}
|
||||||
|
|
||||||
return d, nil
|
return d, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue