Skip to content

Commit 2405347

Browse files
committed
operator changes to fix aap-50667
1 parent 7e9470e commit 2405347

File tree

4 files changed

+40
-10
lines changed

4 files changed

+40
-10
lines changed

roles/chatbot/templates/chatbot.configmap_lightspeed_stack_config.yaml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ data:
1313
name: Ansible Lightspeed Intelligent Assistant
1414
service:
1515
host: 0.0.0.0
16-
port: 8080
16+
port: 8321
1717
auth_enabled: false
1818
workers: 1
1919
color_log: true
2020
access_log: true
21+
tls_config:
22+
tls_certificate_path: /app-root/certs/tls.crt
23+
tls_key_path: /app-root/certs/tls.key
2124
llama_stack:
2225
use_as_library_client: true
2326
library_client_config_path: /.llama/distributions/llama-stack/config/ansible-chatbot-run.yaml

roles/chatbot/templates/chatbot.deployment.yaml.j2

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ spec:
106106
- name: INFERENCE_MODEL
107107
value: {{ chatbot_model }}
108108
ports:
109-
- containerPort: 8080
109+
- containerPort: 8443
110110
protocol: TCP
111111
volumeMounts:
112112
- name: ansible-chatbot-storage
@@ -117,6 +117,12 @@ spec:
117117
mountPath: /.llama/distributions/llama-stack/config
118118
- name: ansible-chatbot-system-prompt
119119
mountPath: /.llama/distributions/ansible-chatbot/system-prompts
120+
- name: lm-stack-tls-certs
121+
mountPath: /app-root/certs/
122+
readOnly: true
123+
- name: service-ca-bundle
124+
mountPath: /var/run/secrets/kubernetes.io/serviceaccount/
125+
readOnly: true
120126
{% if is_openshift %}
121127
- name: server-tls-certs
122128
mountPath: /var/run/secrets/kubernetes.io/serviceaccount/
@@ -245,6 +251,22 @@ spec:
245251
items:
246252
- key: DEFAULT_SYSTEM_PROMPT
247253
path: default.txt
254+
- name: lm-stack-tls-certs
255+
secret:
256+
secretName: '{{ ansible_operator_meta.name }}-chatbot-api-tls'
257+
defaultMode: 0644
258+
items:
259+
- key: tls.crt
260+
path: tls.crt
261+
- key: tls.key
262+
path: tls.key
263+
- name: service-ca-bundle
264+
configMap:
265+
name: openshift-service-ca.crt
266+
defaultMode: 0644
267+
items:
268+
- key: service-ca.crt
269+
path: service-ca.crt
248270
{% if is_openshift %}
249271
- name: server-tls-certs
250272
configMap:

roles/chatbot/templates/chatbot.service.yaml.j2

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ metadata:
77
labels:
88
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}
99
app.kubernetes.io/component: '{{ deployment_type }}-chatbot-api'
10-
{% if service_annotations %}
1110
annotations:
11+
service.beta.openshift.io/serving-cert-secret-name: '{{ ansible_operator_meta.name }}-chatbot-api-tls'
12+
{% if service_annotations %}
1213
{{ service_annotations | indent(width=4) }}
1314
{% endif %}
1415
spec:
1516
ports:
16-
- port: 8080
17+
- port: 8443
1718
protocol: TCP
18-
targetPort: 8080
19-
name: http
19+
targetPort: 8321
20+
name: https-api
2021
clusterIP: None
2122
selector:
2223
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}

roles/model/templates/secrets/model_pipeline_config.yaml.j2

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ stringData:
1616
ModelPipelineChatBot:
1717
config:
1818
{% if not is_openshift %}
19-
inference_url: 'http://{{ ansible_operator_meta.name }}-chatbot-api.{{ ansible_operator_meta.namespace }}:8080'
19+
inference_url: 'https://{{ ansible_operator_meta.name }}-chatbot-api.{{ ansible_operator_meta.namespace }}:8443'
2020
{% endif %}
2121
{% if is_openshift %}
22-
inference_url: 'http://{{ ansible_operator_meta.name }}-chatbot-api.{{ ansible_operator_meta.namespace }}.svc.cluster.local:8080'
22+
inference_url: 'https://{{ ansible_operator_meta.name }}-chatbot-api.{{ ansible_operator_meta.namespace }}.svc.cluster.local:8443'
2323
{% endif %}
2424
model_id: '{{ chatbot_model }}'
2525
enable_health_check: 'True'
26+
verify_ssl: true
27+
ca_cert_file: '/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt'
2628
{% if _aap_gateway_url is defined or _aap_controller_url is defined %}
2729
mcp_servers:
2830
{% if _aap_gateway_url is defined and _aap_controller_url is defined %}
@@ -38,13 +40,15 @@ stringData:
3840
ModelPipelineStreamingChatBot:
3941
config:
4042
{% if not is_openshift %}
41-
inference_url: 'http://{{ ansible_operator_meta.name }}-chatbot-api.{{ ansible_operator_meta.namespace }}:8080'
43+
inference_url: 'https://{{ ansible_operator_meta.name }}-chatbot-api.{{ ansible_operator_meta.namespace }}:8443'
4244
{% endif %}
4345
{% if is_openshift %}
44-
inference_url: 'http://{{ ansible_operator_meta.name }}-chatbot-api.{{ ansible_operator_meta.namespace }}.svc.cluster.local:8080'
46+
inference_url: 'https://{{ ansible_operator_meta.name }}-chatbot-api.{{ ansible_operator_meta.namespace }}.svc.cluster.local:8443'
4547
{% endif %}
4648
model_id: '{{ chatbot_model }}'
4749
enable_health_check: 'True'
50+
verify_ssl: true
51+
ca_cert_file: '/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt'
4852
{% if _aap_gateway_url is defined or _aap_controller_url is defined %}
4953
mcp_servers:
5054
{% if _aap_gateway_url is defined and _aap_controller_url is defined %}

0 commit comments

Comments
 (0)