version-update

작성자: openshift

메인 브랜치용 릴리스 워크플로: 안정적인 Konflux 이미지(-r stable)로 related_images.json을 갱신하고, bundle/CSV 버전을 업데이트하며, 번들을 재생성하고 검증합니다.

npx skills add https://github.com/openshift/lightspeed-operator --skill version-update

Version Update (Release)

Invoke with /version-update X.Y.Z or /update-bundle release X.Y.Z.

Not for PR/CI — use /update-bundle dev.

Step 1: Refresh related_images.json (stable)

Prerequisite: oras and jq. Do not rely on oc.

./hack/related_images_from_quay.sh -r stable -o related_images.json

Use -r preview for tech-preview paths (registry.redhat.io/openshift-lightspeed-tech-preview/...).

Resolves oras resolve <konflux_prefix>:<revision>, then rewrites konflux_prefixstable_prefix in the digest URL. External entries (no konflux_prefix) are unchanged.

Konflux-managed entries must keep konflux_prefix and stable_prefix. See docs/olm-bundle-management.md.

Optional: hack/snapshot_to_image_list.sh only to discover new revision values from Konflux when oc is available; then run related_images_from_quay.sh again.

If CRD/RBAC changed since last bundle, run make manifests before regenerating the bundle (Step 4).


Update the version in two files. They must all match.

Critical Rules

  • The CSV name field includes a v prefix (e.g., lightspeed-operator.v1.0.8)
  • The CSV version field does NOT have a prefix (e.g., 1.0.8)
  • Both files MUST have matching version numbers
  • Always regenerate the bundle after version changes

Files to Update

1. bundle.Dockerfile — Bundle container labels (lines 63 and 66)

LABEL release=X.Y.Z
# ...
LABEL version=X.Y.Z

2. bundle/manifests/lightspeed-operator.clusterserviceversion.yaml — CSV metadata

Line 58:

name: lightspeed-operator.vX.Y.Z

Line 715:

version: X.Y.Z

Note: Line numbers are approximate and may shift. Use search to locate:

  • Search for name: lightspeed-operator.v (around line 58)
  • Search for version: near the end of the file (around line 715)

Step-by-Step Process

Step 2: Update bundle.Dockerfile

# Update both LABEL release and LABEL version
sed -i '' 's/^LABEL release=.*/LABEL release=X.Y.Z/' bundle.Dockerfile
sed -i '' 's/^LABEL version=.*/LABEL version=X.Y.Z/' bundle.Dockerfile

Or manually edit lines 63 and 66.

Step 3: Update CSV metadata

Line ~58 (name field with v prefix):

name: lightspeed-operator.vX.Y.Z

Line ~715 (version field WITHOUT prefix):

version: X.Y.Z

Step 4: Regenerate Bundle

After updating both files, regenerate the bundle:

make bundle BUNDLE_TAG=X.Y.Z

Or use the script:

hack/update_bundle.sh -v X.Y.Z -i related_images.json

This ensures all generated files are consistent with the new version and stable images.

operator-sdk bundle validate ./bundle

Step 5: Verify Changes

git diff bundle.Dockerfile related_images.json bundle/

Confirm:

  • related_images.json uses stable registry.redhat.io images for Konflux-managed entries (via konflux_prefixstable_prefix mapping)
  • External/manual entries (no snapshot_component) are pinned correctly and unchanged by prefix mapping
  • bundle.Dockerfile has release=X.Y.Z and version=X.Y.Z
  • CSV name field: lightspeed-operator.vX.Y.Z (with v prefix)
  • CSV version field: X.Y.Z (without prefix)
  • CSV relatedImages and deployment args match related_images.json
  • All generated bundle files are updated

Step 6: Commit (only when user asks)

git add bundle.Dockerfile related_images.json bundle/
git commit -m "OLS-XXXX: Release vX.Y.Z"

Checklist

  • related_images.json refreshed with -r stable
  • bundle.Dockerfile updated (lines 63, 66)
  • bundle/manifests/lightspeed-operator.clusterserviceversion.yaml name updated (line ~58, with v prefix)
  • bundle/manifests/lightspeed-operator.clusterserviceversion.yaml version updated (line ~715, without prefix)
  • Bundle regenerated with make bundle BUNDLE_TAG=X.Y.Z or hack/update_bundle.sh -v X.Y.Z -i related_images.json
  • operator-sdk bundle validate ./bundle passes
  • Both version files have matching X.Y.Z
  • Changes committed (when requested)

Common Mistakes to Avoid

❌ Forgetting the v prefix in CSV name field ❌ Adding a v prefix to CSV version field ❌ Updating only one file ❌ Not regenerating the bundle after changes ❌ Mismatched version numbers between files ❌ Bumping version without refreshing stable images (-r stable) ❌ Konflux-managed entries missing konflux_prefix / stable_prefix (stable refresh cannot map to product registry) ❌ Merging dev quay images from /update-bundle dev to main without re-running this skill

Related

  • /update-bundle dev — PR/CI (related_images_from_quay.sh -r ci)
  • docs/olm-bundle-management.md — bundle structure
  • hack/related_images_from_quay.sh — Quay digest refresh
  • hack/release_tools.md — release tooling

openshift의 다른 스킬

openshift-expert
openshift
OpenShift 플랫폼 및 Kubernetes 전문가로, 클러스터 아키텍처, 오퍼레이터, 네트워킹, 스토리지, 문제 해결 및 CI/CD 파이프라인에 대한 깊은 지식을 보유하고 있습니다. 사용…
official
find-token
openshift
숨겨진 인증 토큰을 찾습니다. find-token 스크립트를 실행하여 고유 토큰을 검색하세요.
official
code-review
openshift
풀 리퀘스트의 코드 품질, 정확성, 프로젝트 규칙을 검토합니다. 사용자가 PR 검토, 코드 리뷰, 또는 변경 사항 확인을 요청할 때 사용하세요.
official
css-review
openshift
CSS 코딩 스타일, PatternFly 토큰 사용, 모범 사례를 검토합니다. 사용자가 CSS 검토, 스타일 확인, 또는 CSS 파일 감사를 요청할 때 사용하세요.
official
review-readmes
openshift
리포지토리의 모든 README.md 파일을 검토하여 오타, 오류, 오래된 정보를 찾습니다. 사용자가 README 검토, 문서 정확성 확인 등을 요청할 때 사용합니다.
official
review-skills
openshift
프로젝트 AI 스킬의 중복, 오래된 참조, 오류 및 구조적 문제를 검토합니다. 사용자가 스킬 검토, 스킬 감사, 확인 등을 요청할 때 사용하세요.
official
test
openshift
태그로 필터링된 종단 간 테스트를 실행합니다. 사용자가 테스트 실행, Playwright 실행, 또는 @core나 @attach 같은 특정 기능 태그를 테스트하도록 요청할 때 사용하세요.
official
unused-exports
openshift
다른 파일에서 가져오지 않은 내보낸 심볼을 찾습니다. 사용자가 "내보내기 확인", "사용되지 않는 내보내기"라고 말하거나 내보내기를 정리하도록 요청할 때 사용하세요.
official