Skip to content

[minor] Added configurable install plan approval support for AIService and AIService tenant #447

Open
Sakshi-Singhroha1 wants to merge 13 commits into
mainfrom
MASCORE-12745
Open

[minor] Added configurable install plan approval support for AIService and AIService tenant #447
Sakshi-Singhroha1 wants to merge 13 commits into
mainfrom
MASCORE-12745

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 Helm template support for configurable aiservice_install_plan_approval and aiservice_tenant_install_plan_approval fields in GitOps, allowing the values to be passed from CLI and applied to the Kubernetes Subscription resources.

Why these changes are needed:

GitOps templates need to support dynamic installPlanApproval values from configuration

Enables teams to control operator upgrade behavior per environment, such as Manual for production and Automatic for dev/test

Provides default value "Automatic" for backward compatibility

Completes the parameter flow: saas-envs → Tekton → CLI → GitOps → Kubernetes

Extends the same configurability to both AIService and AIService tenant operator subscriptions


What was changed:

This PR adds Helm template variable support for AIService and AIService tenant operator install plan approval settings across GitOps configuration files.

Changes made:

File 1: instance-applications/113-ibm-aiservice/templates/04-aiservice-operator-subscription.yaml

Replaced the hardcoded value with a Helm template variable:

installPlanApproval: {{ .Values.aiservice_install_plan_approval }}

File 2: instance-applications/115-ibm-aiservice-tenant/templates/06-aiservice-tenant-operator-subscription.yaml

Replaced the hardcoded value with a Helm template variable:

installPlanApproval: {{ .Values.aiservice_tenant_install_plan_approval }}

File 3: root-applications/ibm-aiservice-instance-root/templates/040-ibm-aiservice-app.yaml

Added parameter passing for AIService install plan approval from root values into the instance application:

aiservice_install_plan_approval: "{{ .Values.ibm_aiservice.aiservice_install_plan_approval }}"

File 4: root-applications/ibm-aiservice-instance-root/templates/070-aiservice-tenant-appset.yaml

Updated role parameter handling to safely default values when keys are not present:

- name: "cluster_admin_role" value: "{{ if hasKey .Values `cluster_admin_role` }}{{ .Values.cluster_admin_role }}{{ else }}true{{ end }}"
- name: "application_admin_role" value: "{{ if hasKey .Values `application_admin_role` }}{{ .Values.application_admin_role }}{{ else }}true{{ end }}"

File 5: root-applications/ibm-aiservice-tenant-root/templates/100-ibm-aiservice-tenant-app.yaml

Added parameter passing for AIService tenant install plan approval:

aiservice_tenant_install_plan_approval: "{{ .Values.ibm_aiservice_tenant.aiservice_tenant_install_plan_approval }}"

Updated role handling to provide safe defaults when values are absent:

cluster_admin_role: {{ if hasKey .Values "cluster_admin_role" }}{{ .Values.cluster_admin_role }}{{ else }}true{{ end }}
application_admin_role: {{ if hasKey .Values "application_admin_role" }}{{ .Values.application_admin_role }}{{ else }}true{{ end }}

Adjusted sync option handling so namespace creation is enabled only when the cluster admin role is available


Impact:

✅ GitOps templates accept aiservice_install_plan_approval from CLI

✅ GitOps templates accept aiservice_tenant_install_plan_approval from CLI

✅ Kubernetes Subscription resources are created with the correct installPlanApproval values

✅ Default value "Automatic" ensures backward compatibility

✅ Enables Manual or Automatic operator upgrade control per environment

✅ No breaking changes to existing deployments

✅ Improves root application safety by providing default handling for role parameters

Testing performed:

Template Validation:

✅ Validated Helm template syntax is correct

✅ Confirmed parameter flow from root applications to instance applications

✅ Verified default value "Automatic" is set correctly

✅ Verified tenant install plan approval value is passed correctly

Deployment Verification:

✅ Deployed to noble8 ArgoCD cluster

✅ Configuration with aiservice_install_plan_approval: "Manual" deployed successfully

✅ Configuration with aiservice_install_plan_approval: "Automatic" deployed successfully

✅ Configuration with aiservice_tenant_install_plan_approval deployed successfully

✅ Kubernetes Subscription resources created with the correct installPlanApproval fields

Test Results:

✅ Templates render correctly with parameter values

✅ Accepts valid values "Manual" and "Automatic"

✅ Deployment to noble8 cluster successful

✅ Operator subscriptions created with the correct install plan approval settings

Related Pull Requests:

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

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

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

ibm-mas/cli: PR #2233 - Added CLI support for AIService and AIService tenant install plan approval parameters

Comment on lines +72 to +73
aiservice_channel: "9.1.x"
aiservice_install_plan_approval: "Automatic"
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.

These needs to be removed from default values

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.

Done

Comment on lines +259 to +260
aiservice_channel: "9.1.x"
aiservice_install_plan_approval: "Automatic"
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.

same here

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.

Done

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.

Aiservice tenant operator subscription also needs to be made configurable with this same option

@Sakshi-Singhroha1 Sakshi-Singhroha1 changed the title [minor] Add install plan approval parameter for AIService operator [minor] Added configurable install plan approval support for AIService and AIService tenant 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.

2 participants