INNER CODE UNIT · Python
creation_timestamp_equal
weaveworks/kubediff · kubedifflib/_diff.py:66
def creation_timestamp_equal(a, b):
"""Compares creation timestamps, allowing a source value of None to match any time"""
if a is None:
return True
return a == b
# Tolerations specify a path (glob patterns accepted) and a check function.
# The check function takes (want, have) and is called on matching paths.
# If it returns True then any difference is 'tolerated', ie. ignored.
tolerations = {
"*.resources.requests.cpu": cpus_equal,
"*.resources.limits.cpu": cpus_equal,
".metadata.creationTimestamp": creation_timestamp_equal,
}
def different_lengths(path, want, have):