Skip to content

[minor] Added configurable install plan approval support for AIService and AIService tenant in gitops#2233

Open
Sakshi-Singhroha1 wants to merge 38 commits into
masterfrom
mascore12745
Open

[minor] Added configurable install plan approval support for AIService and AIService tenant in gitops#2233
Sakshi-Singhroha1 wants to merge 38 commits into
masterfrom
mascore12745

Conversation

@Sakshi-Singhroha1
Copy link
Copy Markdown

@Sakshi-Singhroha1 Sakshi-Singhroha1 commented Apr 30, 2026

JIRA:

MASCORE-12745 https://jsw.ibm.com/browse/MASCORE-12745
MASCORE-13410 https://jsw.ibm.com/browse/MASCORE-13410
MASCORE-13462 https://jsw.ibm.com/browse/MASCORE-13462
MASCORE-13884 https://jsw.ibm.com/browse/MASCORE-13884

Problem: The AIService and AIService tenant operator subscription installPlanApproval fields were hardcoded as "Automatic" in the GitOps templates. This prevented users from controlling whether operator updates require manual approval or install automatically.

Requirement: Add support for configurable AIService and AIService tenant install plan approval parameters in the CLI flow, including shell functions, generated templates, and pipeline/task parameter pass-through.

Why these changes are needed:

Deployment flows need to carry install plan approval values from CLI into generated configuration

AIService and AIService tenant operator upgrade behavior must be configurable per environment

Default value "Automatic" is needed for backward compatibility

Generated Tekton and GitOps configuration must include these values so they reach the final Kubernetes subscription setup


What was changed:

This PR adds AIService and AIService tenant install plan approval support across CLI shell functions, generated GitOps templates, generated Tekton pipeline/task templates, and repository validation metadata.

Changes made:

File 1: image/cli/mascli/functions/gitops_aiservice

Added --aiservice-install-plan-approval to the CLI help output

Added default value handling:

export AISERVICE_INSTALL_PLAN_APPROVAL=${AISERVICE_INSTALL_PLAN_APPROVAL:-"Automatic"}

Added argument parsing:

--aiservice-install-plan-approval) export AISERVICE_INSTALL_PLAN_APPROVAL=$1 && shift ;;

Added the value to CLI summary output:

echo_reset_dim "AIService Install Plan Approval ........ ${COLOR_MAGENTA}${AISERVICE_INSTALL_PLAN_APPROVAL}"

File 2: image/cli/mascli/functions/gitops_aiservice_tenant

Added --aiservice-tenant-install-plan-approval to the CLI help output

Added default value handling:

export AISERVICE_TENANT_INSTALL_PLAN_APPROVAL=${AISERVICE_TENANT_INSTALL_PLAN_APPROVAL:-"Automatic"}

Added argument parsing:

--aiservice-tenant-install-plan-approval) export AISERVICE_TENANT_INSTALL_PLAN_APPROVAL=$1 && shift ;;

Added the tenant value to CLI summary output:

echo_reset_dim "AIService Tenant Install Plan Approval . ${COLOR_MAGENTA}${AISERVICE_TENANT_INSTALL_PLAN_APPROVAL}"

File 3: image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice.yaml.j2

Added template rendering for AIService install plan approval:

aiservice_install_plan_approval: "{{ AISERVICE_INSTALL_PLAN_APPROVAL }}"

File 4: image/cli/mascli/templates/gitops/appset-configs/cluster/instance/ibm-aiservice-tenant.yaml.j2

Added template rendering for AIService tenant install plan approval:

aiservice_tenant_install_plan_approval: "{{ AISERVICE_TENANT_INSTALL_PLAN_APPROVAL }}"

File 5: tekton/src/pipelines/gitops/gitops-aiservice-pipeline.yml.j2

Added pipeline parameter definition for AIService install plan approval with default value:

- name: aiservice_install_plan_approval type: string default: "Automatic"

Added parameter pass-through to the downstream task

- name: aiservice_install_plan_approval value: $(params.aiservice_install_plan_approval)

File 6: tekton/src/pipelines/gitops/gitops-aiservice-tenant-pipeline.yml.j2

Added pipeline parameter definition for AIService tenant install plan approval with default value:

- name: aiservice_tenant_install_plan_approval type: string default: "Automatic"

Added parameter pass-through to the downstream task

- name: aiservice_tenant_install_plan_approval value: $(params.aiservice_tenant_install_plan_approval)

File 7: tekton/src/tasks/gitops/gitops-aiservice.yml.j2

Added task parameter definition for AIService install plan approval with default value:

- name: aiservice_install_plan_approval type: string default: "Automatic"

Added environment variable mapping:

- name: AISERVICE_INSTALL_PLAN_APPROVAL value: $(params.aiservice_install_plan_approval)

File 8: tekton/src/tasks/gitops/gitops-aiservice-tenant.yml.j2

Added task parameter definition for AIService tenant install plan approval with default value:

- name: aiservice_tenant_install_plan_approval type: string default: "Automatic"

Added environment variable mapping:

- name: AISERVICE_TENANT_INSTALL_PLAN_APPROVAL value: $(params.aiservice_tenant_install_plan_approval)

File 9: .secrets.baseline

Updated generated baseline metadata and line references as part of repository validation


Impact:

✅ CLI accepts --aiservice-install-plan-approval

✅ CLI accepts --aiservice-tenant-install-plan-approval

✅ Generated GitOps templates include install plan approval values for AIService and AIService tenant

✅ Generated Tekton pipeline/task templates carry these parameters through the workflow

✅ Default value "Automatic" ensures backward compatibility

✅ Enables configurable operator upgrade behavior per environment

Testing performed:

CLI Testing:

✅ Validated argument parsing in AIService shell functions

✅ Validated argument parsing in AIService tenant shell functions

✅ Verified default values are applied correctly

✅ Confirmed values are shown in CLI summary output

Template Verification:

✅ Verified generated GitOps templates include AIService and AIService tenant install plan approval values

✅ Verified generated Tekton pipeline and task templates include the new parameters and mappings

Validation Results:

✅ Parameters are accepted and propagated correctly

✅ Templates render expected values

✅ Repository validation updated .secrets.baseline

Related Pull Requests:

saas-envs-starter: PR #158 - Added prompts and template parameters for install plan configuration

saas-deploy-py: PR #266 - Added schema validation for install plan approval fields

saas-tekton: PR #223 - Added Tekton pipeline support for install plan approval parameters

ibm-mas/gitops: PR #447 - Added configurable install plan approval for AIService and AIService tenant operators

Copy link
Copy Markdown
Contributor

@mnivedithaa mnivedithaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please cleanup the commented lines, resolve the conflicts.
Also you need to update gitops_aiservice pipeline and task changes here as well (changes done in saas-tekton)

Comment thread python/src/mas/cli/install/argParser.py Outdated



masAppsArgGroup.add_argument(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this arg required for cli?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, This accepts and validates user input.
Without this, the CLI won't recognize the --aiservice-install-plan-approval flag

@@ -343,6 +340,11 @@ def buildCommand(self) -> str:
if self.getParam('aiservice_channel') != "":
command += f" --aiservice-channel \"{self.getParam('aiservice_channel')}\"{newline}"


if self.getParam('aiservice_install_plan_approval') != "":
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this arg required for cli?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this passes the parameter to the gitops-aiservice function.
Without this, the parameter is accepted but never used

Copy link
Copy Markdown
Member

@whitfiea whitfiea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments.

Also I would expect that the aiservice-tenant would have the same setting as I thought was was now a subscription itself? I don't think it would make sense to have the aiservice as manual and the aiservice-tenant has automatic

Comment thread image/cli/mascli/functions/gitops_aiservice Outdated
Comment thread python/src/mas/cli/aiservice/install/argBuilder.py
Comment thread tekton/src/params/install-aiservice.yml.j2
@Sakshi-Singhroha1 Sakshi-Singhroha1 changed the title [minor] Add --aiservice-install-plan-approval CLI parameter support [minor] Added configurable install plan approval support for AIService and AIService tenant May 15, 2026
@whitfiea whitfiea changed the title [minor] Added configurable install plan approval support for AIService and AIService tenant [minor] Added configurable install plan approval support for AIService and AIService tenant in gitops May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants