Merge pull request #128 from billett83/devel

fixes #127 Provided service type LoadBalancer
This commit is contained in:
Shane McDonald
2021-03-23 09:49:34 -04:00
committed by GitHub
9 changed files with 124 additions and 3 deletions

View File

@@ -18,6 +18,9 @@ tower_ingress_annotations: ''
# certificate and key.
tower_ingress_tls_secret: ''
tower_loadbalancer_protocol: 'http'
tower_loadbalancer_port: '80'
# The TLS termination mechanism to use to access
# the services. Supported mechanism are: edge, passthrough
#

View File

@@ -6,20 +6,34 @@ metadata:
namespace: '{{ meta.namespace }}'
labels:
app: '{{ deployment_type }}'
{% if tower_ingress_type | lower == 'loadbalancer' %}
annotations:
{{ tower_loadbalancer_annotations | indent(width=4) }}
{% endif %}
spec:
ports:
{% if tower_ingress_type | lower != 'loadbalancer' and tower_loadbalancer_protocol | lower != 'https' %}
- port: 80
protocol: TCP
targetPort: 8052
name: http
{% endif %}
{% if tower_ingress_type | lower == 'route' and tower_route_tls_termination_mechanism | lower == 'passthrough' %}
- port: 443
protocol: TCP
targetPort: 8053
name: https
{% endif %}
{% if tower_ingress_type | lower == 'loadbalancer' and tower_loadbalancer_protocol | lower == 'https' %}
- port: 443
protocol: TCP
targetPort: 8052
name: https
{% endif %}
selector:
app: '{{ deployment_type }}'
{% if tower_ingress_type != "none" %}
{% if tower_ingress_type | lower == "loadbalancer" %}
type: LoadBalancer
{% elif tower_ingress_type != "none" %}
type: NodePort
{% endif %}