|
15 | 15 | dbFieldsEncryptionSecret: "{{ __db_fields_encryption_secret_name }}"
|
16 | 16 | image: "{{ _image }}"
|
17 | 17 | version: ""
|
18 |
| - chatbotImage: "" |
19 |
| - chatbotVersion: "" |
20 |
| - chatbotConfigurationSecret: "" |
21 | 18 |
|
22 | 19 | # ============================================
|
23 | 20 | # Retrieve and update AnsibleAIConnect status
|
|
80 | 77 |
|
81 | 78 | # ============================================
|
82 | 79 | # Retrieve and update Chatbot status
|
83 |
| -# -------------------------------------------- |
84 |
| -# There is no mechanism to handle the chatbot version |
85 |
| -# See https://issues.redhat.com/browse/AAP-48026 |
86 | 80 | # ============================================
|
87 | 81 | - block:
|
88 |
| - - name: Set Chatbot instance version |
89 |
| - ansible.builtin.set_fact: |
90 |
| - chatbot_instance_version: '0.0.1' |
| 82 | + - name: Retrieve Chatbot instance version |
| 83 | + kubernetes.core.k8s_exec: |
| 84 | + namespace: "{{ ansible_operator_meta.namespace }}" |
| 85 | + pod: "{{ chatbot_api_pod_name }}" |
| 86 | + container: "ansible-chatbot" |
| 87 | + command: >- |
| 88 | + bash -c "cat /.llama/distributions/ansible-chatbot/ansible-chatbot-version-info.json | jq -r .version" |
| 89 | + register: chatbot_instance_version |
| 90 | + changed_when: false |
91 | 91 | no_log: "{{ no_log }}"
|
92 | 92 |
|
93 | 93 | - name: Update Chatbot version status
|
|
98 | 98 | namespace: "{{ ansible_operator_meta.namespace }}"
|
99 | 99 | status:
|
100 | 100 | chatbotImage: "{{ _chatbot_image }}"
|
101 |
| - chatbotVersion: "{{ chatbot_instance_version }}" |
| 101 | + chatbotVersion: "{{ chatbot_instance_version.stdout | trim }}" |
102 | 102 | chatbotConfigurationSecret: "{{ chatbot_config_secret_name }}"
|
| 103 | + |
| 104 | + - name: Update Chatbot RAG database image status |
| 105 | + operator_sdk.util.k8s_status: |
| 106 | + api_version: '{{ api_version }}' |
| 107 | + kind: "{{ kind }}" |
| 108 | + name: "{{ ansible_operator_meta.name }}" |
| 109 | + namespace: "{{ ansible_operator_meta.namespace }}" |
| 110 | + status: |
| 111 | + chatbotRAGDatabaseImage: "{{ _chatbot_rag_db_image }}" |
| 112 | + |
| 113 | + - name: Update MCP Gateway Server image status |
| 114 | + operator_sdk.util.k8s_status: |
| 115 | + api_version: '{{ api_version }}' |
| 116 | + kind: "{{ kind }}" |
| 117 | + name: "{{ ansible_operator_meta.name }}" |
| 118 | + namespace: "{{ ansible_operator_meta.namespace }}" |
| 119 | + status: |
| 120 | + chatbotMCPGatewayImage: "{{ _chatbot_mcp_gateway_image }}" |
| 121 | + when: |
| 122 | + - _aap_gateway_url is defined |
| 123 | + - _aap_gateway_url | length |
| 124 | + - _aap_gateway_token is defined |
| 125 | + - _aap_gateway_token | length |
| 126 | + |
| 127 | + - name: Update MCP Controller Server image status |
| 128 | + operator_sdk.util.k8s_status: |
| 129 | + api_version: '{{ api_version }}' |
| 130 | + kind: "{{ kind }}" |
| 131 | + name: "{{ ansible_operator_meta.name }}" |
| 132 | + namespace: "{{ ansible_operator_meta.namespace }}" |
| 133 | + status: |
| 134 | + chatbotMCPControllerImage: "{{ _chatbot_mcp_controller_image }}" |
| 135 | + when: |
| 136 | + - _aap_gateway_url is defined |
| 137 | + - _aap_gateway_url | length |
| 138 | + - _aap_controller_url is defined |
| 139 | + - _aap_controller_url | length |
| 140 | + |
| 141 | + - name: Update MCP Lightspeed Server image status |
| 142 | + operator_sdk.util.k8s_status: |
| 143 | + api_version: '{{ api_version }}' |
| 144 | + kind: "{{ kind }}" |
| 145 | + name: "{{ ansible_operator_meta.name }}" |
| 146 | + namespace: "{{ ansible_operator_meta.namespace }}" |
| 147 | + status: |
| 148 | + chatbotMCPLightspeedImage: "{{ _chatbot_mcp_lightspeed_image }}" |
| 149 | + when: |
| 150 | + - _aap_gateway_url is defined |
| 151 | + - _aap_gateway_url | length |
| 152 | + |
103 | 153 | when:
|
104 | 154 | - chatbot_api_pod_name is defined
|
105 | 155 | - chatbot_api_pod_name | length
|
|
0 commit comments