Skip to content

feat(tkn): add Tekton task for IBM Cloud Gaudi provisioning - #879

Open
deekay2310 wants to merge 2 commits into
redhat-developer:mainfrom
deekay2310:feat/ibmcloud-gaudi-tekton-task
Open

feat(tkn): add Tekton task for IBM Cloud Gaudi provisioning#879
deekay2310 wants to merge 2 commits into
redhat-developer:mainfrom
deekay2310:feat/ibmcloud-gaudi-tekton-task

Conversation

@deekay2310

Copy link
Copy Markdown
Contributor

Summary

  • First IBM Cloud Tekton task in mapt — adds infra-ibmcloud-ibm-gaudi task (template + generated)
  • Exposes mapt ibmcloud ibm-gaudi create/destroy CLI from PR AIPCC:15489: Add support for Gaudi accelerator in mapt's IBM Cloud module #834 for pipeline consumption
  • Adds IBM Cloud credential secret pattern (API key, region, COS HMAC keys) for Tekton
  • Updates Makefile tkn_update and tkn-push targets

Resolves #876

Test plan

  • make tkn-update generates task with correct image/version substitution
  • YAML validates cleanly
  • Deploy task to a cluster and run a create/destroy cycle against IBM Cloud

🤖 Generated with Claude Code

First IBM Cloud Tekton task in mapt. Exposes the `mapt ibmcloud
ibm-gaudi create/destroy` CLI (merged in PR redhat-developer#834) for pipeline
consumption via `infra-ibmcloud-ibm-gaudi` task.

Resolves: redhat-developer#876

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@deekay2310, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3036a3ec-5b60-427a-ad15-502890d68bc0

📥 Commits

Reviewing files that changed from the base of the PR and between 6a0543d and e44af18.

📒 Files selected for processing (2)
  • tkn/infra-ibmcloud-ibm-gaudi.yaml
  • tkn/template/infra-ibmcloud-ibm-gaudi.yaml
📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added support for provisioning and destroying IBM Cloud Gaudi instances through Tekton.
    • Added configurable networking, tagging, OpenTelemetry, ownership, debugging, and lifecycle options.
    • Automatically creates a Kubernetes Secret containing connection details after provisioning.
    • Included the IBM Cloud Gaudi infrastructure manifest in the Tekton push bundle.

Walkthrough

Adds a Tekton task for IBM Cloud Gaudi instance creation and destruction. The task loads credentials, runs mapt, publishes host connection details as an OpenShift Secret, and exposes the generated Secret name. The Makefile generates and pushes the new manifest.

Changes

IBM Cloud Gaudi provisioning

Layer / File(s) Summary
Task contract and bundle wiring
tkn/template/infra-ibmcloud-ibm-gaudi.yaml, tkn/infra-ibmcloud-ibm-gaudi.yaml, Makefile
Defines the task parameters, volumes, result, metadata, generated manifest, and bundle inclusion.
Gaudi provisioning and destruction
tkn/template/infra-ibmcloud-ibm-gaudi.yaml, tkn/infra-ibmcloud-ibm-gaudi.yaml
Loads IBM Cloud and object-storage credentials. Builds operation-specific mapt ibmcloud ibm-gaudi commands with optional networking, telemetry, tags, debug, force-destroy, and state-retention options.
Host secret publication
tkn/template/infra-ibmcloud-ibm-gaudi.yaml, tkn/infra-ibmcloud-ibm-gaudi.yaml
Creates an OpenShift Secret from generated host credentials, applies optional naming and owner references, and writes the Secret name to the task result.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TektonTask
  participant Provisioner
  participant mapt
  participant IBMCloud
  participant OpenShift
  TektonTask->>Provisioner: Run create or destroy operation
  Provisioner->>mapt: Execute ibmcloud ibm-gaudi command
  mapt->>IBMCloud: Provision or destroy instance
  IBMCloud-->>mapt: Return host information
  mapt-->>Provisioner: Write shared host information
  Provisioner-->>OpenShift: Create host-access Secret
  OpenShift-->>TektonTask: Publish Secret name as result
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the new Tekton task for IBM Cloud Gaudi provisioning.
Description check ✅ Passed The description accurately covers the new task, credential handling, Makefile updates, testing, and linked issue.
Linked Issues check ✅ Passed The task and template support create and destroy operations, IBM Cloud parameters, telemetry, lifecycle options, credentials, and connection details [#876].
Out of Scope Changes check ✅ Passed The changes stay within the linked issue by adding the IBM Cloud Gaudi task, its template, and required Makefile integration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@adrianriobo adrianriobo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

if [[ "$(params.otel-app-code)" != "" ]]; then
cmd+="--otel-app-code '$(params.otel-app-code)' "
fi
if [[ "$(params.otel-auth-token)" != "" ]]; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is the first time I think in the otel params... would it make sense to add them as a secret? WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed, otel-auth-token could be handled as a secret. What about other otel params such as otel-endpoint, otel-index, etc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved otel-auth-token to the ibmcloud credential secret — it's now read from the secret mount with a graceful fallback if absent. The other otel params (endpoint, index, app-code, extra-attrs) are non-sensitive config, so kept them as plain params. Also added zone as a plain param for IC_ZONE per CodeRabbit's suggestion.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tkn/template/infra-ibmcloud-ibm-gaudi.yaml`:
- Around line 36-41: Complete the IBM Cloud credential contract by adding
IBMCLOUD_ACCOUNT and IC_ZONE inputs in
tkn/template/infra-ibmcloud-ibm-gaudi.yaml lines 36-41, then load and export
both values in lines 168-173. Regenerate the corresponding credential schema in
tkn/infra-ibmcloud-ibm-gaudi.yaml lines 36-41 and credential-loading code in
lines 168-173 so both files remain synchronized.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6d97f871-d919-4f6c-a2c9-49c2c4007bd1

📥 Commits

Reviewing files that changed from the base of the PR and between 5c91d04 and 6a0543d.

📒 Files selected for processing (3)
  • Makefile
  • tkn/infra-ibmcloud-ibm-gaudi.yaml
  • tkn/template/infra-ibmcloud-ibm-gaudi.yaml

Comment thread tkn/template/infra-ibmcloud-ibm-gaudi.yaml
Address PR review feedback:
- Move otel-auth-token from plain Tekton param to the ibmcloud
  credential secret (read from mount with fallback)
- Add zone param for IC_ZONE when subnet-id is not provided
- Print IC_ZONE in debug output
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.

Add Tekton task for IBM Cloud Gaudi accelerator provisioning

2 participants