diff --git a/.secrets.baseline b/.secrets.baseline index d609ed1800..d98de64c32 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "build/bin/config/oscap/ssg-rhel9-ds.xml|^.secrets.baseline$|^docs/catalogs/", "lines": null }, - "generated_at": "2026-05-20T23:47:35Z", + "generated_at": "2026-05-28T13:45:18Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -252,7 +252,7 @@ "hashed_secret": "b2817467154949a61f8e9ad31d1eeaf03221cbfa", "is_secret": false, "is_verified": false, - "line_number": 374, + "line_number": 379, "type": "Secret Keyword", "verified_result": null } @@ -672,7 +672,7 @@ "hashed_secret": "fee2d55ad9a49a95fc89abe8f414dad66704ebfd", "is_secret": false, "is_verified": false, - "line_number": 45, + "line_number": 48, "type": "Secret Keyword", "verified_result": null } diff --git a/image/cli/mascli/functions/gitops_aiservice_tenant b/image/cli/mascli/functions/gitops_aiservice_tenant index 093b889d9f..5b46ec4b16 100644 --- a/image/cli/mascli/functions/gitops_aiservice_tenant +++ b/image/cli/mascli/functions/gitops_aiservice_tenant @@ -28,6 +28,7 @@ ibm_aiservice_tenant(required): --aiservice-watsonxai-url ${COLOR_YELLOW}AISERVICE_WATSONXAI_URL${TEXT_RESET} Endpoint URL for Watsonx.ai --aiservice-watsonx-full ${COLOR_YELLOW}AISERVICE_WATSONX_FULL${TEXT_RESET} Full URL for Watsonx.ai including API key --tenant-scheduling-config-file ${COLOR_YELLOW}TENANT_SCHEDULING_CONFIG_FILE${TEXT_RESET} Path to tenant scheduling configuration file (tolerations and nodeSelector) + --enable-deprovisioning ${COLOR_YELLOW}AISERVICE_ENABLE_DEPROVISIONING${TEXT_RESET} When true, the tenant is deprovisioned when its AIServiceTenant CR is deleted AiService : --aiservice-namespace ${COLOR_YELLOW}AISERVICE_NAMESPACE${TEXT_RESET} The namespace where AI Service is deployed @@ -265,6 +266,10 @@ function gitops_aiservice_tenant_noninteractive() { export TENANT_SCHEDULING_CONFIG_YAML=$1 && shift ;; + --enable-deprovisioning) + export AISERVICE_ENABLE_DEPROVISIONING=$1 && shift + ;; + # Automatic GitHub Push -P|--github-push) export GITHUB_PUSH=true @@ -404,6 +409,7 @@ function gitops_aiservice_tenant() { echo_reset_dim "AIService Tenant Install Plan Approval . ${COLOR_MAGENTA}${AISERVICE_TENANT_INSTALL_PLAN_APPROVAL}" echo_reset_dim "cluster domain ................................................. ${COLOR_MAGENTA}${CLUSTER_DOMAIN}" echo_reset_dim "in SaaS environment ............................................ ${COLOR_MAGENTA}${IN_SAAS_ENV}" + echo_reset_dim "deprovisioning enabled ......................................... ${COLOR_MAGENTA}${AISERVICE_ENABLE_DEPROVISIONING}" if [[ -n "$TENANT_SCHEDULING_CONFIG_YAML" ]]; then echo_reset_dim "Scheduling constraints (tolerations/nodeSelector) .............. ${COLOR_MAGENTA}${TENANT_SCHEDULING_CONFIG_YAML}" else diff --git a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice-tenant.yaml.j2 b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice-tenant.yaml.j2 index 1a42008977..668762eff7 100644 --- a/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice-tenant.yaml.j2 +++ b/image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice-tenant.yaml.j2 @@ -9,6 +9,9 @@ ibm_aiservice_tenant: catalog_source: "{{ CATALOG_SOURCE }}" aiservice_tenant_install_plan_approval: "{{ AISERVICE_TENANT_INSTALL_PLAN_APPROVAL }}" tenantNamespace: "{{ TENANT_NAMESPACE }}" +{% if AISERVICE_ENABLE_DEPROVISIONING is defined and AISERVICE_ENABLE_DEPROVISIONING != '' %} + enable_deprovisioning: {{ AISERVICE_ENABLE_DEPROVISIONING }} +{% endif %} mas_icr_cp: "{{ MAS_ICR_CP }}" mas_icr_cpopen: "{{ MAS_ICR_CPOPEN }}" diff --git a/tekton/src/pipelines/gitops/gitops-aiservice-tenant-pipeline.yml.j2 b/tekton/src/pipelines/gitops/gitops-aiservice-tenant-pipeline.yml.j2 index a65eb51302..38864cac98 100644 --- a/tekton/src/pipelines/gitops/gitops-aiservice-tenant-pipeline.yml.j2 +++ b/tekton/src/pipelines/gitops/gitops-aiservice-tenant-pipeline.yml.j2 @@ -24,6 +24,9 @@ spec: type: string - name: github_host type: string + - name: aiservice_enable_deprovisioning + type: string + default: "false" - name: aiservice_namespace type: string - name: aiservice_provision_tenant @@ -133,6 +136,8 @@ spec: value: $(params.github_repo) - name: github_host value: $(params.github_host) + - name: aiservice_enable_deprovisioning + value: $(params.aiservice_enable_deprovisioning) - name: aiservice_namespace value: $(params.aiservice_namespace) - name: aiservice_provision_tenant diff --git a/tekton/src/tasks/gitops/gitops-aiservice-tenant.yml.j2 b/tekton/src/tasks/gitops/gitops-aiservice-tenant.yml.j2 index 56a1d2c179..fef11dd379 100644 --- a/tekton/src/tasks/gitops/gitops-aiservice-tenant.yml.j2 +++ b/tekton/src/tasks/gitops/gitops-aiservice-tenant.yml.j2 @@ -23,6 +23,9 @@ spec: type: string - name: github_host type: string + - name: aiservice_enable_deprovisioning + type: string + default: "false" - name: aiservice_namespace type: string - name: aiservice_provision_tenant @@ -114,6 +117,8 @@ spec: value: $(params.github_host) - name: GITHUB_REPO value: $(params.github_repo) + - name: AISERVICE_ENABLE_DEPROVISIONING + value: $(params.aiservice_enable_deprovisioning) - name: AISERVICE_NAMESPACE value: $(params.aiservice_namespace) - name: AISERVICE_PROVISION_TENANT