6.2. Operator 수정


지원 설치 관리자에서는 이전 설치 단계의 일부로 이미 등록된 클러스터 리소스의 Operator를 추가하거나 제거할 수 있습니다. 이는 OpenShift Container Platform 설치를 시작하기 전에만 가능합니다.

정의된 Operator를 수정하려면 다음을 수행합니다.

  • 지원 설치 관리자 UI를 사용하는 경우 마법사의 Operator 페이지로 이동하여 선택을 수정합니다. 자세한 내용은 이 섹션에서 Operator 설치를 참조하십시오.
  • 지원 설치 프로그램 API를 사용하는 경우 /v2/clusters/{cluster_id} 엔드포인트에 PATCH 방법을 사용하여 필요한 Operator 정의를 설정합니다.

사전 요구 사항

  • 새 클러스터 리소스가 생성되어 있습니다.

절차

  1. API 토큰을 새로 고칩니다.

    $ source refresh-token
  2. 다음과 같이 기존 클러스터를 나열하여 CLUSTER_ID 변수를 식별합니다.

    $ curl -s https://api.openshift.com/api/assisted-install/v2/clusters -H "Authorization: Bearer ${API_TOKEN}" | jq '[ .[] | { "name": .name, "id": .id } ]'

    샘플 출력

    [
      {
        "name": "lvmtest",
        "id": "475358f9-ed3a-442f-ab9e-48fd68bc8188" 1
      },
      {
        "name": "mcetest",
        "id": "b5259f97-be09-430e-b5eb-d78420ee509a"
      }
    ]

    참고
    1
    id 값은 < cluster_id>입니다.
  3. 반환된 &lt ;cluster_id& gt;를 CLUSTER_ID 변수에 할당하고 내보냅니다.

    $ export CLUSTER_ID=<cluster_id>
  4. 새 Operator로 클러스터를 업데이트합니다.

    $ curl https://api.openshift.com/api/assisted-install/v2/clusters/${CLUSTER_ID} \
    -X PATCH \
    -H "Authorization: Bearer ${API_TOKEN}" \
    -H "Content-Type: application/json" \
    -d '
    {
        "olm_operators": [{"name": "mce"}, {"name": "cnv"}], 1
    }
    ' | jq '.id'
    참고
    1
    Operator가 설치됨을 나타냅니다. 유효한 값에는 mce,cnv,lvm, odf 가 포함됩니다. 이전에 설치한 Operator를 제거하려면 값 목록에서 제외합니다. 이전에 설치한 모든 Operator를 제거하려면 "olm_operators": [] 를 입력합니다.

    샘플 출력

    {
      <various cluster properties>,
      "monitored_operators": [
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "console",
          "operator_type": "builtin",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "timeout_seconds": 3600
        },
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "cvo",
          "operator_type": "builtin",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "timeout_seconds": 3600
        },
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "mce",
          "namespace": "multicluster-engine",
          "operator_type": "olm",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "subscription_name": "multicluster-engine",
          "timeout_seconds": 3600
        },
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "cnv",
          "namespace": "openshift-cnv",
          "operator_type": "olm",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "subscription_name": "hco-operatorhub",
          "timeout_seconds": 3600
        },
        {
          "cluster_id": "b5259f97-be09-430e-b5eb-d78420ee509a",
          "name": "lvm",
          "namespace": "openshift-local-storage",
          "operator_type": "olm",
          "status_updated_at": "0001-01-01T00:00:00.000Z",
          "subscription_name": "local-storage-operator",
          "timeout_seconds": 4200
        }
      ],
      <more cluster properties>

    참고

    출력은 새 클러스터 상태에 대한 설명입니다. 출력의 monitored_operators 속성에는 다음 두 가지 유형의 Operator가 포함되어 있습니다.

    • "operator_type": "builtin ": 이 유형의 Operator는 OpenShift Container Platform의 통합 부분입니다.
    • "operator_type": "olm ": 이 유형의 Operator는 사용자가 수동으로 추가하거나 종속성으로 인해 자동으로 추가됩니다. 이 예제에서는 cnv Operator에 필요하므로 lso Operator가 자동으로 추가되었습니다.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.