Index of every page on this site: llms.txt
All skills
openshift avatar

/build-ho-image

@0f43b29 official
by openshiftopenshift/hypershift555 stars
592
Run it yourself

Build and push hypershift-operator container image. Auto-applies when testing HO changes that require deploying to a live cluster.

Use this Skill: https://skilld.dev/gh/openshift/hypershift/build-ho-image

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈37 tokens for metadata: the name and description. ≈761 when used: this file.

Description uses 1.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈147 characters, or 1.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Build HyperShift-Operator Image

This skill enables building and pushing custom hypershift-operator (HO) images for testing changes in a live HyperShift environment.

When to Use This Skill

This skill automatically applies when:

  • You've made changes to code in hypershift-operator/
  • You need to test HO changes against a live cluster
  • The user asks to build/push a HO image
  • You need to iterate on HO fixes with e2e tests

Prerequisites

Source the environment file before using this skill:

source dev/claude-env.sh

Image Registry Configuration

Environment variables from dev/claude-env.sh:

Variable Description
HO_IMAGE_REPO Container registry for HO images
RUNTIME Container runtime (podman/docker)

Building the HO Image

Step 1: Generate a Unique Tag

Use a tag that identifies the change (branch name, feature, or timestamp):

# Option 1: Use branch name
TAG=$(git rev-parse --abbrev-ref HEAD | tr '/' '-')

# Option 2: Use short commit hash
TAG=$(git rev-parse --short HEAD)

# Option 3: Use descriptive name + number for iterations
TAG="feature-name-1"

Step 2: Build the Image

The HO image uses the main Dockerfile:

$RUNTIME build -f Dockerfile --platform linux/amd64 -t $HO_IMAGE_REPO:$TAG .

Note: The build runs make hypershift, make hypershift-operator, make karpenter-operator, and make product-cli inside the container.

Step 3: Push the Image

$RUNTIME push $HO_IMAGE_REPO:$TAG

Quick One-Liner

Build and push in one command:

TAG="my-fix-1" && $RUNTIME build -f Dockerfile --platform linux/amd64 -t $HO_IMAGE_REPO:$TAG . && $RUNTIME push $HO_IMAGE_REPO:$TAG

Iteration Workflow

When iterating on HO fixes:

  1. Make code changes in hypershift-operator/
  2. Build and push image with incremented tag (e.g., fix-1, fix-2, fix-3)
  3. Reinstall HyperShift with new image
  4. Run e2e test or manual validation
  5. Analyze results
  6. Repeat until test passes

What Gets Built

The main Dockerfile builds:

  • hypershift CLI binary
  • hypershift-no-cgo binary
  • hypershift-operator binary
  • karpenter-operator binary
  • hcp (product CLI) binary

All are included in the final image.

Troubleshooting

Build Fails

  • Check that vendored dependencies are up to date: go mod vendor
  • Ensure code compiles locally: make hypershift-operator
  • Check for API generation issues: make api

Push Fails

  • Verify registry login: $RUNTIME login quay.io
  • Check repository permissions

Operator Not Running After Install

  • Check operator logs: kubectl logs -n hypershift deployment/operator
  • Verify image pull succeeded: kubectl describe pod -n hypershift -l app=operator
  • Ensure cluster can pull from registry

Changes Not Reflected

  • Make sure you're using the correct image tag
  • Check if old pods are still running: kubectl get pods -n hypershift
  • Force rollout: kubectl rollout restart deployment/operator -n hypershift

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts5mo3 checks · Risk SAFE
  • Gen Agent Trust Hub5mo

    This skill provides a standard developer workflow for building and pushing HyperShift-Operator container images. It uses common tools like container runtimes (Podman/Docker), Git, and Make, following best practices for local environment configuration.

  • Socket5mo

    No alerts

  • Snyk5mo

    Risk: LOW · No issues

Signed by skilld at 0f43b29. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 5 days ago
  • hypershift
  • container-image
  • docker
  • podman
  • kubernetes
  • operator
  • openshift
  • build

README badge

README badge for openshift/hypershift/build-ho-image

Builds and pushes a custom hypershift-operator container image for testing code changes against a live HyperShift cluster. Automates the container build process (which compiles the operator binary, CLI tools, and related binaries) and image push, with a workflow for iterating on fixes via e2e tests.

Generated from the current SKILL.md.

Does this skill work with Docker and Podman?
Yes. The skill uses the `$RUNTIME` environment variable from `dev/claude-env.sh`, which can be set to either docker or podman.
What binaries are included in the built image?
The image includes hypershift, hypershift-no-cgo, hypershift-operator, karpenter-operator, and hcp (product CLI) binaries.
Do I need to source the environment file before using this skill?
Yes. You must source `dev/claude-env.sh` before building, as it sets `HO_IMAGE_REPO` and `RUNTIME`.
What should I do if the operator pod is not running after pushing a new image?
Check operator logs with `kubectl logs -n hypershift deployment/operator`, verify image pull with `kubectl describe pod`, and force a rollout restart with `kubectl rollout restart deployment/operator -n hypershift`.
What platforms does the build support?
The build is configured for linux/amd64 via the `--platform` flag in the Dockerfile build command.

Generated from the current SKILL.md. These answers refresh after source changes.