automotive-dev-operator

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: Apache-2.0

README

CentOS Automotive Suite Operator

An operator for building automotive OS images on OpenShift. This operator provides a cloud-native way to create automotive OS images using the automotive-image-builder (AIB) project, with support for both traditional AIB manifests and modern bootc container builds.

Description

The CentOS Automotive Suite Operator enables automotive OS image building through:

  • ImageBuild Custom Resource: Declaratively define and trigger automotive OS image builds
  • Multiple Build Modes: Support for traditional AIB manifests and bootc container builds
  • CLI Tool (caib): Command-line interface for creating and monitoring builds
  • Artifact Management: Serve built images via OpenShift Routes or push to OCI registries
  • Tekton Integration: Uses OpenShift Pipelines (Tekton) for scalable build execution

Getting Started

Prerequisites

For OpenShift Installation (Recommended):

  • OpenShift 4.18+ cluster
  • OpenShift Pipelines Operator (Tekton) installed
  • Cluster admin permissions (for initial installation)

For Development:

  • Go 1.22.0+
  • Podman or Docker
  • OpenShift CLI (oc) or kubectl
  • Operator SDK v1.42.0+ (for development)

Installation

The easiest way to install on OpenShift is through OperatorHub:

  1. Open the OpenShift Console
  2. Navigate to Operators > OperatorHub
  3. Search for "CentOS Automotive Suite"
  4. Click Install and follow the prompts

After installation, create an OperatorConfig to enable components:

oc apply -f config/samples/automotive_v1_operatorconfig.yaml
Option 2: OLM Catalog (Local Testing)

For local development and testing with a custom-built operator:

# Build, push, and install the operator via OLM catalog and keep the existing config
./hack/deploy-catalog.sh -y --keep-config

# Create OperatorConfig to configure the operator
oc apply -f config/samples/automotive_v1_operatorconfig.yaml
Installing the CLI (caib)

The caib CLI lets you create, monitor, and download builds from the command line.

Install the latest release:

curl -fsSL https://raw.githubusercontent.com/centos-automotive-suite/automotive-dev-operator/main/hack/install-caib.sh | bash

Or install a specific version:

curl -fsSL https://raw.githubusercontent.com/centos-automotive-suite/automotive-dev-operator/main/hack/install-caib.sh | bash -s -- v0.1.0

Configure the API endpoint:

export CAIB_SERVER=https://build-api-automotive-dev-operator.apps.<cluster-domain>

The CLI auto-detects authentication from your oc login session. You can also set CAIB_TOKEN explicitly.

For usage, build examples, Jumpstarter flashing, and the full command reference, see cmd/caib/README.md.

Uninstallation

For OperatorHub Installation
  1. In OpenShift Console, go to Operators > Installed Operators
  2. Find "CentOS Automotive Suite" and click the options menu
  3. Select Uninstall Operator
For OLM Catalog Installation
./hack/deploy-catalog.sh uninstall -y

Components

CLI Tool

The caib CLI provides command-line access to build operations. Key command groups:

  • caib image — build, flash, list, show, download, delete, and manage OS images
  • caib workspace — create developer workspaces with cross-compilation toolchains, sync code, and deploy to boards
  • caib container — build container images on-cluster using Shipwright
  • caib catalog — publish and manage an image catalog for discovery and deployment

See Installing the CLI for setup and cmd/caib/README.md for the full command reference.

Architecture

Dependencies
  • OpenShift Pipelines Operator: Required for Tekton pipeline execution
  • OpenShift 4.18+: Minimum supported OpenShift version
  • Container Registry: For storing built images (--internal-registry)

Development

Local Development
  1. Clone and setup:
git clone https://github.com/centos-automotive-suite/automotive-dev-operator.git
cd automotive-dev-operator
  1. Install dependencies:
# Unit tests
make test

# Linting
make lint

# Formatting
make fmt
Building
# Build all binaries
make build

# Build specific components
make build-caib           # CLI tool

# Build container images
make docker-build

Release Information

This project publishes versioned releases with:

  • Multi-architecture container images (amd64, arm64)
  • caib CLI binaries for Linux
  • OLM bundles for OperatorHub distribution

For the latest release, visit: https://github.com/centos-automotive-suite/automotive-dev-operator/releases

License

Copyright 2026.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the automotive v1alpha1 API group +kubebuilder:object:generate=true +groupName=automotive.sdv.cloud.redhat.com
Package v1alpha1 contains API Schema definitions for the automotive v1alpha1 API group +kubebuilder:object:generate=true +groupName=automotive.sdv.cloud.redhat.com
cmd
Package main provides the entry point for the automotive-dev-operator controller manager.
Package main provides the entry point for the automotive-dev-operator controller manager.
build-api command
Package main provides a REST API server for automotive OS image build operations.
Package main provides a REST API server for automotive OS image build operations.
caib command
Package main provides the caib CLI tool for interacting with the automotive image build system.
Package main provides the caib CLI tool for interacting with the automotive image build system.
caib/auth
Package auth provides OIDC authentication functionality for the caib CLI.
Package auth provides OIDC authentication functionality for the caib CLI.
caib/authcmd
Package authcmd provides the `caib auth` CLI command group for token management.
Package authcmd provides the `caib auth` CLI command group for token management.
caib/buildcmd
Package buildcmd provides handlers for image build workflows.
Package buildcmd provides handlers for image build workflows.
caib/catalog
Package catalog provides commands for managing the automotive OS image catalog.
Package catalog provides commands for managing the automotive OS image catalog.
caib/clilog
Package clilog provides centralized output control for CLI informational messages.
Package clilog provides centralized output control for CLI informational messages.
caib/common
Package caibcommon provides shared caib helpers.
Package caibcommon provides shared caib helpers.
caib/config
Package config provides local CLI configuration (e.g.
Package config provides local CLI configuration (e.g.
caib/container
Package container implements CLI commands for container image building.
Package container implements CLI commands for container image building.
caib/downloadcmd
Package downloadcmd provides the image artifact download handler.
Package downloadcmd provides the image artifact download handler.
caib/flashcmd
Package flashcmd provides the `caib image flash` command handler.
Package flashcmd provides the `caib image flash` command handler.
caib/image
Package image defines the `caib image` command tree.
Package image defines the `caib image` command tree.
caib/inspectcmd
Package inspectcmd provides the image inspect handler for build provenance.
Package inspectcmd provides the image inspect handler for build provenance.
caib/logstream
Package logstream provides shared log streaming helpers for CLI commands.
Package logstream provides shared log streaming helpers for CLI commands.
caib/querycmd
Package querycmd provides handlers for image list/show commands.
Package querycmd provides handlers for image list/show commands.
caib/registryauth
Package registryauth provides helpers for loading registry credentials from auth files.
Package registryauth provides helpers for loading registry credentials from auth files.
caib/sealedcmd
Package sealedcmd provides sealed image operation handlers.
Package sealedcmd provides sealed image operation handlers.
caib/tokencmd
Package tokencmd provides the image registry token request handler.
Package tokencmd provides the image registry token request handler.
caib/ui
Package ui provides terminal progress rendering for build commands.
Package ui provides terminal progress rendering for build commands.
caib/workspace
Package workspace implements CLI commands for developer workspace management.
Package workspace implements CLI commands for developer workspace management.
export-tasks command
Package main exports Tekton Task and Pipeline definitions as YAML files for Tekton Bundle packaging.
Package main exports Tekton Task and Pipeline definitions as YAML files for Tekton Bundle packaging.
init-secrets command
Package main provides an init container that generates OAuth cookie secrets for the build API service.
Package main provides an init container that generates OAuth cookie secrets for the build API service.
internal
buildapi/catalog
Package catalog provides HTTP handlers for CatalogImage resource management via REST API.
Package catalog provides HTTP handlers for CatalogImage resource management via REST API.
buildapi/client
Package client provides a Go client library for the automotive build API server.
Package client provides a Go client library for the automotive build API server.
common/bundleverify
Package bundleverify provides cosign signature verification for OCI images.
Package bundleverify provides cosign signature verification for OCI images.
common/labels
Package labels defines shared label and annotation constants used across the buildapi and controller packages.
Package labels defines shared label and annotation constants used across the buildapi and controller packages.
common/manifestschema
Package manifestschema provides AIB manifest validation against the JSON Schema extracted from the automotive-image-builder container image.
Package manifestschema provides AIB manifest validation against the JSON Schema extracted from the automotive-image-builder container image.
common/oci
Package oci defines the shared OCI artifact contract (media types, annotations, referrer types).
Package oci defines the shared OCI artifact contract (media types, annotations, referrer types).
common/registryutil
Package registryutil provides shared utilities for registry URL normalization and matching.
Package registryutil provides shared utilities for registry URL normalization and matching.
common/secrets
Package secrets provides utilities for managing Kubernetes secrets, particularly OAuth proxy secrets with randomly generated cookie secrets.
Package secrets provides utilities for managing Kubernetes secrets, particularly OAuth proxy secrets with randomly generated cookie secrets.
common/tasks
Package tasks provides embedded shell scripts for Tekton pipeline tasks.
Package tasks provides embedded shell scripts for Tekton pipeline tasks.
common/telemetry
Package telemetry provides optional OpenTelemetry tracing initialization.
Package telemetry provides optional OpenTelemetry tracing initialization.
controller/catalogimage
Package catalogimage provides event recording and audit logging for CatalogImage resources.
Package catalogimage provides event recording and audit logging for CatalogImage resources.
controller/containerbuild
Package containerbuild provides the controller for managing ContainerBuild custom resources.
Package containerbuild provides the controller for managing ContainerBuild custom resources.
controller/controllerutils
Package controllerutils contains shared helpers used across controllers.
Package controllerutils contains shared helpers used across controllers.
controller/image
Package image provides a Kubernetes controller for managing Image custom resources.
Package image provides a Kubernetes controller for managing Image custom resources.
controller/imagebuild
Package imagebuild provides the controller for managing ImageBuild custom resources.
Package imagebuild provides the controller for managing ImageBuild custom resources.
controller/imagereseal
Package imagereseal provides the controller for ImageReseal resources.
Package imagereseal provides the controller for ImageReseal resources.
controller/operatorconfig
Package operatorconfig provides the controller for managing OperatorConfig custom resources.
Package operatorconfig provides the controller for managing OperatorConfig custom resources.
controller/workspace
Package workspace provides a Kubernetes controller for managing Workspace custom resources.
Package workspace provides a Kubernetes controller for managing Workspace custom resources.
featuregates
Package featuregates provides a Kubernetes-style feature gate mechanism for the operator.
Package featuregates provides a Kubernetes-style feature gate mechanism for the operator.
test
utils
Package testutils provides common test utilities for e2e and integration tests.
Package testutils provides common test utilities for e2e and integration tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL