{
  "description": "CiliumBGPNodeConfig is node local configuration for BGP agent. Name of the object should be node name.\nThis resource will be created by Cilium operator and is read-only for the users.",
  "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": "Spec is the specification of the desired behavior of the CiliumBGPNodeConfig.",
      "properties": {
        "bgpInstances": {
          "description": "BGPInstances is a list of BGP router instances on the node.",
          "items": {
            "description": "CiliumBGPNodeInstance is a single BGP router instance configuration on the node.",
            "properties": {
              "localASN": {
                "description": "LocalASN is the ASN of this virtual router.\nSupports extended 32bit ASNs.",
                "format": "int64",
                "maximum": 4294967295,
                "minimum": 1,
                "type": "integer"
              },
              "localPort": {
                "description": "LocalPort is the port on which the BGP daemon listens for incoming connections.\n\nIf not specified, BGP instance will not listen for incoming connections.",
                "format": "int32",
                "maximum": 65535,
                "minimum": 1,
                "type": "integer"
              },
              "name": {
                "description": "Name is the name of the BGP instance. This name is used to identify the BGP instance on the node.",
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              "peers": {
                "description": "Peers is a list of neighboring BGP peers for this virtual router",
                "items": {
                  "properties": {
                    "autoDiscovery": {
                      "description": "AutoDiscovery is the configuration for auto-discovery of the peer address.",
                      "properties": {
                        "defaultGateway": {
                          "description": "defaultGateway is the configuration for auto-discovery of the default gateway.",
                          "properties": {
                            "addressFamily": {
                              "description": "addressFamily is the address family of the default gateway.",
                              "enum": [
                                "ipv4",
                                "ipv6"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "addressFamily"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "mode": {
                          "description": "mode is the mode of the auto-discovery.",
                          "enum": [
                            "DefaultGateway"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "mode"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "localAddress": {
                      "description": "LocalAddress is the IP address of the local interface to use for the peering session.\nThis configuration is derived from CiliumBGPNodeConfigOverride resource. If not specified, the local address will be used for setting up peering.",
                      "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"
                    },
                    "name": {
                      "description": "Name is the name of the BGP peer. This name is used to identify the BGP peer for the BGP instance.",
                      "type": "string"
                    },
                    "peerASN": {
                      "description": "PeerASN is the ASN of the peer BGP router.\nSupports extended 32bit ASNs",
                      "format": "int64",
                      "maximum": 4294967295,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "peerAddress": {
                      "description": "PeerAddress is the IP address of the neighbor.\nSupports IPv4 and IPv6 addresses.",
                      "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"
                    },
                    "peerConfigRef": {
                      "description": "PeerConfigRef is a reference to a peer configuration resource.\nIf not specified, the default BGP configuration is used for this peer.",
                      "properties": {
                        "name": {
                          "description": "Name is the name of the peer config resource.\nName refers to the name of a Kubernetes object (typically a CiliumBGPPeerConfig).",
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array",
                "x-kubernetes-list-map-keys": [
                  "name"
                ],
                "x-kubernetes-list-type": "map"
              },
              "routerID": {
                "description": "RouterID is the BGP router ID of this virtual router.\nThis configuration is derived from CiliumBGPNodeConfigOverride resource.\n\nIf not specified, the router ID will be derived from the node local address.",
                "format": "ipv4",
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "maxItems": 16,
          "minItems": 1,
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "name"
          ],
          "x-kubernetes-list-type": "map"
        }
      },
      "required": [
        "bgpInstances"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "Status is the most recently observed status of the CiliumBGPNodeConfig.",
      "properties": {
        "bgpInstances": {
          "description": "BGPInstances is the status of the BGP instances on the node.",
          "items": {
            "properties": {
              "localASN": {
                "description": "LocalASN is the ASN of this BGP instance.",
                "format": "int64",
                "type": "integer"
              },
              "name": {
                "description": "Name is the name of the BGP instance. This name is used to identify the BGP instance on the node.",
                "type": "string"
              },
              "peers": {
                "description": "PeerStatuses is the state of the BGP peers for this BGP instance.",
                "items": {
                  "description": "CiliumBGPNodePeerStatus is the status of a BGP peer.",
                  "properties": {
                    "establishedTime": {
                      "description": "EstablishedTime is the time when the peering session was established.\nIt is represented in RFC3339 form and is in UTC.",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name is the name of the BGP peer.",
                      "type": "string"
                    },
                    "peerASN": {
                      "description": "PeerASN is the ASN of the neighbor.",
                      "format": "int64",
                      "type": "integer"
                    },
                    "peerAddress": {
                      "description": "PeerAddress is the IP address of the neighbor.",
                      "type": "string"
                    },
                    "peeringState": {
                      "description": "PeeringState is last known state of the peering session.",
                      "type": "string"
                    },
                    "routeCount": {
                      "description": "RouteCount is the number of routes exchanged with this peer per AFI/SAFI.",
                      "items": {
                        "properties": {
                          "advertised": {
                            "description": "Advertised is the number of routes advertised to this peer.",
                            "format": "int32",
                            "type": "integer"
                          },
                          "afi": {
                            "description": "Afi is the Address Family Identifier (AFI) of the family.",
                            "enum": [
                              "ipv4",
                              "ipv6",
                              "l2vpn",
                              "ls",
                              "opaque"
                            ],
                            "type": "string"
                          },
                          "received": {
                            "description": "Received is the number of routes received from this peer.",
                            "format": "int32",
                            "type": "integer"
                          },
                          "safi": {
                            "description": "Safi is the Subsequent Address Family Identifier (SAFI) of the family.",
                            "enum": [
                              "unicast",
                              "multicast",
                              "mpls_label",
                              "encapsulation",
                              "vpls",
                              "evpn",
                              "ls",
                              "sr_policy",
                              "mup",
                              "mpls_vpn",
                              "mpls_vpn_multicast",
                              "route_target_constraints",
                              "flowspec_unicast",
                              "flowspec_vpn",
                              "key_value"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "afi",
                          "safi"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "type": "array"
                    },
                    "timers": {
                      "description": "Timers is the state of the negotiated BGP timers for this peer.",
                      "properties": {
                        "appliedHoldTimeSeconds": {
                          "description": "AppliedHoldTimeSeconds is the negotiated hold time for this peer.",
                          "format": "int32",
                          "type": "integer"
                        },
                        "appliedKeepaliveSeconds": {
                          "description": "AppliedKeepaliveSeconds is the negotiated keepalive time for this peer.",
                          "format": "int32",
                          "type": "integer"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "name",
                    "peerAddress"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array",
                "x-kubernetes-list-map-keys": [
                  "name"
                ],
                "x-kubernetes-list-type": "map"
              }
            },
            "required": [
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "name"
          ],
          "x-kubernetes-list-type": "map"
        },
        "conditions": {
          "description": "The current conditions of the CiliumBGPNodeConfig",
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "metadata",
    "spec"
  ],
  "type": "object"
}
