検索

1.17. DiscoveredCluster API

download PDF

1.17.1. 概要

このドキュメントでは、Red Hat Advanced Cluster Management for Kubernetes の DiscoveredCluster リソースについて説明します。DiscoveredCluster リソースには、create、query、delete、update の 4 つの要求を使用できます。

1.17.1.1. バージョン情報

バージョン: 2.10.0

1.17.1.2. URI スキーム

ベースパス: /kubernetes/apis
スキーム: 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. パラメーター
名前説明スキーマ

Header

COOKIE
必須

Authorization: Bearer {ACCESS_TOKEN}。ACCESS_TOKEN はユーザーのアクセストークンに置き換えます。

string

パス

namespace
必須

使用する namespace (例: default)

string

Body

body
必須

作成する 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. 要求の body
{
  "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. 説明

discovered clusters 演算子に対してクエリーを実行して詳細を確認します。

1.17.2.2.2. パラメーター
名前説明スキーマ

Header

COOKIE
必須

Authorization: Bearer {ACCESS_TOKEN}。ACCESS_TOKEN はユーザーのアクセストークンに置き換えます。

string

パス

namespace
必須

使用する namespace (例: 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 演算子の削除

DELETE /operator.open-cluster-management.io/v1/namespaces/{namespace}/operator/{discoveredclusters_name}
1.17.2.3.1. パラメーター
名前説明スキーマ

Header

COOKIE
必須

Authorization: Bearer {ACCESS_TOKEN}。ACCESS_TOKEN はユーザーのアクセストークンに置き換えます。

string

パス

application_name
必須

削除する Discovered Cluster 演算子の名前。

string

パス

namespace
必須

使用する namespace (例: 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
必須

discoveredclusters のバージョンスキーマ。

string

kind
必須

REST リソースを表す文字列の値

string

metadata
必須

リソースを定義するルールを記述します。

object

spec
必須

DiscoveredClusterSpec は、DiscoveredCluster の必要な状態を定義します。

仕様のリスト を参照してください。

1.17.3.2. 仕様のリスト

名前説明スキーマ

activityTimestamp
任意

Discoveredclusters 最後に利用可能なアクティビティータイムスタンプ。

metav1.time

apiUrl
必須

Discoveredclusters API URL エンドポイント。

string

cloudProvider
任意

discoveredcluster のクラウドプロバイダー。

string

console
任意

Discoveredclusters コンソール URL エンドポイント。

string

creationTimestamp
任意

Discoveredclusters 作成タイプスタンプ。

metav1.time

credential
任意

クラスターが検出された認証情報への参照。

corev1.ObjectReference

displayName
必須

検出されたクラスターの表示名。

string

isManagedCluster
必須

true の場合、クラスターは ACM によって管理されます。

boolean

name
必須

検出されたクラスターの名前。

string

openshiftVersion
任意

検出されたクラスターの OpenShift バージョン。

string

status
任意

検出されたクラスターのステータス。

string

type
必須

OpenShift フレーバー (例:OCP、ROSA など)。

string

Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.