mnubo / kubernetes-py

A python module for Kubernetes.
Apache License 2.0
123 stars 46 forks source link

TimeoutError better represented for Resource Limit Issue #60

Open morissette opened 7 years ago

morissette commented 7 years ago
   try:
        deployment.update()
        print "updated deployment {} on {}".format(deployment_name, namespace)
    except K8sExceptions.TimedOutException:
        print "check resource limits for namespace {}".format(namespace)
        return False, receipt
    return True, receipt

If limits is < requests in regards with resources: A TimeOutException is raised vs a ResourceLimitException

Improvement: Check resource limits for given namespace prior to making any changes Raise error if it doesn't make snese to make said change