
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.6.2
  labels:
    heritage: deckhouse
    module: deckhouse
  name: ciliumlocalredirectpolicies.cilium.io
spec:
  group: cilium.io
  names:
    categories:
    - cilium
    - ciliumpolicy
    kind: CiliumLocalRedirectPolicy
    listKind: CiliumLocalRedirectPolicyList
    plural: ciliumlocalredirectpolicies
    shortNames:
    - clrp
    singular: ciliumlocalredirectpolicy
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v2
    schema:
      openAPIV3Schema:
        description: CiliumLocalRedirectPolicy is a Kubernetes Custom Resource that
          contains a specification to redirect traffic locally within a node.
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: Spec is the desired behavior of the local redirect policy.
            properties:
              description:
                description: Description can be used by the creator of the policy
                  to describe the purpose of this policy.
                type: string
              redirectBackend:
                description: RedirectBackend specifies backend configuration to redirect
                  traffic to. It can not be empty.
                properties:
                  localEndpointSelector:
                    description: LocalEndpointSelector selects node local pod(s) where
                      traffic is redirected to.
                    properties:
                      matchExpressions:
                        description: matchExpressions is a list of label selector
                          requirements. The requirements are ANDed.
                        items:
                          description: A label selector requirement is a selector
                            that contains values, a key, and an operator that relates
                            the key and values.
                          properties:
                            key:
                              description: key is the label key that the selector
                                applies to.
                              type: string
                            operator:
                              description: operator represents a key's relationship
                                to a set of values. Valid operators are In, NotIn,
                                Exists and DoesNotExist.
                              enum:
                              - In
                              - NotIn
                              - Exists
                              - DoesNotExist
                              type: string
                            values:
                              description: values is an array of string values. If
                                the operator is In or NotIn, the values array must
                                be non-empty. If the operator is Exists or DoesNotExist,
                                the values array must be empty. This array is replaced
                                during a strategic merge patch.
                              items:
                                type: string
                              type: array
                          required:
                          - key
                          - operator
                          type: object
                        type: array
                      matchLabels:
                        additionalProperties:
                          description: MatchLabelsValue represents the value from
                            the MatchLabels {key,value} pair.
                          maxLength: 63
                          pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
                          type: string
                        description: matchLabels is a map of {key,value} pairs. A
                          single {key,value} in the matchLabels map is equivalent
                          to an element of matchExpressions, whose key field is "key",
                          the operator is "In", and the values array contains only
                          "value". The requirements are ANDed.
                        type: object
                    type: object
                  toPorts:
                    description: ToPorts is a list of L4 ports with protocol of node
                      local pod(s) where traffic is redirected to. When multiple ports
                      are specified, the ports must be named.
                    items:
                      description: PortInfo specifies L4 port number and name along
                        with the transport protocol
                      properties:
                        name:
                          description: Name is a port name, which must contain at
                            least one [a-z], and may also contain [0-9] and '-' anywhere
                            except adjacent to another '-' or in the beginning or
                            the end.
                          pattern: ^([0-9]{1,4})|([a-zA-Z0-9]-?)*[a-zA-Z](-?[a-zA-Z0-9])*$
                          type: string
                        port:
                          description: Port is an L4 port number. The string will
                            be strictly parsed as a single uint16.
                          pattern: ^()([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])$
                          type: string
                        protocol:
                          description: 'Protocol is the L4 protocol. Accepted values:
                            "TCP", "UDP"'
                          enum:
                          - TCP
                          - UDP
                          type: string
                      required:
                      - port
                      - protocol
                      type: object
                    type: array
                required:
                - localEndpointSelector
                - toPorts
                type: object
              redirectFrontend:
                description: RedirectFrontend specifies frontend configuration to
                  redirect traffic from. It can not be empty.
                oneOf:
                - properties:
                    addressMatcher: {}
                  required:
                  - addressMatcher
                - properties:
                    serviceMatcher: {}
                  required:
                  - serviceMatcher
                properties:
                  addressMatcher:
                    description: AddressMatcher is a tuple {IP, port, protocol} that
                      matches traffic to be redirected.
                    properties:
                      ip:
                        description: "IP is a destination ip address for traffic to
                          be redirected. \n Example: When it is set to \"169.254.169.254\",
                          traffic destined to \"169.254.169.254\" is redirected."
                        pattern: ((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))
                        type: string
                      toPorts:
                        description: "ToPorts is a list of destination L4 ports with
                          protocol for traffic to be redirected. When multiple ports
                          are specified, the ports must be named. \n Example: When
                          set to Port: \"53\" and Protocol: UDP, traffic destined
                          to port '53' with UDP protocol is redirected."
                        items:
                          description: PortInfo specifies L4 port number and name
                            along with the transport protocol
                          properties:
                            name:
                              description: Name is a port name, which must contain
                                at least one [a-z], and may also contain [0-9] and
                                '-' anywhere except adjacent to another '-' or in
                                the beginning or the end.
                              pattern: ^([0-9]{1,4})|([a-zA-Z0-9]-?)*[a-zA-Z](-?[a-zA-Z0-9])*$
                              type: string
                            port:
                              description: Port is an L4 port number. The string will
                                be strictly parsed as a single uint16.
                              pattern: ^()([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])$
                              type: string
                            protocol:
                              description: 'Protocol is the L4 protocol. Accepted
                                values: "TCP", "UDP"'
                              enum:
                              - TCP
                              - UDP
                              type: string
                          required:
                          - port
                          - protocol
                          type: object
                        type: array
                    required:
                    - ip
                    - toPorts
                    type: object
                  serviceMatcher:
                    description: ServiceMatcher specifies Kubernetes service and port
                      that matches traffic to be redirected.
                    properties:
                      namespace:
                        description: Namespace is the Kubernetes service namespace.
                          The service namespace must match the namespace of the parent
                          Local Redirect Policy.  For Cluster-wide Local Redirect
                          Policy, this can be any namespace.
                        type: string
                      serviceName:
                        description: "Name is the name of a destination Kubernetes
                          service that identifies traffic to be redirected. The service
                          type needs to be ClusterIP. \n Example: When this field
                          is populated with 'serviceName:myService', all the traffic
                          destined to the cluster IP of this service at the (specified)
                          service port(s) will be redirected."
                        type: string
                      toPorts:
                        description: ToPorts is a list of destination service L4 ports
                          with protocol for traffic to be redirected. If not specified,
                          traffic for all the service ports will be redirected. When
                          multiple ports are specified, the ports must be named.
                        items:
                          description: PortInfo specifies L4 port number and name
                            along with the transport protocol
                          properties:
                            name:
                              description: Name is a port name, which must contain
                                at least one [a-z], and may also contain [0-9] and
                                '-' anywhere except adjacent to another '-' or in
                                the beginning or the end.
                              pattern: ^([0-9]{1,4})|([a-zA-Z0-9]-?)*[a-zA-Z](-?[a-zA-Z0-9])*$
                              type: string
                            port:
                              description: Port is an L4 port number. The string will
                                be strictly parsed as a single uint16.
                              pattern: ^()([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])$
                              type: string
                            protocol:
                              description: 'Protocol is the L4 protocol. Accepted
                                values: "TCP", "UDP"'
                              enum:
                              - TCP
                              - UDP
                              type: string
                          required:
                          - port
                          - protocol
                          type: object
                        type: array
                    required:
                    - namespace
                    - serviceName
                    type: object
                type: object
            required:
            - redirectBackend
            - redirectFrontend
            type: object
          status:
            description: Status is the most recent status of the local redirect policy.
              It is a read-only field.
            properties:
              ok:
                description: TODO Define status(aditi)
                type: object
            type: object
        required:
        - metadata
        type: object
    served: true
    storage: true
    subresources: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
