{
  "description": "BGPPeer is the Schema for the peers 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",
        "null"
      ]
    },
    "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",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "BGPPeerSpec defines the desired state of Peer.",
      "properties": {
        "bfdProfile": {
          "description": "The name of the BFD Profile to be used for the BFD session associated to the BGP session. If not set, the BFD session won't be set up.",
          "type": [
            "string",
            "null"
          ]
        },
        "connectTime": {
          "description": "Requested BGP connect time, controls how long BGP waits between connection attempts to a neighbor.",
          "type": [
            "string",
            "null"
          ],
          "x-kubernetes-validations": [
            {
              "message": "connect time should be between 1 seconds to 65535",
              "rule": "duration(self).getSeconds() \u003e= 1 \u0026\u0026 duration(self).getSeconds() \u003c= 65535"
            },
            {
              "message": "connect time should contain a whole number of seconds",
              "rule": "duration(self).getMilliseconds() % 1000 == 0"
            }
          ]
        },
        "disableMP": {
          "default": false,
          "description": "To set if we want to disable MP BGP that will separate IPv4 and IPv6 route exchanges into distinct BGP sessions.\nDeprecated: DisableMP is deprecated in favor of dualStackAddressFamily.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "dualStackAddressFamily": {
          "default": false,
          "description": "To set if we want to enable the neighbor not only for the ipfamily related to its session,\nbut also the other one. This allows to advertise/receive IPv4 prefixes over IPv6 sessions and vice versa.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "dynamicASN": {
          "description": "DynamicASN detects the AS number to use for the remote end of the session\nwithout explicitly setting it via the ASN field. Limited to:\ninternal - if the neighbor's ASN is different than MyASN connection is denied.\nexternal - if the neighbor's ASN is the same as MyASN the connection is denied.\nASN and DynamicASN are mutually exclusive and one of them must be specified.",
          "enum": [
            "internal",
            "external"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "ebgpMultiHop": {
          "description": "To set if the BGPPeer is multi-hops away. Needed for FRR mode only.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "enableGracefulRestart": {
          "description": "EnableGracefulRestart allows BGP peer to continue to forward data packets\nalong known routes while the routing protocol information is being\nrestored. This field is immutable because it requires restart of the BGP\nsession. Supported for FRR mode only.",
          "type": [
            "boolean",
            "null"
          ],
          "x-kubernetes-validations": [
            {
              "message": "EnableGracefulRestart cannot be changed after creation",
              "rule": "self == oldSelf"
            }
          ]
        },
        "holdTime": {
          "description": "Requested BGP hold time, per RFC4271.",
          "type": [
            "string",
            "null"
          ]
        },
        "interface": {
          "description": "Interface is the node interface over which the unnumbered BGP peering will\nbe established. No API validation takes place as that string value\nrepresents an interface name on the host and if user provides an invalid\nvalue, only the actual BGP session will not be established.\nAddress and Interface are mutually exclusive and one of them must be specified.",
          "type": [
            "string",
            "null"
          ]
        },
        "keepaliveTime": {
          "description": "Requested BGP keepalive time, per RFC4271.",
          "type": [
            "string",
            "null"
          ]
        },
        "myASN": {
          "description": "AS number to use for the local end of the session.",
          "format": "int32",
          "maximum": 4294967295,
          "minimum": 0,
          "type": "integer"
        },
        "nodeSelectors": {
          "description": "Only connect to this peer on nodes that match one of these\nselectors.",
          "items": {
            "additionalProperties": false,
            "description": "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects.",
            "properties": {
              "matchExpressions": {
                "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
                "items": {
                  "additionalProperties": false,
                  "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates 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.\nValid operators are In, NotIn, Exists and DoesNotExist.",
                      "type": "string"
                    },
                    "values": {
                      "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                      "items": {
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ],
                      "x-kubernetes-list-type": "atomic"
                    }
                  },
                  "required": [
                    "key",
                    "operator"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ],
                "x-kubernetes-list-type": "atomic"
              },
              "matchLabels": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "type": "object",
            "x-kubernetes-map-type": "atomic"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "password": {
          "description": "Authentication password for routers enforcing TCP MD5 authenticated sessions",
          "type": [
            "string",
            "null"
          ]
        },
        "passwordSecret": {
          "additionalProperties": false,
          "description": "passwordSecret is name of the authentication secret for BGP Peer.\nthe secret must be of type \"kubernetes.io/basic-auth\", and created in the\nsame namespace as the MetalLB deployment. The password is stored in the\nsecret as the key \"password\".",
          "properties": {
            "name": {
              "description": "name is unique within a namespace to reference a secret resource.",
              "type": [
                "string",
                "null"
              ]
            },
            "namespace": {
              "description": "namespace defines the space within which the secret name must be unique.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ],
          "x-kubernetes-map-type": "atomic"
        },
        "peerASN": {
          "description": "AS number to expect from the remote end of the session.\nASN and DynamicASN are mutually exclusive and one of them must be specified.",
          "format": "int32",
          "maximum": 4294967295,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "peerAddress": {
          "description": "Address to dial when establishing the session.",
          "type": [
            "string",
            "null"
          ]
        },
        "peerPort": {
          "default": 179,
          "description": "Port to dial when establishing the session.",
          "maximum": 16384,
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "routerID": {
          "description": "BGP router ID to advertise to the peer",
          "type": [
            "string",
            "null"
          ]
        },
        "sourceAddress": {
          "description": "Source address to use when establishing the session.",
          "type": [
            "string",
            "null"
          ]
        },
        "vrf": {
          "description": "To set if we want to peer with the BGPPeer using an interface belonging to\na host vrf",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "myASN"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "description": "BGPPeerStatus defines the observed state of Peer.",
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}