Skip to content

Commit

Permalink
Remove NoVolumeNodeConflict from 3.9+
Browse files Browse the repository at this point in the history
  • Loading branch information
sdodson committed Feb 9, 2018
1 parent 7fb1a84 commit 4c7918e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def run(self, terms, variables=None, regions_enabled=True, short_version=None,
{'name': 'CheckNodeDiskPressure'},
])

if short_version in ['3.7', '3.8', '3.9', '3.10']:
if short_version in ['3.7', '3.8']:
predicates.extend([
{'name': 'NoVolumeZoneConflict'},
{'name': 'MaxEBSVolumeCount'},
Expand All @@ -129,6 +129,20 @@ def run(self, terms, variables=None, regions_enabled=True, short_version=None,
{'name': 'NoVolumeNodeConflict'},
])

if short_version in ['3.9', '3.10']:
predicates.extend([
{'name': 'NoVolumeZoneConflict'},
{'name': 'MaxEBSVolumeCount'},
{'name': 'MaxGCEPDVolumeCount'},
{'name': 'MaxAzureDiskVolumeCount'},
{'name': 'MatchInterPodAffinity'},
{'name': 'NoDiskConflict'},
{'name': 'GeneralPredicates'},
{'name': 'PodToleratesNodeTaints'},
{'name': 'CheckNodeMemoryPressure'},
{'name': 'CheckNodeDiskPressure'},
])

if regions_enabled:
region_predicate = {
'name': 'Region',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,22 @@
{'name': 'NoVolumeNodeConflict'},
]

DEFAULT_PREDICATES_3_10 = DEFAULT_PREDICATES_3_9 = DEFAULT_PREDICATES_3_8 = DEFAULT_PREDICATES_3_7
DEFAULT_PREDICATES_3_8 = DEFAULT_PREDICATES_3_7

DEFAULT_PREDICATES_3_9 = [
{'name': 'NoVolumeZoneConflict'},
{'name': 'MaxEBSVolumeCount'},
{'name': 'MaxGCEPDVolumeCount'},
{'name': 'MaxAzureDiskVolumeCount'},
{'name': 'MatchInterPodAffinity'},
{'name': 'NoDiskConflict'},
{'name': 'GeneralPredicates'},
{'name': 'PodToleratesNodeTaints'},
{'name': 'CheckNodeMemoryPressure'},
{'name': 'CheckNodeDiskPressure'},
]

DEFAULT_PREDICATES_3_10 = DEFAULT_PREDICATES_3_9

REGION_PREDICATE = {
'name': 'Region',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def run(self, terms, variables=None, regions_enabled=True, short_version=None,
{'name': 'CheckNodeDiskPressure'},
])

if short_version in ['3.7', '3.8', '3.9', '3.10']:
if short_version in ['3.7', '3.8']:
predicates.extend([
{'name': 'NoVolumeZoneConflict'},
{'name': 'MaxEBSVolumeCount'},
Expand All @@ -129,6 +129,20 @@ def run(self, terms, variables=None, regions_enabled=True, short_version=None,
{'name': 'NoVolumeNodeConflict'},
])

if short_version in ['3.9', '3.10']:
predicates.extend([
{'name': 'NoVolumeZoneConflict'},
{'name': 'MaxEBSVolumeCount'},
{'name': 'MaxGCEPDVolumeCount'},
{'name': 'MaxAzureDiskVolumeCount'},
{'name': 'MatchInterPodAffinity'},
{'name': 'NoDiskConflict'},
{'name': 'GeneralPredicates'},
{'name': 'PodToleratesNodeTaints'},
{'name': 'CheckNodeMemoryPressure'},
{'name': 'CheckNodeDiskPressure'},
])

if regions_enabled:
region_predicate = {
'name': 'Region',
Expand Down

0 comments on commit 4c7918e

Please sign in to comment.