7.3.8. Operator 업데이트


CR(사용자 정의 리소스)을 수동으로 편집하고 변경 사항을 적용하여 Operator 또는 확장을 업데이트할 수 있습니다.

사전 요구 사항

  • 카탈로그가 설치되어 있어야 합니다.
  • 카탈로그 파일의 로컬 사본을 다운로드했습니다.
  • Operator 또는 확장이 설치되어 있어야 합니다.
  • jq CLI 툴을 설치했습니다.

프로세스

  1. 다음 단계를 완료하여 카탈로그 파일의 로컬 사본에서 채널 및 버전 정보에 대한 패키지를 검사합니다.

    1. 다음 명령을 실행하여 선택한 패키지에서 채널 목록을 가져옵니다.

      $ jq -s '.[] | select( .schema == "olm.channel" ) | \
        select( .package == "<package_name>") | \
        .name' /<path>/<catalog_name>.json

      예 7.16. 명령 예

      $ jq -s '.[] | select( .schema == "olm.channel" ) | \
        select( .package == "openshift-pipelines-operator-rh") | \
        .name' /home/username/rhoc.json

      예 7.17. 출력 예

      "latest"
      "pipelines-1.11"
      "pipelines-1.12"
      "pipelines-1.13"
    2. 다음 명령을 실행하여 채널에 게시된 버전 목록을 가져옵니다.

      $ jq -s '.[] | select( .package == "<package_name>" ) | \
        select( .schema == "olm.channel" ) | \
        select( .name == "<channel_name>" ) | .entries | \
        .[] | .name' /<path>/<catalog_name>.json

      예 7.18. 명령 예

      $ jq -s '.[] | select( .package == "openshift-pipelines-operator-rh" ) | \
      select( .schema == "olm.channel" ) | select( .name == "latest" ) | \
      .entries | .[] | .name' /home/username/rhoc.json

      예 7.19. 출력 예

      "openshift-pipelines-operator-rh.v1.11.1"
      "openshift-pipelines-operator-rh.v1.12.0"
      "openshift-pipelines-operator-rh.v1.12.1"
      "openshift-pipelines-operator-rh.v1.12.2"
      "openshift-pipelines-operator-rh.v1.13.0"
      "openshift-pipelines-operator-rh.v1.13.1"
  2. 다음 명령을 실행하여 Operator 또는 확장의 CR에 지정된 버전 또는 채널을 확인합니다.

    $ oc get operator.operators.operatorframework.io <operator_name> -o yaml

    명령 예

    $ oc get operator.operators.operatorframework.io pipelines-operator -o yaml

    예 7.20. 출력 예

    apiVersion: operators.operatorframework.io/v1alpha1
    kind: Operator
    metadata:
      annotations:
        kubectl.kubernetes.io/last-applied-configuration: |  {"apiVersion":"operators.operatorframework.io/v1alpha1","kind":"Operator","metadata":{"annotations":{},"name":"pipelines-operator"},"spec":{"channel":"latest","packageName":"openshift-pipelines-operator-rh","version":"1.11.1"}}
      creationTimestamp: "2024-02-06T17:47:15Z"
      generation: 2
      name: pipelines-operator
      resourceVersion: "84528"
      uid: dffe2c89-b9c4-427e-b694-ada0b37fc0a9
    spec:
      channel: latest 
    1
    
      packageName: openshift-pipelines-operator-rh
      upgradeConstraintPolicy: Enforce
      version: 1.11.1 
    2
    
    status:
      conditions:
      - lastTransitionTime: "2024-02-06T17:47:21Z"
        message: bundledeployment status is unknown
        observedGeneration: 2
        reason: InstallationStatusUnknown
        status: Unknown
        type: Installed
      - lastTransitionTime: "2024-02-06T17:50:58Z"
        message: resolved to "registry.redhat.io/openshift-pipelines/pipelines-operator-bundle@sha256:e09d37bb1e754db42324fd18c1cb3e7ce77e7b7fcbf4932d0535391579938280"
        observedGeneration: 2
        reason: Success
        status: "True"
        type: Resolved
      resolvedBundleResource: registry.redhat.io/openshift-pipelines/pipelines-operator-bundle@sha256:e09d37bb1e754db42324fd18c1cb3e7ce77e7b7fcbf4932d0535391579938280
    1
    Operator 또는 확장의 채널을 지정합니다.
    2
    Operator 또는 확장의 버전 범위를 지정합니다.
    참고

    채널을 지정하거나 Operator 또는 확장의 CR에 버전 범위를 정의하면 OLM 1.0에 클러스터에 설치된 확인된 버전이 표시되지 않습니다. CR에 지정된 버전 및 채널 정보만 표시됩니다.

    설치된 특정 버전을 찾으려면 spec.source.image.ref 필드의 SHA를 카탈로그의 이미지 참조와 비교해야 합니다.

  3. 다음 방법 중 하나를 사용하여 CR을 편집합니다.

    • Operator 또는 확장을 1.12.1 과 같은 특정 버전으로 고정하려면 다음 예와 유사한 CR을 편집합니다.

      pipelines-operator.yaml CR의 예

      apiVersion: operators.operatorframework.io/v1alpha1
      kind: Operator
      metadata:
        name: pipelines-operator
      spec:
        packageName: openshift-pipelines-operator-rh
        version: 1.12.1 
      1

      1
      버전 1.11.1 에서 1.12.1로 업데이트
    • 허용 가능한 업데이트 버전의 범위를 정의하려면 다음 예와 유사한 CR을 편집합니다.

      버전 범위가 지정된 CR의 예

      apiVersion: operators.operatorframework.io/v1alpha1
      kind: Operator
      metadata:
        name: pipelines-operator
      spec:
        packageName: openshift-pipelines-operator-rh
        version: ">1.11.1, <1.13" 
      1

      1
      원하는 버전 범위가 버전 1.11.1 보다 크고 1.13 보다 작도록 지정합니다. 자세한 내용은 "버전 범위 지원" 및 "버전 비교 문자열"을 참조하십시오.
    • 채널에서 확인할 수 있는 최신 버전으로 업데이트하려면 다음 예제와 유사한 CR을 편집합니다.

      지정된 채널이 있는 CR의 예

      apiVersion: operators.operatorframework.io/v1alpha1
      kind: Operator
      metadata:
        name: pipelines-operator
      spec:
        packageName: openshift-pipelines-operator-rh
        channel: pipelines-1.13 
      1

      1
      지정된 채널에서 확인할 수 있는 최신 릴리스를 설치합니다. 채널 업데이트가 자동으로 설치됩니다.
    • 채널 및 버전 범위를 지정하려면 다음 예와 유사한 CR을 편집합니다.

      지정된 채널 및 버전 범위가 있는 CR의 예

      apiVersion: operators.operatorframework.io/v1alpha1
      kind: Operator
      metadata:
        name: pipelines-operator
      spec:
        packageName: openshift-pipelines-operator-rh
        channel: latest
        version: "<1.13"

      자세한 내용은 "대상 버전을 지정하는 CR(사용자 정의 리소스) 예"를 참조하십시오.

  4. 다음 명령을 실행하여 클러스터에 업데이트를 적용합니다.

    $ oc apply -f pipelines-operator.yaml

    출력 예

    operator.operators.operatorframework.io/pipelines-operator configured

    작은 정보

    다음 명령을 실행하여 CLI에서 CR을 패치하고 적용할 수 있습니다.

    $ oc patch operator.operators.operatorframework.io/pipelines-operator -p \
      '{"spec":{"version":"1.12.1"}}' \
      --type=merge

    출력 예

    operator.operators.operatorframework.io/pipelines-operator patched

검증

  • 다음 명령을 실행하여 채널 및 버전 업데이트가 적용되었는지 확인합니다.

    $ oc get operator.operators.operatorframework.io pipelines-operator -o yaml

    예 7.21. 출력 예

    apiVersion: operators.operatorframework.io/v1alpha1
    kind: Operator
    metadata:
      annotations:
        kubectl.kubernetes.io/last-applied-configuration: |
          {"apiVersion":"operators.operatorframework.io/v1alpha1","kind":"Operator","metadata":{"annotations":{},"name":"pipelines-operator"},"spec":{"channel":"latest","packageName":"openshift-pipelines-operator-rh","version":"1.12.1"}}
      creationTimestamp: "2024-02-06T19:16:12Z"
      generation: 4
      name: pipelines-operator
      resourceVersion: "58122"
      uid: 886bbf73-604f-4484-9f87-af6ce0f86914
    spec:
      channel: latest
      packageName: openshift-pipelines-operator-rh
      upgradeConstraintPolicy: Enforce
      version: 1.12.1 
    1
    
    status:
      conditions:
      - lastTransitionTime: "2024-02-06T19:30:57Z"
        message: installed from "registry.redhat.io/openshift-pipelines/pipelines-operator-bundle@sha256:2f1b8ef0fd741d1d686489475423dabc07c55633a4dfebc45e1d533183179f6a"
        observedGeneration: 3
        reason: Success
        status: "True"
        type: Installed
      - lastTransitionTime: "2024-02-06T19:30:57Z"
        message: resolved to "registry.redhat.io/openshift-pipelines/pipelines-operator-bundle@sha256:2f1b8ef0fd741d1d686489475423dabc07c55633a4dfebc45e1d533183179f6a"
        observedGeneration: 3
        reason: Success
        status: "True"
        type: Resolved
      installedBundleResource: registry.redhat.io/openshift-pipelines/pipelines-operator-bundle@sha256:2f1b8ef0fd741d1d686489475423dabc07c55633a4dfebc45e1d533183179f6a
      resolvedBundleResource: registry.redhat.io/openshift-pipelines/pipelines-operator-bundle@sha256:2f1b8ef0fd741d1d686489475423dabc07c55633a4dfebc45e1d533183179f6a
    1
    버전이 1.12.1 로 업데이트되었는지 확인합니다.

문제 해결

  • 존재하지 않는 대상 버전 또는 채널을 지정하는 경우 다음 명령을 실행하여 Operator 또는 확장 상태를 확인할 수 있습니다.

    $ oc get operator.operators.operatorframework.io <operator_name> -o yaml

    예 7.22. 출력 예

    oc get operator.operators.operatorframework.io pipelines-operator -o yaml
    apiVersion: operators.operatorframework.io/v1alpha1
    kind: Operator
    metadata:
      annotations:
        kubectl.kubernetes.io/last-applied-configuration: |
          {"apiVersion":"operators.operatorframework.io/v1alpha1","kind":"Operator","metadata":{"annotations":{},"name":"pipelines-operator"},"spec":{"channel":"latest","packageName":"openshift-pipelines-operator-rh","version":"2.0.0"}}
      creationTimestamp: "2024-02-06T17:47:15Z"
      generation: 1
      name: pipelines-operator
      resourceVersion: "82667"
      uid: dffe2c89-b9c4-427e-b694-ada0b37fc0a9
    spec:
      channel: latest
      packageName: openshift-pipelines-operator-rh
      upgradeConstraintPolicy: Enforce
      version: 2.0.0
    status:
      conditions:
      - lastTransitionTime: "2024-02-06T17:47:21Z"
        message: installation has not been attempted due to failure to gather data for
          resolution
        observedGeneration: 1
        reason: InstallationStatusUnknown
        status: Unknown
        type: Installed
      - lastTransitionTime: "2024-02-06T17:47:21Z"
        message: no package "openshift-pipelines-operator-rh" matching version "2.0.0"
          found in channel "latest"
        observedGeneration: 1
        reason: ResolutionFailed
        status: "False"
        type: Resolved

7.3.8.1. 의미 체계 버전 관리 지원

OLM 1.0에서는 기본적으로 의미 체계 버전 관리(semver) 지원이 활성화됩니다. Operator 및 확장 작성자는 semver 표준을 사용하여 호환 가능한 업데이트를 정의할 수 있습니다.

OLM(Operator Lifecycle Manager) 1.0은 Operator 또는 확장의 버전 번호를 사용하여 업데이트를 성공적으로 해결할 수 있는지 확인할 수 있습니다.

클러스터 관리자는 설치 및 자동 업데이트할 수 있는 다양한 버전을 정의할 수 있습니다. semver 표준을 따르는 Operator 및 확장의 경우 비교 문자열을 사용하여 원하는 버전 범위를 지정할 수 있습니다.

참고

OLM 1.0은 다음 주요 버전에 대한 자동 업데이트를 지원하지 않습니다. 주요 버전 업데이트를 수행하려면 수동으로 업데이트를 확인하고 적용해야 합니다. 자세한 내용은 "업데이트 또는 롤백 요청"을 참조하십시오.

7.3.8.1.1. 메이저 버전 제로 릴리스

semver 표준은 주요 버전 0 릴리스(O.y.z)가 초기 개발을 위해 예약되어 있음을 지정합니다. 초기 개발 단계에서 API는 안정적이지 않으며 변경 사항이 모든 게시된 버전에 도입될 수 있습니다. 결과적으로 메이저 버전 제로 릴리스는 특수 업데이트 조건 세트를 적용합니다.

메이저 버전 제로 릴리스의 업데이트 조건

  • 메이저 버전과 마이너 버전이 모두 0이면 자동 업데이트를 적용할 수 없습니다(예: 0.0.* ). 예를 들어 버전 범위가 >=0. 0.1 <0.1.0 인 자동 업데이트는 허용되지 않습니다.
  • 주요 버전 0 릴리스 내에서 하나의 마이너 버전에서 다른 마이너 버전에 자동 업데이트를 적용할 수 없습니다. 예를 들어 OLM 1.0은 0.1.0 에서 0.2.0 까지의 업데이트를 자동으로 적용하지 않습니다.
  • 패치 버전에서 자동 업데이트를 적용할 수 있습니다 (예: >=0. 1.0 <0.2.0 또는 >=0. 2.0 <0.3.0 ).

OLM 1.0에서 자동 업데이트가 차단되면 Operator 또는 확장의 CR(사용자 정의 리소스)을 편집하여 수동으로 업데이트를 확인하고 강제 적용해야 합니다.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

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

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

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

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동