{
  "description": "ServiceFunctionChain is the Schema for the servicefunctionchains API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "ServiceFunctionChainSpec defines the desired state of ServiceFunctionChain",
      "properties": {
        "internalTrafficPolicy": {
          "default": "Cluster",
          "description": "internalTrafficPolicy describes how traffic is forwarded to service function pods.\nThe only currently supported value is \"Cluster\", in which case traffic is forwarded to all service function pods evenly.",
          "enum": [
            "Cluster"
          ],
          "type": "string"
        },
        "serviceFunctions": {
          "description": "List of service functions that selected traffic must be steered through.",
          "items": {
            "properties": {
              "name": {
                "description": "Name of the service function. It must be a valid RFC 1035 label.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z]([-a-z0-9]*[a-z0-9])?$",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace containing the service function pods. It must be a valid RFC 1123 label.",
                "minLength": 1,
                "type": "string"
              },
              "podSelector": {
                "description": "Route service function traffic to pods matching this selector.",
                "properties": {
                  "matchLabels": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "matchLabels is a map of {key,value} pairs.",
                    "minProperties": 1,
                    "type": "object"
                  }
                },
                "required": [
                  "matchLabels"
                ],
                "type": "object",
                "x-kubernetes-map-type": "atomic",
                "additionalProperties": false
              }
            },
            "required": [
              "name",
              "namespace",
              "podSelector"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "maxItems": 1,
          "minItems": 1,
          "type": "array"
        },
        "sessionAffinity": {
          "description": "sessionAffinity specifies the session affinity behavior for all service functions in the ServiceFunctionChain.\nNil pointer represents disabled session affinity.",
          "maxProperties": 1,
          "minProperties": 1,
          "properties": {
            "clientIPNoDestination": {
              "description": "Session affinity based on 1-tuple hash created from the source IP address.",
              "properties": {
                "timeoutSeconds": {
                  "default": 10800,
                  "description": "timeoutSeconds specifies the seconds of session sticky time.\nThe value must be >0 && <=86400(for 1 day).\nDefault value is 10800(for 3 hours).",
                  "format": "int32",
                  "maximum": 86400,
                  "minimum": 1,
                  "type": "integer"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "serviceFunctions"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "ServiceFunctionChainStatus defines the observed state of ServiceFunctionChain",
      "properties": {
        "servicePathId": {
          "description": "servicePathId is a unique identifier that's automatically assigned.\nIt's used as a tiebreaker in determining precedence between conflicting traffic selectors.",
          "format": "int32",
          "maximum": 1048575,
          "minimum": 1,
          "type": "integer"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
