add ability to specify default host_name

This commit is contained in:
Adil Hafeez 2025-02-03 14:36:00 -08:00
parent dbc4b2d68b
commit e0cbcc43f6
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
2 changed files with 12 additions and 0 deletions

View file

@ -33,6 +33,8 @@ properties:
enum: enum:
- http - http
- https - https
http_host:
type: string
additionalProperties: false additionalProperties: false
required: required:
- endpoint - endpoint
@ -66,6 +68,8 @@ properties:
enum: enum:
- http - http
- https - https
http_host:
type: string
additionalProperties: false additionalProperties: false
required: required:
- name - name

View file

@ -537,7 +537,11 @@ static_resources:
socket_address: socket_address:
address: {{ cluster.endpoint }} address: {{ cluster.endpoint }}
port_value: {{ cluster.port }} port_value: {{ cluster.port }}
{% if cluster.http_host %}
hostname: {{ cluster.http_host }}
{% else %}
hostname: {{ cluster.endpoint }} hostname: {{ cluster.endpoint }}
{% endif %}
{% if cluster.protocol == "https" %} {% if cluster.protocol == "https" %}
transport_socket: transport_socket:
name: envoy.transport_sockets.tls name: envoy.transport_sockets.tls
@ -566,7 +570,11 @@ static_resources:
socket_address: socket_address:
address: {{ local_llm_provider.endpoint }} address: {{ local_llm_provider.endpoint }}
port_value: {{ local_llm_provider.port }} port_value: {{ local_llm_provider.port }}
{% if local_llm_provider.http_host %}
hostname: {{ local_llm_provider.http_host }}
{% else %}
hostname: {{ local_llm_provider.endpoint }} hostname: {{ local_llm_provider.endpoint }}
{% endif %}
{% if local_llm_provider.protocol == "https" %} {% if local_llm_provider.protocol == "https" %}
transport_socket: transport_socket:
name: envoy.transport_sockets.tls name: envoy.transport_sockets.tls