Fix fluentd check to work with both 3.4 and 3.3
@@ -198,7 +198,17 @@ class OpenshiftLoggingStatus(object):
if address['type'] == "InternalIP":
internal_ip = address['address']
- if internal_ip == pod['spec']['host']:
+ try:
+ if node['metadata']['labels']['kubernetes.io/hostname'] == pod['spec']['host']:
+ node_matched = True
+ break
+ else:
+ raise ValueError('')
+ except:
+ if internal_ip == pod['spec']['nodeName']:
+ node_matched = True
+ break
+ elif node['metadata']['name'] == pod['spec']['nodeName']:
node_matched = True
break
