5.11.4. Operator のマルチプラットフォーム対応の検証
bundle validate コマンドを実行すると、Operator のマルチプラットフォーム対応性を検証できます。このコマンドは、Operator プロジェクトが次の条件を満たしていることを確認します。
- Operator のマネージャーイメージは、クラスターサービスバージョン (CSV) ファイルでラベル付けされているプラットフォームをサポートします。
- Operator の CSV には、Operator Lifecycle Manager (OLM) および OperatorHub でサポートされているプラットフォームのラベルが含まれています。
手順
次のコマンドを実行して、Operator プロジェクトが複数のアーキテクチャーに対応しているかどうかを検証します。
$ operator-sdk bundle validate ./bundle \ --select-optional name=multiarch検証メッセージの例
INFO[0020] All validation tests have completed successfullyマネージャーイメージに CSV ラベルがない場合のエラーメッセージの例
ERRO[0016] Error: Value test-operator.v0.0.1: not all images specified are providing the support described via the CSV labels. Note that (SO.architecture): (linux.ppc64le) was not found for the image(s) [quay.io/example-org/test-operator:v1alpha1] ERRO[0016] Error: Value test-operator.v0.0.1: not all images specified are providing the support described via the CSV labels. Note that (SO.architecture): (linux.s390x) was not found for the image(s) [quay.io/example-org/test-operator:v1alpha1] ERRO[0016] Error: Value test-operator.v0.0.1: not all images specified are providing the support described via the CSV labels. Note that (SO.architecture): (linux.amd64) was not found for the image(s) [quay.io/example-org/test-operator:v1alpha1] ERRO[0016] Error: Value test-operator.v0.0.1: not all images specified are providing the support described via the CSV labels. Note that (SO.architecture): (linux.arm64) was not found for the image(s) [quay.io/example-org/test-operator:v1alpha1]OperatorHub フラグが欠落している場合のエラーメッセージの例
WARN[0014] Warning: Value test-operator.v0.0.1: check if the CSV is missing the label (operatorframework.io/arch.<value>) for the Arch(s): ["amd64" "arm64" "ppc64le" "s390x"]. Be aware that your Operator manager image ["quay.io/example-org/test-operator:v1alpha1"] provides this support. Thus, it is very likely that you want to provide it and if you support more than amd64 architectures, you MUST,use the required labels for all which are supported.Otherwise, your solution cannot be listed on the cluster for these architectures