'return the current object kind by name'

def get_object_by_kind(self, kind):

    if re.match('^(dc|deploymentconfig)$', kind, flags=re.IGNORECASE):
        return self.deploymentconfig
    elif re.match('^(svc|service)$', kind, flags=re.IGNORECASE):
        return self.service
    elif re.match('^(sa|serviceaccount)$', kind, flags=re.IGNORECASE):
        return self.serviceaccount
    elif re.match('secret', kind, flags=re.IGNORECASE):
        return self.secret
    elif re.match('clusterrolebinding', kind, flags=re.IGNORECASE):
        return self.rolebinding
    return None
