1.15. DiscoveryConfig API


1.15.1. 概要

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

1.15.1.1. バージョン情報

バージョン: 2.7.0

1.15.1.2. URI スキーム

ベースパス: /kubernetes/apis
スキーム: HTTPS

1.15.1.3. タグ

  • discoveryconfigs.discovery.open-cluster-management.io: DiscoveryConfigs を作成して管理します。

1.15.2. パス

1.15.2.1. DiscoveryConfig の作成

POST /app.k8s.io/v1/namespaces/{namespace}/discoveryconfigs
Copy to Clipboard Toggle word wrap
1.15.2.1.1. 説明

DiscoveryConfig を作成します。

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

ヘッダー

COOKIE
必須

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

string

パス

namespace
必須

使用する namespace (例: default)

string

ボディー

body
必須

作成する DiscoveryConfig を記述するパラメーター。

DiscoveryConfig

1.15.2.1.3. レスポンス
Expand
HTTP コード説明スキーマ

200

成功

コンテンツなし

403

アクセス禁止

コンテンツなし

404

リソースが見つからない

コンテンツなし

500

内部サービスエラー

コンテンツなし

503

サービスが利用できない

コンテンツなし

1.15.2.1.4. 消費
  • discoveryconfigs/yaml
1.15.2.1.5. タグ
  • discoveryconfigs.discovery.open-cluster-management.io
1.15.2.1.5.1. 要求のボディー
{
  "apiVersion": "apiextensions.k8s.io/v1",
  "kind": "CustomResourceDefinition",
  "metadata": {
    "annotations": {
      "controller-gen.kubebuilder.io/version": "v0.4.1",
    },
    "creationTimestamp": null,
    "name": "discoveryconfigs.discovery.open-cluster-management.io",
  },
  "spec": {
    "group": "discovery.open-cluster-management.io",
    "names": {
      "kind": "DiscoveryConfig",
      "listKind": "DiscoveryConfigList",
      "plural": "discoveryconfigs",
      "singular": "discoveryconfig"
    },
    "scope": "Namespaced",
    "versions": [
      {
        "name": "v1",
        "schema": {
          "openAPIV3Schema": {
            "description": "DiscoveryConfig is the Schema for the discoveryconfigs 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": "DiscoveryConfigSpec defines the desired state of DiscoveryConfig",
                "properties": {
                  "credential": {
                    "description": "Credential is the secret containing credentials to connect to the OCM api on behalf of a user",
                    "type": "string"
                  },
                  "filters": {
                    "description": "Sets restrictions on what kind of clusters to discover",
                    "properties": {
                      "lastActive": {
                        "description": "LastActive is the last active in days of clusters to discover, determined by activity timestamp",
                        "type": "integer"
                      },
                      "openShiftVersions": {
                        "description": "OpenShiftVersions is the list of release versions of OpenShift of the form \"<Major>.<Minor>\"",
                        "items": {
                          "description": "Semver represents a partial semver string with the major and minor version in the form \"<Major>.<Minor>\". For example: \"4.5\"",
                          "pattern": "^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$",
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "credential"
                ],
                "type": "object"
              },
              "status": {
                "description": "DiscoveryConfigStatus defines the observed state of DiscoveryConfig",
                "type": "object"
              }
            },
            "type": "object"
          }
        },
        "served": true,
        "storage": true,
        "subresources": {
          "status": {}
        }
      }
    ]
  },
  "status": {
    "acceptedNames": {
      "kind": "",
      "plural": ""
    },
    "conditions": [],
    "storedVersions": []
  }
}
Copy to Clipboard Toggle word wrap

1.15.2.2. すべての DiscoveryConfigs のクエリー

GET /operator.open-cluster-management.io/v1/namespaces/{namespace}/operator
Copy to Clipboard Toggle word wrap
1.15.2.2.1. 説明

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

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

ヘッダー

COOKIE
必須

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

文字列

パス

namespace
必須

使用する namespace (例: default)

文字列

1.15.2.2.3. レスポンス
Expand
HTTP コード説明スキーマ

200

成功

コンテンツなし

403

アクセス禁止

コンテンツなし

404

リソースが見つからない

コンテンツなし

500

内部サービスエラー

コンテンツなし

503

サービスが利用できない

コンテンツなし

1.15.2.2.4. 消費
  • operator/yaml
1.15.2.2.5. タグ
  • discoveryconfigs.discovery.open-cluster-management.io

1.15.2.3. DiscoveryConfig 演算子の削除

DELETE /operator.open-cluster-management.io/v1/namespaces/{namespace}/operator/{discoveryconfigs_name}
Copy to Clipboard Toggle word wrap
1.15.2.3.1. パラメーター
Expand
名前説明スキーマ

ヘッダー

COOKIE
必須

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

文字列

パス

application_name
必須

削除する Discovery Config 演算子の名前。

文字列

パス

namespace
必須

使用する namespace (例: default)

文字列

1.15.2.3.2. 応答
Expand
HTTP コード説明スキーマ

200

成功

コンテンツなし

403

アクセス禁止

コンテンツなし

404

リソースが見つからない

コンテンツなし

500

内部サービスエラー

コンテンツなし

503

サービスが利用できない

コンテンツなし

1.15.2.3.3. タグ
  • discoveryconfigs.operator.open-cluster-management.io

1.15.3. 定義

1.15.3.1. DiscoveryConfig

Expand
Name説明スキーマ

apiVersion
必須

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

string

kind
必須

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

string

metadata
必須

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

object

spec
必須

DiscoveryConfig の必要な状態を定義します。

仕様の一覧 を参照してください。

1.15.3.2. 仕様の一覧

Expand
名前説明スキーマ

credential
required

credential は、ユーザーの代わりに OCM API に接続するための認証情報が含まれるシークレットです。

string

filters
optional

検出するクラスターの種類に制限を設定します。

フィルターの一覧を参照してください。

1.15.3.3. フィルターの一覧

Expand
Name説明スキーマ

lastActive
required

lastActive は、検出するクラスターの最後のアクティブ日数で、アクティビティーのタイムスタンプによって決定されます。

integer

openShiftVersions
optional

openShiftVersions は、OpenShift のリリースバージョン ("<Major>.<Minor>" 形式) の一覧です。

オブジェクト

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2025 Red Hat