Skip to content

Commit

Permalink
Merge "Fixed minor issues in ingress in k8s"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Feb 22, 2017
2 parents 05d0bda + 79cfb75 commit 54e23bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def set_v2_frontend_backend(lb, custom_attr_dict, custom_attrs):
conf.append('acl %s hdr(host) -i %s' %(host_cdn, acl['host']))
if 'path' in acl:
path_cdn = "%s_path" % pool.uuid
conf.append('acl %s_path path_beg %s' %(pool.uuid, acl['path']))
conf.append('acl %s_path path %s' %(pool.uuid, acl['path']))
acl_cdn = host_cdn + " " + path_cdn
conf.append('use_backend %s if %s' %(pool.uuid, acl_cdn))
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def patch_resource(self, resource_type, resource_name, \
url = "%s/namespaces/%s/%s/%s" % (base_url, namespace,
resource_type, resource_name)

headers = {'Accept': 'application/json/', \
headers = {'Accept': 'application/json', \
'Content-Type': 'application/strategic-merge-patch+json'}
headers.update(self.headers)

Expand Down
6 changes: 3 additions & 3 deletions src/container/kube-manager/kube_manager/vnc/vnc_ingress.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _vnc_create_listeners(self, namespace, lb, port):

def _vnc_create_lb(self, uid, name, namespace):
lb_provider = 'opencontrail'
name = 'ingress' + '-' + name
lb_name = 'ingress' + '-' + name
proj_obj = self._get_project(namespace)
vn_obj = self._get_network()
if proj_obj is None or vn_obj is None:
Expand All @@ -161,12 +161,12 @@ def _vnc_create_lb(self, uid, name, namespace):
annotations = {}
annotations['device_owner'] = 'K8S:INGRESS'
lb_obj = self.service_lb_mgr.create(lb_provider, vn_obj,
uid, name, proj_obj, vip_address,
uid, lb_name, proj_obj, vip_address,
service_subnet_uuid, annotations=annotations)
if lb_obj:
vip_info = {}
vip_info['clusterIP'] = lb_obj._loadbalancer_properties.vip_address
fip_obj = self._allocate_floating_ip(lb_obj, name, proj_obj)
fip_obj = self._allocate_floating_ip(lb_obj, lb_name, proj_obj)
if fip_obj:
vip_info['externalIP'] = fip_obj.address
patch = {'metadata': {'annotations': vip_info}}
Expand Down

0 comments on commit 54e23bb

Please sign in to comment.