検索

1.22. KlusterletConfig API (v1alpha1)

download PDF

1.22.1. 概要

このドキュメントでは、Red Hat Advanced Cluster Management for Kubernetes の KlusterletConfig リソースについて説明します。KlusterletConfig リソースには、create、query、delete、update の 4 つの要求を使用できます。KlusterletConfig には、nodeSelectortolerations、および pullSecret などの klusterlet 設定情報が含まれます。KlusterletConfig はクラスタースコープのリソースで、open-cluster-managemnet-agent namespace 内の klusterlet Pod でのみ機能します。KlusterletConfig は、アドオンのデプロイメント設定には影響しません。

1.22.1.1. バージョン情報

バージョン: 2.10.0

1.22.1.2. URI スキーム

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

1.22.1.3. タグ

  • config.open-cluster-management.io: KlusterletConfig を作成して管理します。

1.22.2. パス

1.22.2.1. 全 KlusterletConfig のクエリー

GET /config.open-cluster-management.io/v1alpha1/namespaces/{namespace}/klusterletconfigs
1.22.2.1.1. 説明

KlusterletConfig に対してクエリーを実行して詳細を確認します。

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

Header

COOKIE
必須

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

string

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

200

成功

コンテンツなし

403

アクセス禁止

コンテンツなし

404

リソースが見つからない

コンテンツなし

500

内部サービスエラー

コンテンツなし

503

サービスが利用できない

コンテンツなし

1.22.2.1.4. 消費されるアイテム
  • klusterletconfig/yaml
1.22.2.1.5. タグ
  • config.open-cluster-management.io

1.22.2.2. KlusterletConfig を作成します。

POST /config.open-cluster-management.io/v1alpha1/namespaces/{namespace}/klusterletconfigs
1.22.2.2.1. 説明

KlusterletConfig を作成します。

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

Header

COOKIE
必須

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

string

Body

body
必須

作成する KlusterletConfig バインディングを記述するパラメーター。

KlusterletConfig

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

200

成功

コンテンツなし

403

アクセス禁止

コンテンツなし

404

リソースが見つからない

コンテンツなし

500

内部サービスエラー

コンテンツなし

503

サービスが利用できない

コンテンツなし

1.22.2.2.4. 消費されるアイテム
  • klusterletconfig/yaml
1.22.2.2.5. タグ
  • config.open-cluster-management.io
1.22.2.2.6. HTTP リクエストの例
1.22.2.2.6.1. 要求の body
{
  "apiVersion": "apiextensions.k8s.io/v1",
  "kind": "CustomResourceDefinition",
  "metadata": {
    "annotations": {
      "controller-gen.kubebuilder.io/version": "v0.7.0"
    },
    "creationTimestamp": null,
    "name": "klusterletconfigs.config.open-cluster-management.io"
  },
  "spec": {
    "group": "config.open-cluster-management.io",
    "names": {
      "kind": "KlusterletConfig",
      "listKind": "KlusterletConfigList",
      "plural": "klusterletconfigs",
      "singular": "klusterletconfig"
    },
    "preserveUnknownFields": false,
    "scope": "Cluster",
    "versions": [
      {
        "name": "v1alpha1",
        "schema": {
          "openAPIV3Schema": {
            "description": "KlusterletConfig contains the configuration of a klusterlet including the upgrade strategy, config overrides, proxy configurations etc.",
            "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": "Spec defines the desired state of KlusterletConfig",
                "properties": {
                  "hubKubeAPIServerProxyConfig": {
                    "description": "HubKubeAPIServerProxyConfig holds proxy settings for connections between klusterlet/add-on agents on the managed cluster and the kube-apiserver on the hub cluster. Empty means no proxy settings is available.",
                    "properties": {
                      "caBundle": {
                        "description": "CABundle is a CA certificate bundle to verify the proxy server. It will be ignored if only HTTPProxy is set; And it is required when HTTPSProxy is set and self signed CA certificate is used by the proxy server.",
                        "format": "byte",
                        "type": "string"
                      },
                      "httpProxy": {
                        "description": "HTTPProxy is the URL of the proxy for HTTP requests",
                        "type": "string"
                      },
                      "httpsProxy": {
                        "description": "HTTPSProxy is the URL of the proxy for HTTPS requests HTTPSProxy will be chosen if both HTTPProxy and HTTPSProxy are set.",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "nodePlacement": {
                    "description": "NodePlacement enables explicit control over the scheduling of the agent components. If the placement is nil, the placement is not specified, it will be omitted. If the placement is an empty object, the placement will match all nodes and tolerate nothing.",
                    "properties": {
                      "nodeSelector": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "NodeSelector defines which Nodes the Pods are scheduled on. The default is an empty list.",
                        "type": "object"
                      },
                      "tolerations": {
                        "description": "Tolerations is attached by pods to tolerate any taint that matches the triple <key,value,effect> using the matching operator <operator>. The default is an empty list.",
                        "items": {
                          "description": "The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.",
                          "properties": {
                            "effect": {
                              "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.",
                              "type": "string"
                            },
                            "key": {
                              "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.",
                              "type": "string"
                            },
                            "operator": {
                              "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.",
                              "type": "string"
                            },
                            "tolerationSeconds": {
                              "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.",
                              "format": "int64",
                              "type": "integer"
                            },
                            "value": {
                              "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "pullSecret": {
                    "description": "PullSecret is the name of image pull secret.",
                    "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"
                  },
                  "registries": {
                    "description": "Registries includes the mirror and source registries. The source registry will be replaced by the Mirror.",
                    "items": {
                      "properties": {
                        "mirror": {
                          "description": "Mirror is the mirrored registry of the Source. Will be ignored if Mirror is empty.",
                          "type": "string"
                        },
                        "source": {
                          "description": "Source is the source registry. All image registries will be replaced by Mirror if Source is empty.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "mirror"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "status": {
                "description": "Status defines the observed state of KlusterletConfig",
                "type": "object"
              }
            },
            "type": "object"
          }
        },
        "served": true,
        "storage": true,
        "subresources": {
          "status": {}
        }
      }
    ]
  },
  "status": {
    "acceptedNames": {
      "kind": "",
      "plural": ""
    },
    "conditions": [],
    "storedVersions": []
  }
}

1.22.2.3. 単一の KlusterletConfig のクエリー

GET /config.open-cluster-management.io/v1alpha1/namespaces/{namespace}/klusterletconfigs/{klusterletconfig_name}
1.22.2.3.1. 説明

1 つの KlusterletConfig に対してクエリーを実行して詳細を確認します。

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

Header

COOKIE
必須

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

string

パス

klusterletconfig_name
required

クエリーを実行する KlusterletConfig の名前。

string

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

200

成功

コンテンツなし

403

アクセス禁止

コンテンツなし

404

リソースが見つからない

コンテンツなし

500

内部サービスエラー

コンテンツなし

503

サービスが利用できない

コンテンツなし

1.22.2.3.4. タグ
  • config.open-cluster-management.io

1.22.2.4. KlusterletConfig の削除

DELETE /addon.open-cluster-management.io/v1alpha1/namespaces/{namespace}/klusterletconfigs/{klusterletconfig_name}
1.22.2.4.1. 説明

単一の klusterletconfig を削除します。

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

Header

COOKIE
必須

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

string

パス

klusterletconfig_name
required

削除する KlusterletConfig の名前。

string

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

200

成功

コンテンツなし

403

アクセス禁止

コンテンツなし

404

リソースが見つからない

コンテンツなし

500

内部サービスエラー

コンテンツなし

503

サービスが利用できない

コンテンツなし

1.22.2.4.4. タグ
  • config.open-cluster-management.io

1.22.3. 定義

1.22.3.1. KlusterletConfig

名前説明スキーマ

apiVersion
必須

KlusterletConfig のバージョン管理されたスキーマ。

string

kind
必須

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

string

metadata
必須

KlusterletConfig のメタデータ。

object

spec
必須

KlusterletConfig の仕様。

spec

spec

名前説明スキーマ

registries
任意

ミラーおよびソースレジストリーが含まれます。ソースレジストリーはミラーに置き換えられます。

registry

pullSecret
任意

イメージプルシークレットの名前。

object

nodePlacement
必須

マネージドクラスターでアドオンエージェントのスケジューリング制御を有効にします。

nodePlacement

hubKubeAPIServerProxyConfig
必須

マネージドクラスターの klusterlet またはアドオンエージェントとハブクラスターの kube-apiserver 間の接続のプロキシー設定が含まれています。空白は、使用できるプロキシー設定がないことを意味します。

kubeAPIServerProxyConfig

nodePlacement

名前説明スキーマ

nodeSelector
任意

Pod の実行がスケジュールされるノードを定義します。nodeSelector が空の場合、nodeSelector はすべてのノードを選択します。

map[string]string

tolerations
任意

Pod に適用され、一致するマシン Operator (<operator>) を使用して <key,value,effect> 容認に一致するテイントに Pod をスケジュールするために使用されます。

[]corev1.Toleration

kubeAPIServerProxyConfig

名前説明スキーマ

caBundle
任意

プロキシーサーバーを検証するための CA 証明書バンドルです。HTTPProxy のみが設定されている場合、バンドルは無視されます。このバンドルは、HTTPSProxy が設定され、自己署名 CA 証明書がプロキシーサーバーによって使用される場合に必要になります。

map[string]string

httpProxy
任意

HTTP リクエストのプロキシーの URL

map[string]string

httpsProxy
任意

HTTPS 要求のプロキシーの URL。HTTPProxy および HTTPSProxy の両方が設定されている場合は、HTTPSProxy が選択されます。

map[string]string

Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

© 2024 Red Hat, Inc.