1.2.2.2. Kamelet の設定パラメーターの決定
Kamelet Binding で Kamelet への参照を追加する場合、Kamelet の名前を指定し、Kamelet のパラメーターを設定します。
前提条件
- 作業用 namespace またはクラスター全体に Camel K Operator がインストールされている。
手順
Kamelet の名前およびパラメーターを決定するには、以下を実行します。
- ターミナルウィンドウで、OpenShift クラスターにログインします。
Kamelet の YAML ファイルを開きます。
oc describe kamelets/<kamelet-name>たとえば、
ftp-sourceKamelet のコードを表示するには、Camel K Operator が現在の namespace にインストールされている場合は、以下のコマンドを使用します。oc describe kamelets/ftp-sourceCamel K Operator が cluster-mode でインストールされている場合は、以下のコマンドを使用します。
oc describe -n openshift-operators kamelets/ftp-sourceYAML ファイルで、
spec.definitionセクション (JSON-schema 形式で記述される) まで下方向にスクロールし、Kamelet のプロパティーの一覧を表示します。セクションの最後の必須フィールドには、Kamelet を参照する際に設定する必要のあるプロパティーが一覧表示されます。たとえば、以下のコードは
ftp-sourceKamelet のspec.definitionセクションからの抜粋です。このセクションは、Kamelet のすべての設定プロパティーの詳細を提供します。この Kamelet に必要なプロパティーは、connectionHost、connectionPort、username、password、およびdirectoryNameです。spec: definition: title: "FTP Source" description: |- Receive data from an FTP Server. required: - connectionHost - connectionPort - username - password - directoryName type: object properties: connectionHost: title: Connection Host description: Hostname of the FTP server type: string connectionPort: title: Connection Port description: Port of the FTP server type: string default: 21 username: title: Username description: The username to access the FTP server type: string password: title: Password description: The password to access the FTP server type: string format: password x-descriptors: - urn:alm:descriptor:com.tectonic.ui:password directoryName: title: Directory Name description: The starting directory type: string passiveMode: title: Passive Mode description: Sets passive mode connection type: boolean default: false x-descriptors: - 'urn:alm:descriptor:com.tectonic.ui:checkbox' recursive: title: Recursive description: If a directory, will look for files in all the sub-directories as well. type: boolean default: false x-descriptors: - 'urn:alm:descriptor:com.tectonic.ui:checkbox' idempotent: title: Idempotency description: Skip already processed files. type: boolean default: true x-descriptors: - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
その他の参考資料