8.10. 3scale CustomPolicyDefinition カスタムリソースのデプロイ

CustomPolicyDefinition CRD を使用して、管理ポータルから 3scale プロダクトのカスタムポリシーを設定できます。

3scale operator が新規の CustomPolicyDefinition CR を見つけると、operator は、How the 3scale operator identifies the tenant that a custom resource links to で説明されているように CR を所有するテナントを識別します。

前提条件

手順

  1. CustomPolicyDefinition カスタムリソースを定義して保存します (例: my-apicast-custom-policy-definition.yaml ファイル)。

    apiVersion: capabilities.3scale.net/v1beta1
    kind: CustomPolicyDefinition
    metadata:
      name: custompolicydefinition-sample
    spec:
      version: "0.1"
      name: "APIcast Example Policy"
      schema:
        name: "APIcast Example Policy"
        version: "0.1"
        $schema: "http://apicast.io/policy-v1/schema#manifest#"
        summary: "This is just an example."
        configuration:
          type: object
          properties: {}
  2. CustomPolicyDefinition CR をデプロイします。

    oc create -f my-apicast-custom-policy-definition.yaml