apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: workloadgroups.networking.istio.io
  labels:
    app: istio-pilot
    chart: istio
    heritage: Tiller
    release: istio
spec:
  group: networking.istio.io
  names:
    kind: WorkloadGroup
    categories:
    - istio-io
    - networking-istio-io
    listKind: WorkloadGroupList
    plural: workloadgroups
    shortNames:
    - wg
    singular: workloadgroup
  scope: Namespaced
  versions:
  - name: v1alpha3
    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: 'Describes a collection of workload instances. See more details at: https://istio.io/docs/reference/config/networking/workload-group.html'
            properties:
              metadata:
                type: object
                description: Metadata that will be used for all corresponding `WorkloadEntries`.
                properties:
                  labels:
                    type: object
                    additionalProperties:
                      type: string
                  annotations:
                    type: object
                    additionalProperties:
                      type: string
              template:
                type: object
                description: Template to be used for the generation of `WorkloadEntry` resources that belong to this `WorkloadGroup`.
                properties:
                  labels:
                    type: object
                    additionalProperties:
                      type: string
                    description: One or more labels associated with the endpoint.
                  serviceAccount:
                    type: string
                  ports:
                    type: object
                    additionalProperties:
                      type: integer
                    description: Set of ports associated with the endpoint.
                  address:
                    type: string
                  locality:
                    type: string
                    description: The locality associated with the endpoint.
                  network:
                    type: string
                  weight:
                    type: integer
                    description: The load balancing weight associated with the endpoint.
              probe:
                type: object
                description: '`ReadinessProbe` describes the configuration the user must provide for healthchecking on their workload.'
                oneOf:
                - not:
                    anyOf:
                    - required:
                      - httpGet
                    - required:
                      - tcpSocket
                    - required:
                      - exec
                - required:
                  - httpGet
                - required:
                  - tcpSocket
                - required:
                  - exec
                properties:
                  exec:
                    type: object
                    description: Health is determined by how the command that is executed exited.
                    properties:
                      command:
                        type: array
                        description: Command to run.
                        items:
                          type: string
                  failureThreshold:
                    type: integer
                    description: Minimum consecutive failures for the probe to be considered failed after having succeeded.
                    format: int32
                  httpGet:
                    type: object
                    properties:
                      port:
                        type: integer
                        description: Port on which the endpoint lives.
                      host:
                        type: string
                        description: Host name to connect to, defaults to the pod IP.
                      httpHeaders:
                        type: array
                        description: Headers the proxy will pass on to make the request.
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            value:
                              type: string
                      path:
                        type: string
                        description: Path to access on the HTTP server.
                      scheme:
                        type: string
                  initialDelaySeconds:
                    type: integer
                    description: Number of seconds after the container has started before readiness probes are initiated.
                    format: int32
                  periodSeconds:
                    type: integer
                    description: How often (in seconds) to perform the probe.
                    format: int32
                  successThreshold:
                    type: integer
                    description: Minimum consecutive successes for the probe to be considered successful after having failed.
                    format: int32
                  tcpSocket:
                    type: object
                    description: Health is determined by if the proxy is able to connect.
                    properties:
                      port:
                        type: integer
                      host:
                        type: string
                  timeoutSeconds:
                    type: integer
                    description: Number of seconds after which the probe times out.
                    format: int32
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: true
    subresources:
      status: {}
