diff options
author | Stephen Wong <stephen.kf.wong@gmail.com> | 2018-04-06 23:59:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-04-06 23:59:12 +0000 |
commit | 02922fdb75d386efe1faccaf6ddfdafbf4eee328 (patch) | |
tree | 3fa52ca0196c7e6243200f2f2f6381b4a2428110 /samples/services/nginx/yaml | |
parent | 10de001191d3d938898993f24c127d72c72d5b33 (diff) | |
parent | 2e5e5aca6dadce74b5566ac5e3154cb5886a0c5f (diff) |
Merge "Fix Nginx lb in k8s/istio" into stable/fraser
Diffstat (limited to 'samples/services/nginx/yaml')
-rw-r--r-- | samples/services/nginx/yaml/render_yaml.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/samples/services/nginx/yaml/render_yaml.py b/samples/services/nginx/yaml/render_yaml.py index 527ba8d..850f715 100644 --- a/samples/services/nginx/yaml/render_yaml.py +++ b/samples/services/nginx/yaml/render_yaml.py @@ -16,13 +16,16 @@ def render_yaml(args): grpc_port = '50054' if args['service_type'] == 'lb': out_file = 'lb.yaml' - deploy_name = 'http-lb' + if args['deploy_name'] == 'default': + args['deploy_name'] = 'http-lb' elif args['service_type'] == 'proxy': out_file = 'proxy.yaml' - deploy_name = 'proxy-access-control' + if args['deploy_name'] == 'default': + args['deploy_name'] = 'proxy-access-control' elif args['service_type'] == 'server': out_file = 'server.yaml' - deploy_name = 'clover-server' + if args['deploy_name'] == 'default': + args['deploy_name'] = 'clover-server' else: return "Invalid service type: {}".format(args['service_type']) @@ -33,7 +36,7 @@ def render_yaml(args): image_path=args['image_path'], image_name=args['image_name'], image_tag=args['image_tag'], - deploy_name=deploy_name, + deploy_name=args['deploy_name'], server_port=server_port, grpc_port=grpc_port ) @@ -60,5 +63,8 @@ if __name__ == '__main__': parser.add_argument( '--image_tag', default='latest', help='The image tag to use') + parser.add_argument( + '--deploy_name', default='default', + help='The deployment name to use') args = parser.parse_args() print(render_yaml(vars(args))) |