From 46a1cb4123010f61020428c8eee7bad37dc48feb Mon Sep 17 00:00:00 2001 From: Ankit Shahu Date: Tue, 20 Feb 2024 22:40:05 +0530 Subject: [PATCH] ED-3534:- Adoption Changes in ML service (#3963) * saving changes * added Upload api endpoint in public kong --------- Co-authored-by: ankitshahu --- ansible/roles/kong-api/defaults/main.yml | 21 +++++++++++++++++++ .../templates/ml-core-service.env | 6 +++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 6090bfff0f..837c208319 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -8237,6 +8237,27 @@ kong_apis: config.required: false config.enabled: false +- name: uploadFileToCloud + uris: "{{ cloud_service_prefix }}/mlcore/v1/files/upload" + upstream_url: "{{ ml_core_service_url }}/v1/cloud-services/files/upload" + strip_uri: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - cloudUrlsCreate + - name: rate-limiting + config.policy: local + config.hour: "{{ medium_rate_limit_per_hour }}" + config.limit_by: credential + - name: request-size-limiting + config.allowed_payload_size: "{{ small_request_size_limit }}" + - name: opa-checks + config.required: false + config.enabled: false + - name: listPlatformPrograms uris: "{{ user_extension_prefix }}/mlcore/v1/programsByPlatformRoles" upstream_url: "{{ ml_core_service_url }}/v1/user-extension/programsByPlatformRoles" diff --git a/ansible/roles/stack-sunbird/templates/ml-core-service.env b/ansible/roles/stack-sunbird/templates/ml-core-service.env index eb469832c1..463c010d1b 100755 --- a/ansible/roles/stack-sunbird/templates/ml-core-service.env +++ b/ansible/roles/stack-sunbird/templates/ml-core-service.env @@ -73,4 +73,8 @@ TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC={{ml_core_timezone_diffrenece_bet #Validate Entities enable/Disable -VALIDATE_ENTITIES={{ml_service_validate_entities | default ("ON")}} \ No newline at end of file +VALIDATE_ENTITIES={{ml_service_validate_entities | default ("ON")}} + +#Public base url of sunbird +PUBLIC_BASE_URL={{ml_core_public_base_url | default("")}} +