Skip to content

Commit 754a380

Browse files
authored
Merge branch 'stable' into monthlyupdate
2 parents b05eac0 + 6f47d28 commit 754a380

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

src/mas/devops/tekton.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,12 @@ def prepareRestoreSecrets(dynClient: DynamicClient, namespace: str, restoreConfi
563563
secretsAPI.create(body=restoreConfigs, namespace=namespace)
564564

565565

566-
def prepareInstallSecrets(dynClient: DynamicClient, namespace: str, slsLicenseFile: str = None, additionalConfigs: dict = None, certs: str = None, podTemplates: str = None, slack_token: str = None, slack_channel: str = None) -> None:
566+
def prepareInstallSecrets(dynClient: DynamicClient, namespace: str, slsLicenseFile: str = None, additionalConfigs: dict = None, certs: str = None, podTemplates: str = None, slack_token: str = None, slack_channel: str = None, aiserviceConfig: str = None) -> None:
567567
"""
568568
Create or update secrets required for MAS installation pipelines.
569569
570570
Creates five secrets in the specified namespace: mas-devops-slack, pipeline-additional-configs,
571-
pipeline-sls-entitlement, pipeline-certificates, and pipeline-pod-templates.
571+
pipeline-sls-entitlement, pipeline-certificates, pipeline-pod-templates and pipeline-aiservice-config.
572572
573573
Parameters:
574574
dynClient (DynamicClient): OpenShift Dynamic Client
@@ -579,6 +579,7 @@ def prepareInstallSecrets(dynClient: DynamicClient, namespace: str, slsLicenseFi
579579
podTemplates (str, optional): Pod template data. Defaults to None (empty secret).
580580
slack_token (str, optional): Slack bot token for notifications. Defaults to None.
581581
slack_channel (str, optional): Slack channel ID for notifications. Defaults to None.
582+
aiserviceConfig (str, optional): AI Service tenant config data. Defaults to None (empty secret).
582583
583584
Returns:
584585
None
@@ -701,6 +702,24 @@ def prepareInstallSecrets(dynClient: DynamicClient, namespace: str, slsLicenseFi
701702
}
702703
secretsAPI.create(body=podTemplates, namespace=namespace)
703704

705+
# 5. Secret/pipeline-aiservice-config
706+
# -------------------------------------------------------------------------
707+
try:
708+
secretsAPI.delete(name="pipeline-aiservice-config", namespace=namespace)
709+
except NotFoundError:
710+
pass
711+
712+
if aiserviceConfig is None:
713+
aiserviceConfig = {
714+
"apiVersion": "v1",
715+
"kind": "Secret",
716+
"type": "Opaque",
717+
"metadata": {
718+
"name": "pipeline-aiservice-config"
719+
}
720+
}
721+
secretsAPI.create(body=aiserviceConfig, namespace=namespace)
722+
704723

705724
def prepareUpdateSlackSecrets(dynClient: DynamicClient, slack_token: str = None, slack_channel: str = None) -> None:
706725
"""

src/mas/devops/templates/pipelinerun-install.yml.j2

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,10 @@ spec:
827827
value: "{{ tenant_entitlement_start_date }}"
828828
- name: tenant_entitlement_end_date
829829
value: "{{ tenant_entitlement_end_date }}"
830+
{%- if tenant_scheduling_config_file is defined and tenant_scheduling_config_file != "" %}
831+
- name: tenant_scheduling_cfg_file
832+
value: "{{ tenant_scheduling_config_file }}"
833+
{%- endif %}
830834

831835
# RSL
832836
# -------------------------------------------------------------------------
@@ -901,7 +905,7 @@ spec:
901905
- name: aiservice_watsonxai_on_prem
902906
value: "{{ aiservice_watsonxai_on_prem }}"
903907

904-
# AI Service - watsonX
908+
# AI Service - Certificate Issuer
905909
# -------------------------------------------------------------------------
906910
{%- if aiservice_certificate_issuer is defined and aiservice_certificate_issuer != "" %}
907911
- name: aiservice_certificate_issuer
@@ -944,3 +948,9 @@ spec:
944948
- name: shared-certificates
945949
secret:
946950
secretName: pipeline-certificates
951+
952+
# AI Service configurations
953+
# -------------------------------------------------------------------------
954+
- name: shared-aiservice-config
955+
secret:
956+
secretName: pipeline-aiservice-config

0 commit comments

Comments
 (0)