Skip to content

Commit

Permalink
Backport k8s client library changes from spinnaker-k8s-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindio committed Jul 28, 2017
1 parent 2990368 commit ba5a22e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions k8s/client.py
Expand Up @@ -63,6 +63,11 @@ def put(self, url, body, timeout=DEFAULT_TIMEOUT_SECONDS):
def _call(self, method, url, body=None, timeout=DEFAULT_TIMEOUT_SECONDS, **kwargs):
self.init_session()
resp = self._session.request(method, config.api_server + url, json=body, timeout=timeout, **kwargs)
if config.debug:
message = ['{:d} for url: {:s}'.format(resp.status_code, resp.url)]
Client._add_request(message, resp.request)
Client._add_response(message, resp)
LOG.debug("\n".join(message))
self._raise_on_status(resp)
return resp

Expand Down
6 changes: 6 additions & 0 deletions k8s/models/ingress.py
Expand Up @@ -28,9 +28,15 @@ class IngressRule(Model):
http = Field(HTTPIngressRuleValue)


class IngressTLS(Model):
hosts = ListField(six.text_type)
secretName = Field(six.text_type)


class IngressSpec(Model):
backend = Field(IngressBackend)
rules = ListField(IngressRule)
tls = ListField(IngressTLS)


class Ingress(Model):
Expand Down

0 comments on commit ba5a22e

Please sign in to comment.