검색

1.17. DiscoveredCluster API

download PDF

1.17.1. 개요

이 문서는 Red Hat Advanced Cluster Management for Kubernetes용 DiscoveredCluster 리소스에 대한 것입니다. DiscoveredCluster 리소스에는 생성, 쿼리, 삭제 및 업데이트의 네 가지 요청이 있습니다.

1.17.1.1. 버전 정보

버전 : 2.11.0

1.17.1.2. URI 스키마

BasePath : /kubernetes/apis
Schemes : HTTPS

1.17.1.3. 태그

  • discoveredclusters.discovery.open-cluster-management.io : DiscoveredClusters 생성 및 관리

1.17.2. 경로

1.17.2.1. DiscoveredCluster 만들기

POST /app.k8s.io/v1/namespaces/{namespace}/discoveredclusters
1.17.2.1.1. 설명

DiscoveredCluster를 만듭니다.

1.17.2.1.2. 매개 변수
유형이름설명스키마

헤더

COOKIE
필요

권한 부여: Bearer {ACCESS_TOKEN}; ACCESS_TOKEN은 사용자 액세스 토큰입니다.

string

경로

네임스페이스
필요

사용할 네임스페이스(예: default)입니다.

string

본문

본문
필요

생성할 DiscoveredCluster를 설명하는 매개변수입니다.

DiscoveredCluster

1.17.2.1.3. 응답
HTTP 코드설명스키마

200

성공

콘텐츠 없음

403

액세스 금지

콘텐츠 없음

404

리소스를 찾을 수 없음

콘텐츠 없음

500

내부 서비스 오류

콘텐츠 없음

503

서비스를 사용할 수 없음

콘텐츠 없음

1.17.2.1.4. 사용
  • discoveredclusters/yaml
1.17.2.1.5. 태그
  • discoveredclusters.discovery.open-cluster-management.io
1.17.2.1.5.1. 요청 본문
{
  "apiVersion": "apiextensions.k8s.io/v1",
  "kind": "CustomResourceDefinition",
  "metadata": {
    "annotations": {
      "controller-gen.kubebuilder.io/version": "v0.4.1",\
    },
    "creationTimestamp": null,
    "name": "discoveredclusters.discovery.open-cluster-management.io",
  },
  "spec": {
    "group": "discovery.open-cluster-management.io",
    "names": {
      "kind": "DiscoveredCluster",
      "listKind": "DiscoveredClusterList",
      "plural": "discoveredclusters",
      "singular": "discoveredcluster"
    },
    "scope": "Namespaced",
    "versions": [
      {
        "name": "v1",
        "schema": {
          "openAPIV3Schema": {
            "description": "DiscoveredCluster is the Schema for the discoveredclusters API",
            "properties": {
              "apiVersion": {
                "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
                "type": "string"
              },
              "kind": {
                "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                "type": "string"
              },
              "metadata": {
                "type": "object"
              },
              "spec": {
                "description": "DiscoveredClusterSpec defines the desired state of DiscoveredCluster",
                "properties": {
                  "activityTimestamp": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "apiUrl": {
                    "type": "string"
                  },
                  "cloudProvider": {
                    "type": "string"
                  },
                  "console": {
                    "type": "string"
                  },
                  "creationTimestamp": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "credential": {
                    "description": "ObjectReference contains enough information to let you inspect or modify the referred object. --- New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.  1. Ignored fields.  It includes many fields which are not generally honored.  For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.  2. Invalid usage help.  It is impossible to add specific help for individual usage.  In most embedded usages, there are particular     restrictions like, \"must refer only to types A and B\" or \"UID not honored\" or \"name must be restricted\".     Those cannot be well described when embedded.  3. Inconsistent validation.  Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.  4. The fields are both imprecise and overly precise.  Kind is not a precise mapping to a URL. This can produce ambiguity     during interpretation and require a REST mapping.  In most cases, the dependency is on the group,resource tuple     and the version of the actual struct is irrelevant.  5. We cannot easily change it.  Because this type is embedded in many locations, updates to this type     will affect numerous schemas.  Don't make new APIs embed an underspecified API type they do not control. Instead of using this type, create a locally provided and used type that is well-focused on your reference. For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .",
                    "properties": {
                      "apiVersion": {
                        "description": "API version of the referent.",
                        "type": "string"
                      },
                      "fieldPath": {
                        "description": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.",
                        "type": "string"
                      },
                      "kind": {
                        "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
                        "type": "string"
                      },
                      "name": {
                        "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                        "type": "string"
                      },
                      "namespace": {
                        "description": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",
                        "type": "string"
                      },
                      "resourceVersion": {
                        "description": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
                        "type": "string"
                      },
                      "uid": {
                        "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "displayName": {
                    "type": "string"
                  },
                  "isManagedCluster": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "string"
                  },
                  "openshiftVersion": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  }
                },
                "required": [
                  "apiUrl",
                  "displayName",
                  "isManagedCluster",
                  "name",
                  "type"
                ],
                "type": "object"
              },
              "status": {
                "description": "DiscoveredClusterStatus defines the observed state of DiscoveredCluster",
                "type": "object"
              }
            },
            "type": "object"
          }
        },
        "served": true,
        "storage": true,
        "subresources": {
          "status": {}
        }
      }
    ]
  },
  "status": {
    "acceptedNames": {
      "kind": "",
      "plural": ""
    },
    "conditions": [],
    "storedVersions": []
  }
}

1.17.2.2. 모든 DiscoveredClusters 쿼리

GET /operator.open-cluster-management.io/v1/namespaces/{namespace}/operator
1.17.2.2.1. 설명

자세한 내용은 검색된 클러스터 Operator를 쿼리합니다.

1.17.2.2.2. 매개 변수
유형이름설명스키마

헤더

COOKIE
필요

권한 부여: Bearer {ACCESS_TOKEN}; ACCESS_TOKEN은 사용자 액세스 토큰입니다.

string

경로

네임스페이스
필요

사용할 네임스페이스(예: default)입니다.

string

1.17.2.2.3. 응답
HTTP 코드설명스키마

200

성공

콘텐츠 없음

403

액세스 금지

콘텐츠 없음

404

리소스를 찾을 수 없음

콘텐츠 없음

500

내부 서비스 오류

콘텐츠 없음

503

서비스를 사용할 수 없음

콘텐츠 없음

1.17.2.2.4. 사용
  • operator/yaml
1.17.2.2.5. 태그
  • discoveredclusters.discovery.open-cluster-management.io

1.17.2.3. DiscoveredCluster Operator 삭제

DELETE /operator.open-cluster-management.io/v1/namespaces/{namespace}/operator/{discoveredclusters_name}
1.17.2.3.1. 매개 변수
유형이름설명스키마

헤더

COOKIE
필요

권한 부여: Bearer {ACCESS_TOKEN}; ACCESS_TOKEN은 사용자 액세스 토큰입니다.

string

경로

application_name
required

삭제할 Discovered Cluster Operator의 이름입니다.

string

경로

네임스페이스
필요

사용할 네임스페이스(예: default)입니다.

string

1.17.2.3.2. 응답
HTTP 코드설명스키마

200

성공

콘텐츠 없음

403

액세스 금지

콘텐츠 없음

404

리소스를 찾을 수 없음

콘텐츠 없음

500

내부 서비스 오류

콘텐츠 없음

503

서비스를 사용할 수 없음

콘텐츠 없음

1.17.2.3.3. 태그
  • discoveredclusters.operator.open-cluster-management.io

1.17.3. 정의

1.17.3.1. DiscoveredCluster

이름설명스키마

apiVersion
필요

검색된 클러스터의 버전이 지정된 스키마입니다.

string

종류
필요

REST 리소스를 나타내는 문자열 값입니다.

string

메타데이터
필요

리소스를 정의하는 규칙을 설명합니다.

object

사양
필요

DiscoveredClusterSpec은 원하는 상태를 DiscoveredCluster로 정의합니다.

사양 목록을참조하십시오.

1.17.3.2. 사양 목록

이름설명스키마

activityTimestamp
optional

사용 가능한 마지막 활동 타임스탬프를 검색합니다.

metav1.time

apiUrl
required

Discoveredclusters API URL 끝점.

string

cloudProvider
optional

검색된 클러스터의 클라우드 공급자입니다.

string

콘솔
선택 사항

Discoveredclusters 콘솔 URL 끝점.

string

creationTimestamp
optional

Discoveredclusters 생성 타임스탬프.

metav1.time

인증 정보
선택 사항

클러스터가 검색된 인증 정보에 대한 참조입니다.

corev1.ObjectReference

displayName
required

검색된 클러스터의 표시 이름입니다.

string

isManagedCluster
required

true인 경우 클러스터는 ACM에 의해 관리됩니다.

boolean

이름
필요

검색된 클러스터의 이름입니다.

string

openshiftVersion
optional

검색된 클러스터의 OpenShift 버전입니다.

string

상태
선택 사항

검색된 클러스터의 상태입니다.

string

유형
필수

OpenShift 플레이버(ex. OCP, ROSA 등).

string

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.