apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: sidecars.networking.istio.io
  labels:
    app: istio-pilot
    chart: istio
    heritage: Tiller
    release: istio
  annotations:
    "helm.sh/resource-policy": keep
spec:
  group: networking.istio.io
  names:
    kind: Sidecar
    categories:
    - istio-io
    - networking-istio-io
    listKind: SidecarList
    plural: sidecars
    singular: sidecar
  scope: Namespaced
  versions:
  - name: v1alpha3
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            description: 'Configuration affecting network reachability of a sidecar. See more details at: https://istio.io/docs/reference/config/networking/sidecar.html'
            properties:
              egress:
                type: array
                items:
                  type: object
                  properties:
                    port:
                      type: object
                      description: The port associated with the listener.
                      properties:
                        name:
                          type: string
                          description: Label assigned to the port.
                        protocol:
                          type: string
                          description: The protocol exposed on the port.
                        targetPort:
                          type: integer
                        number:
                          type: integer
                          description: A valid non-negative integer port number.
                    bind:
                      type: string
                    captureMode:
                      type: string
                      enum:
                      - DEFAULT
                      - IPTABLES
                      - NONE
                    hosts:
                      type: array
                      items:
                        type: string
              ingress:
                type: array
                items:
                  type: object
                  properties:
                    port:
                      type: object
                      description: The port associated with the listener.
                      properties:
                        name:
                          type: string
                          description: Label assigned to the port.
                        protocol:
                          type: string
                          description: The protocol exposed on the port.
                        targetPort:
                          type: integer
                        number:
                          type: integer
                          description: A valid non-negative integer port number.
                    bind:
                      type: string
                      description: The IP to which the listener should be bound.
                    captureMode:
                      type: string
                      enum:
                      - DEFAULT
                      - IPTABLES
                      - NONE
                    defaultEndpoint:
                      type: string
              outboundTrafficPolicy:
                type: object
                description: Configuration for the outbound traffic policy.
                properties:
                  egressProxy:
                    type: object
                    properties:
                      port:
                        type: object
                        description: Specifies the port on the host that is being addressed.
                        properties:
                          number:
                            type: integer
                      host:
                        type: string
                        description: The name of a service from the service registry.
                      subset:
                        type: string
                        description: The name of a subset within the service.
                  mode:
                    type: string
                    enum:
                    - REGISTRY_ONLY
                    - ALLOW_ANY
              workloadSelector:
                type: object
                properties:
                  labels:
                    type: object
                    additionalProperties:
                      type: string
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: true
    subresources:
      status: {}
  - name: v1beta1
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            description: 'Configuration affecting network reachability of a sidecar. See more details at: https://istio.io/docs/reference/config/networking/sidecar.html'
            properties:
              egress:
                type: array
                items:
                  type: object
                  properties:
                    port:
                      type: object
                      description: The port associated with the listener.
                      properties:
                        name:
                          type: string
                          description: Label assigned to the port.
                        protocol:
                          type: string
                          description: The protocol exposed on the port.
                        targetPort:
                          type: integer
                        number:
                          type: integer
                          description: A valid non-negative integer port number.
                    bind:
                      type: string
                    captureMode:
                      type: string
                      enum:
                      - DEFAULT
                      - IPTABLES
                      - NONE
                    hosts:
                      type: array
                      items:
                        type: string
              ingress:
                type: array
                items:
                  type: object
                  properties:
                    port:
                      type: object
                      description: The port associated with the listener.
                      properties:
                        name:
                          type: string
                          description: Label assigned to the port.
                        protocol:
                          type: string
                          description: The protocol exposed on the port.
                        targetPort:
                          type: integer
                        number:
                          type: integer
                          description: A valid non-negative integer port number.
                    bind:
                      type: string
                      description: The IP to which the listener should be bound.
                    captureMode:
                      type: string
                      enum:
                      - DEFAULT
                      - IPTABLES
                      - NONE
                    defaultEndpoint:
                      type: string
              outboundTrafficPolicy:
                type: object
                description: Configuration for the outbound traffic policy.
                properties:
                  egressProxy:
                    type: object
                    properties:
                      port:
                        type: object
                        description: Specifies the port on the host that is being addressed.
                        properties:
                          number:
                            type: integer
                      host:
                        type: string
                        description: The name of a service from the service registry.
                      subset:
                        type: string
                        description: The name of a subset within the service.
                  mode:
                    type: string
                    enum:
                    - REGISTRY_ONLY
                    - ALLOW_ANY
              workloadSelector:
                type: object
                properties:
                  labels:
                    type: object
                    additionalProperties:
                      type: string
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: false
    subresources:
      status: {}
