Skip to content

Commit

Permalink
Add optional parameter ambassadorNodePort. Used to set the ambassador…
Browse files Browse the repository at this point in the history
… service nodePort only when ambassadorServiceType is NodePort and ambassadorNodePort is within the valid range [30000-32767]. By default this parameter is set to 0. If ambassadorServiceType is NodePort and ambassadorNodePort is outside the valid range, then Kubernetes will automatically assign an available nodePort. (kubeflow#2511)
  • Loading branch information
iankoulski authored and k8s-ci-robot committed Feb 19, 2019
1 parent 001949c commit c2b5582
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions kubeflow/common/ambassador.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
name: "ambassador",
port: 80,
targetPort: 80,
[if (params.ambassadorServiceType == 'NodePort') &&
(params.ambassadorNodePort >= 30000) &&
(params.ambassadorNodePort <= 32767)
then 'nodePort']: params.ambassadorNodePort,
},
],
selector: {
Expand Down
3 changes: 2 additions & 1 deletion kubeflow/common/prototypes/ambassador.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
// @shortDescription Ambassador
// @param name string Name
// @optionalParam platform string none supported platforms {none|gke|minikube}
// @optionalParam ambassadorServiceType string ClusterIP The service type for the API Gateway.
// @optionalParam ambassadorServiceType string ClusterIP The service type for the API Gateway {ClusterIP|NodePort|LoadBalancer}.
// @optionalParam ambassadorNodePort number 0 Optional nodePort to use when ambassadorServiceType is NodePort {30000-32767}.
// @optionalParam ambassadorImage string quay.io/datawire/ambassador:0.37.0 The image for the API Gateway.
// @optionalParam replicas number 3 The number of replicas.

Expand Down

0 comments on commit c2b5582

Please sign in to comment.