2.21.6. ServiceMeshExtension リソースから WasmPlugin リソースへの移行
Red Hat OpenShift Service Mesh バージョン 2.2 で非推奨となった ServiceMeshExtension API が、Red Hat OpenShift Service Mesh バージョン 2.3 で削除されました。ServiceMeshExtension API を使用している場合は、WebAssembly 拡張機能を引き続き使用するには WasmPlugin API に移行する必要があります。
これらの API は非常によく似ています。移行の手順は、以下の 2 つのステップで構成されます。
- プラグインファイルの名前を変更し、モジュールパッケージを更新する。
-
更新されたコンテナーイメージを参照する
WasmPluginリソースを作成する。
2.21.6.1. API の変更 リンクのコピーリンクがクリップボードにコピーされました!
新しい WasmPlugin API は ServiceMeshExtension に似ていますが、いくつかの違いがあります (特にフィールド名)。
| ServiceMeshExtension | WasmPlugin |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
以下は、ServiceMeshExtension リソースを WasmPlugin リソースに変換する方法の例になります。
ServiceMeshExtension リソース
apiVersion: maistra.io/v1
kind: ServiceMeshExtension
metadata:
name: header-append
namespace: istio-system
spec:
workloadSelector:
labels:
app: httpbin
config:
first-header: some-value
another-header: another-value
image: quay.io/maistra-dev/header-append-filter:2.2
phase: PostAuthZ
priority: 100
上記の ServiceMeshExtension と等価な新しい WasmPlugin リソース
apiVersion: extensions.istio.io/v1alpha1
kind: WasmPlugin
metadata:
name: header-append
namespace: istio-system
spec:
selector:
matchLabels:
app: httpbin
url: oci://quay.io/maistra-dev/header-append-filter:2.2
phase: STATS
pluginConfig:
first-header: some-value
another-header: another-value