RedHat Operator Bundle 인증 프로세스
이 문서는 RedHat Marketplace에 대한 OLM 번들 제출 인증 프로세스를 설명합니다. 이는 Red Hat 소프트웨어 인증 워크플로우 가이드를 기반으로 합니다.
다음 프로세스는 scripts/tools/publish.sh
에서 부분적으로 자동화되었습니다.
publish.sh ${VERSION} redhat-marketplace
를 사용하여 이 프로세스를 실행할 수 있습니다.
자세한 내용은 스크립트 문서를 참조하십시오.
이 문서 전반에 걸쳐 공통 클러스터 인프라 및 공통 GitHub 계정(gl-distribution-oc
)이 사용됩니다. 사용자 정의 클러스터/GitHub 계정을 사용하는 경우 이에 따라 조정하십시오.
OpenShift 클러스터 프로비저닝
전제 조건
-
개인 SSH 키가
gl-distribution-oc
GitHub 계정에 추가됨(로컬 복사는${HOME}/.ssh/gldoc_github
에 위치, 아래 참조) -
Git 작업은
gl-distribution-oc
리포지토리에 접근하기 위해 별도의 SSH 키가 필요하므로 (1)에서 키를 사용하는 샘플 래퍼 스크립트(operator_certification.sh
)가 도움이 될 수 있습니다. GitHub는 다른 로드된 개인 키가 먼저 제공되면 연결을 거부할 수 있습니다:#!/bin/sh OC_SSH_KEYFILE=${OC_SSH_KEYFILE:-"${HOME}/.ssh/gldoc_github"} export GIT_SSH_COMMAND="ssh -i ${OC_SSH_KEYFILE} -o IdentitiesOnly=yes" exec $@
-
olm_bundle.sh
전제 조건:task
yq
opm
환경 설정
클러스터는 배포 파이프라인을 사용하여 배포됩니다. 해당 클러스터의 파이프라인 deploy_cluster
작업에서 아티팩트를 가져옵니다.
VERSION="0.11.0"
# CLUSTER_DIR: "deploy_cluster" 작업의 아티팩트가 위치한 디렉토리
CLUSTER_DIR=${HOME}/clusters/redhat-certification-ocp49
export TKN=${CLUSTER_DIR}/bin/tkn
# Provisioned 클러스터의 "admin" 수준 kubeconfig 사용
export KUBECONFIG=${CLUSTER_DIR}/auth/kubeconfig
export GIT_USERNAME="gl-distribution-oc"
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# 아래 이메일은 우리의 임시 해결책이므로
# https://gitlab.com/gitlab-org/distribution/team-tasks/-/issues/1097
# 그리고
# https://gitlab.com/gitlab-org/distribution/team-tasks/-/issues/1082
# 해결될 때까지 그대로 사용하십시오.
export GIT_EMAIL="dmakovey+operator-certification@gitlab.com"
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
export GIT_FORK_REPO_URL="git@github.com:gl-distribution-oc/certified-operators.git"
export GIT_BRANCH="gitlab-operator-kubernetes-${VERSION}"
export OPERATOR_BUNDLE_PATH="operators/gitlab-operator-kubernetes/${VERSION}"
위의 셸 코드를 환경 파일(my.env
, 예를 들어)로 저장하고 필요한 곳에서 소스할 수 있습니다: source /path/to/my.env
.
리포지토리 설정
포크(된) 리포지토리
인증된 운영자와 마켓플레이스 운영자 모두에 대해 포크가 이미 생성되었습니다:
참고: 아래의 operator_certification.sh
래퍼 스크립트 사용은 선택 사항입니다.
-
포크를 로컬에 클론합니다:
pushd ${HOME} operator_certification.sh git clone git@github.com:gl-distribution-oc/certified-operators.git
-
포크의
main
브랜치를 최신 상태로 가져옵니다:git remote add upstream git@github.com:redhat-openshift-ecosystem/certified-operators.git git rebase -i upstream/main operator_certification.sh git push
-
릴리스를 위한 새 브랜치를 생성합니다:
git checkout -b gitlab-operator-kubernetes-${VERSION} CATALOG_REPO_CLONE=${HOME}/certified-operators
-
gitlab-operator
로컬 디렉토리로 돌아갑니다:popd
번들 생성
OSDK_BASE_DIR=".build/cert" \
DOCKER="podman" \
OLM_PACKAGE_VERSION=${VERSION} \
OPERATOR_TAG=${VERSION} \
scripts/olm_bundle.sh build_manifests generate_bundle patch_bundle
제출을 위한 번들 올바르게 주석 달기
BUNDLE_DIR=.build/cert/bundle PREVIOUS_OPERATOR_VERSION="x.y.z" OLM_UPGRADE_MODE="replaces" \
redhat/operator-certification/scripts/configure_bundle.sh adjust_annotations adjust_csv
포크된 리포지토리에 변경 사항 복사 및 푸시
이 시점에서 번들을 새로운 위치로 복사해야 하며, CATALOG_REPO_CLONE
의 값을 fork repository에서 가져옵니다:
cp -r .build/cert/bundle ${CATALOG_REPO_CLONE}/operators/gitlab-operator-kubernetes/${VERSION}
( cd ${CATALOG_REPO_CLONE} && git add operators/gitlab-operator-kubernetes/${VERSION} \
&& git commit -am "Add gitlab-operator-${VERSION}" \
&& operator_certification.sh git push origin gitlab-operator-kubernetes-${VERSION})
인증 파이프라인 실행
이 단계에서는 GitHub 사용자 이름과 이메일을 가져와서 GIT_USERNAME
및 GIT_EMAIL
로 사용해야 합니다.
OCP에서 적합한 프로젝트로 전환:
redhat/operator-certification/scripts/operator_certification_pipeline.sh \
set_project
작업 공간 템플릿 만들기:
redhat/operator-certification/scripts/operator_certification_pipeline.sh \
create_workspace_template
그런 다음 파이프라인 실행:
redhat/operator-certification/scripts/operator_certification_pipeline.sh \
run_certification_pipeline_automated
이것은 업스트림 PR을 생성하고 RedHat 포털에서 제출을 엽니다.