Uploaded image for project: 'OpenShift Builds'
  1. OpenShift Builds
  2. BUILD-1773

Provide RuntimeClass to Builds and BuildRuns

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • shipwright
    • None

      Overview

      This task implements the core API changes and controller logic to support specifying a RuntimeClass for build pods, as described in SHIP-0040.

      Description

      The RuntimeClass API lets Kubernetes clusters support multiple container runtime environments. This is most often encountered when using Kata containers, which adds hardware virtualization to the existing mechanisms for isolating containers.

      This implementation will:

      • Add runtimeClassName field to BuildSpec in Build CRD
      • Add runtimeClassName field to BuildRunSpec in BuildRun CRD
      • Update controller reconciliation logic to handle precedence (BuildRun overrides Build)
      • Pass runtimeClassName to Tekton TaskRun podTemplate

      Acceptance Criteria

      • runtimeClassName field added to Build CRD
      • runtimeClassName field added to BuildRun CRD
      • Controller passes runtimeClassName to TaskRun podTemplate
      • BuildRun runtimeClassName overrides Build runtimeClassName
      • Unit tests pass with >80% coverage for new code
      • Integration tests verify TaskRun contains correct runtimeClassName

      Dependencies

      None - this is the foundational task for SHIP-0040.

      Technical Notes

      • The runtimeClassName field corresponds to the runtimeClassName field on Kubernetes pods
      • Tekton supports tuning the pod of the TaskRun using the podTemplate field
      • Values in BuildRun will override those in the referenced Build object (if present)
      • Unit testing can verify that the generated TaskRun object contains the desired pod template fields
      • End to end testing may prove challenging, as KinD is not designed to support multiple container runtimes

      Example

      apiVersion: shipwright.io/v1beta1
      kind: Build
      metadata:
        name: example-build
      spec:
        runtimeClassName: kata
        # ... other build spec fields
      

      Related GitHub Issue

      This issue corresponds to: shipwright-io/build#2074

      This issue has been completed in GitHub. Creating this JIRA story for traceability and to maintain the complete feature implementation history.

      Part of SHIP-0040: Build Runtime Class implementation. See SHIP-0040 for the full enhancement proposal.

              Unassigned Unassigned
              adkaplan@redhat.com Adam Kaplan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: