Build and push hypershift-operator container image. Auto-applies when testing HO changes that require deploying to a live cluster.
This skill enables building and pushing custom hypershift-operator (HO) images for testing changes in a live HyperShift environment.
This skill automatically applies when:
hypershift-operator/Source the environment file before using this skill:
source dev/claude-env.sh
Environment variables from dev/claude-env.sh:
| Variable | Description |
|---|---|
HO_IMAGE_REPO | Container registry for HO images |
RUNTIME | Container runtime (podman/docker) |
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"
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.
$RUNTIME push $HO_IMAGE_REPO:$TAG
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
When iterating on HO fixes:
hypershift-operator/fix-1, fix-2, fix-3)The main Dockerfile builds:
hypershift CLI binaryhypershift-no-cgo binaryhypershift-operator binarykarpenter-operator binaryhcp (product CLI) binaryAll are included in the final image.
go mod vendormake hypershift-operatormake api$RUNTIME login quay.iokubectl logs -n hypershift deployment/operatorkubectl describe pod -n hypershift -l app=operatorkubectl get pods -n hypershiftkubectl rollout restart deployment/operator -n hypershift