IsInstanceFenced check if in a given instance should be fenced
(instance string)
| 857 | |
| 858 | // IsInstanceFenced check if in a given instance should be fenced |
| 859 | func (cluster *Cluster) IsInstanceFenced(instance string) bool { |
| 860 | fencedInstances, err := utils.GetFencedInstances(cluster.Annotations) |
| 861 | if err != nil { |
| 862 | return false |
| 863 | } |
| 864 | |
| 865 | if fencedInstances.Has(utils.FenceAllInstances) { |
| 866 | return true |
| 867 | } |
| 868 | return fencedInstances.Has(instance) |
| 869 | } |
| 870 | |
| 871 | // ShouldResizeInUseVolumes is true when we should resize PVC we already |
| 872 | // created |
no test coverage detected