5.6.4. 최신 Operator SDK 버전을 위한 프로젝트 업데이트


OpenShift Container Platform 4.12는 Operator SDK 1.25.4를 지원합니다. 워크스테이션에 1.22.2 CLI가 이미 설치되어 있는 경우 최신 버전을 설치하여 CLI를 1.25.4로 업데이트할 수 있습니다.

그러나 기존 Operator 프로젝트에서 Operator SDK 1.25.4와의 호환성을 유지하려면 1.22.2 이후의 중단된 변경 사항에 대한 업데이트 단계가 필요합니다. 1.22.2를 사용하여 이전에 생성되거나 유지 관리되는 Operator 프로젝트에서 업데이트 단계를 수동으로 수행해야 합니다.

5.6.4.1. Operator SDK 1.25.4에 대한 Java 기반 Operator 프로젝트 업데이트

다음 절차에서는 1.25.4와의 호환성을 위해 기존 Java 기반 Operator 프로젝트를 업데이트합니다.

사전 요구 사항

  • Operator SDK 1.25.4가 설치됨
  • Operator SDK 1.22.2를 사용하여 생성되거나 유지 관리되는 Operator 프로젝트

프로세스

  1. config/default/manager_auth_proxy_patch.yaml 파일을 다음과 같이 변경합니다.

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: controller-manager
      namespace: system
    spec:
      template:
        spec:
          containers:
          - name: kube-rbac-proxy
            image: registry.redhat.io/openshift4/ose-kube-rbac-proxy:v4.12 
    1
    
            args:
            - "--secure-listen-address=0.0.0.0:8443"
            - "--upstream=http://127.0.0.1:8080/"
            - "--logtostderr=true"
            - "--v=0"
    ...
    1
    태그 버전을 v4.11 에서 v4.12 로 업데이트합니다.
  2. Makefile 을 다음과 같이 변경합니다.

    1. 다중 아키텍처 빌드 지원을 활성화하려면 docker-buildx 대상을 프로젝트 Makefile 에 추가합니다.

      Makefile의 예

      # PLATFORMS defines the target platforms for  the manager image be build to provide support to multiple
      # architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
      # - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
      # - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
      # - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> than the export will fail)
      # To properly provided solutions that supports more than one platform you should use this option.
      PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
      .PHONY: docker-buildx
      docker-buildx: test ## Build and push docker image for the manager for cross-platform support
      	# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
      	sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
      	- docker buildx create --name project-v3-builder
      	docker buildx use project-v3-builder
      	- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross
      	- docker buildx rm project-v3-builder
      	rm Dockerfile.cross

    2. Makefile 에 변경 사항을 적용하고 Operator를 다시 빌드하려면 다음 명령을 입력합니다.

      $ make
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동