apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: wasmplugins.extensions.istio.io
  labels:
    app: istio-pilot
    chart: istio
    heritage: Tiller
    release: istio
  annotations:
    "helm.sh/resource-policy": keep
spec:
  group: extensions.istio.io
  names:
    kind: WasmPlugin
    categories:
    - istio-io
    - extensions-istio-io
    listKind: WasmPluginList
    plural: wasmplugins
    singular: wasmplugin
  scope: Namespaced
  versions:
  - name: v1alpha1
    additionalPrinterColumns:
    - name: Age
      type: date
      description: 'CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata'
      jsonPath: .metadata.creationTimestamp
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            description: 'Extend the functionality provided by the Istio proxy through WebAssembly filters. See more details at: https://istio.io/docs/reference/config/proxy_extensions/wasm-plugin.html'
            properties:
              selector:
                type: object
                properties:
                  matchLabels:
                    type: object
                    additionalProperties:
                      type: string
              priority:
                type: integer
                description: Determines ordering of `WasmPlugins` in the same `phase`.
                nullable: true
              imagePullPolicy:
                type: string
                description: The pull behaviour to be applied when fetching an OCI image.
                enum:
                - UNSPECIFIED_POLICY
                - IfNotPresent
                - Always
              imagePullSecret:
                type: string
                description: Credentials to use for OCI image pulling.
              phase:
                type: string
                description: Determines where in the filter chain this `WasmPlugin` is to be injected.
                enum:
                - UNSPECIFIED_PHASE
                - AUTHN
                - AUTHZ
                - STATS
              pluginConfig:
                type: object
                description: The configuration that will be passed on to the plugin.
                x-kubernetes-preserve-unknown-fields: true
              pluginName:
                type: string
              sha256:
                type: string
                description: SHA256 checksum that will be used to verify Wasm module or OCI container.
              url:
                type: string
                description: URL of a Wasm module or OCI container.
              verificationKey:
                type: string
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: true
    subresources:
      status: {}
