blob: 55f40528a78cd28100b51ef7412c283bfa39faca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
"""
Helm 2 disabled check
Checks if the helm v2 is supported in the cluster
"""
import logging
from tools.kube_utils import kube_api
from tools.conf import settings
from internal.store_result import store_result
def helmv2_disabled_check():
"""
Checks for helm v2 support
"""
result = {'category': 'platform',
'case_name': 'helmv2_disabled_check',
'criteria': 'pass',
'details': []
}
kube = kube_api()
logger = logging.getLogger(__name__)
res = False
pod_details = kube.list_pod_for_all_namespaces()
pods = pod_details.items
version_support = settings.getValue('pdf_file')['vim_functional']['legacy_helm_support']
if 'YES' in version_support:
for pod in pods:
if 'tiller' in pod.metadata.name:
res = True
result['details'].append(pod)
if res is False:
result['criteria'] = 'fail'
store_result(logger, result)
return result
|