-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ols - for azure ai services (#8950)
* Updated OLS role with Azure token base authenticaiton * display name variable update in workload * fixed template called in workload for Azure bearer token * fixed template filename for app_sp * changed question * updated credentials reference * fixed tenant id variable in templates for app_sp * fixex client id and client secret name in template * fixed to Bearer in template * url update * updated channel to alpha due to bug in preview for azure token based authentication * updated display name * updated display name * fixed lenght issue for url * fixed spaces and indentation * yaml lenght * fixed spaces and indentation --------- Co-authored-by: Ritesh <[email protected]>
- Loading branch information
1 parent
a762538
commit fe45b9e
Showing
9 changed files
with
244 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
ansible/roles_ocp_workloads/ocp4_workload_ols/templates/create_azure_api_token.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: azure-api-keys | ||
namespace: openshift-lightspeed | ||
annotations: | ||
ols.openshift.io/watcher: cluster | ||
stringData: | ||
client_id: "{{ _child_app_id }}" | ||
client_secret: "{{ _child_client_secret }}" | ||
tenant_id: "{{ ocp4_workload_ols_azure_tenant_id }}" | ||
type: Opaque |
8 changes: 8 additions & 0 deletions
8
ansible/roles_ocp_workloads/ocp4_workload_ols/templates/create_secret_token.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
stringData: | ||
Bearer: "{{ _child_access_token }}" | ||
kind: Secret | ||
metadata: | ||
name: credentials | ||
namespace: openshift-lightspeed | ||
type: Opaque |
27 changes: 27 additions & 0 deletions
27
...ble/roles_ocp_workloads/ocp4_workload_ols/templates/install_azure_app_sp_olsconfig.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
apiVersion: ols.openshift.io/v1alpha1 | ||
kind: OLSConfig | ||
metadata: | ||
name: cluster | ||
spec: | ||
llm: | ||
providers: | ||
- credentialsSecretRef: | ||
name: azure-api-keys | ||
#Use the name of the deployment with the provider | ||
deploymentName: "{{ ocp4_workload_ols_llm_deploymentname }}" | ||
models: | ||
- name: "{{ ocp4_workload_ols_llm_providers_models_name }}" | ||
name: "{{ ocp4_workload_ols_llm_providers_provide_name }}" | ||
type: "{{ ocp4_workload_ols_llm_providers_provide_type }}" | ||
# Use the URL you recorded after you created the deployment | ||
url: "{{ ocp4_workload_ols_llm_providers_url }}" | ||
|
||
ols: | ||
queryFilters: | ||
- name: ip-address | ||
pattern: '((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}' | ||
replaceWith: <IP-ADDRESS> | ||
defaultModel: "{{ ocp4_workload_ols_defaultmodel }}" | ||
defaultProvider: "{{ ocp4_workload_ols_defaultprovider }}" | ||
logLevel: "{{ ocp4_workload_ols_loglevel }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.