|
| 1 | +{ |
| 2 | + "description": "CiliumBGPAdvertisement is the Schema for the ciliumbgpadvertisements API", |
| 3 | + "properties": { |
| 4 | + "apiVersion": { |
| 5 | + "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", |
| 6 | + "type": "string" |
| 7 | + }, |
| 8 | + "kind": { |
| 9 | + "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", |
| 10 | + "type": "string" |
| 11 | + }, |
| 12 | + "metadata": { |
| 13 | + "type": "object" |
| 14 | + }, |
| 15 | + "spec": { |
| 16 | + "properties": { |
| 17 | + "advertisements": { |
| 18 | + "description": "Advertisements is a list of BGP advertisements.", |
| 19 | + "items": { |
| 20 | + "description": "BGPAdvertisement defines which routes Cilium should advertise to BGP peers. Optionally, additional attributes can be\nset to the advertised routes.", |
| 21 | + "properties": { |
| 22 | + "advertisementType": { |
| 23 | + "description": "AdvertisementType defines type of advertisement which has to be advertised.", |
| 24 | + "enum": [ |
| 25 | + "PodCIDR", |
| 26 | + "CiliumPodIPPool", |
| 27 | + "Service" |
| 28 | + ], |
| 29 | + "type": "string" |
| 30 | + }, |
| 31 | + "attributes": { |
| 32 | + "description": "Attributes defines additional attributes to set to the advertised routes.\nIf not specified, no additional attributes are set.", |
| 33 | + "properties": { |
| 34 | + "communities": { |
| 35 | + "description": "Communities sets the community attributes in the route.\nIf not specified, no community attribute is set.", |
| 36 | + "properties": { |
| 37 | + "large": { |
| 38 | + "description": "Large holds a list of the BGP Large Communities Attribute (RFC 8092) values.", |
| 39 | + "items": { |
| 40 | + "description": "BGPLargeCommunity type represents a value of the BGP Large Communities Attribute (RFC 8092),\nas three 4-byte decimal numbers separated by colons.", |
| 41 | + "pattern": "^([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5]):([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])$", |
| 42 | + "type": "string" |
| 43 | + }, |
| 44 | + "type": "array" |
| 45 | + }, |
| 46 | + "standard": { |
| 47 | + "description": "Standard holds a list of \"standard\" 32-bit BGP Communities Attribute (RFC 1997) values defined as numeric values.", |
| 48 | + "items": { |
| 49 | + "description": "BGPStandardCommunity type represents a value of the \"standard\" 32-bit BGP Communities Attribute (RFC 1997)\nas a 4-byte decimal number or two 2-byte decimal numbers separated by a colon (<0-65535>:<0-65535>).\nFor example, no-export community value is 65553:65281.", |
| 50 | + "pattern": "^([0-9]|[1-9][0-9]{1,8}|[1-3][0-9]{9}|4[01][0-9]{8}|42[0-8][0-9]{7}|429[0-3][0-9]{6}|4294[0-8][0-9]{5}|42949[0-5][0-9]{4}|429496[0-6][0-9]{3}|4294967[01][0-9]{2}|42949672[0-8][0-9]|429496729[0-5])$|^([0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]):([0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$", |
| 51 | + "type": "string" |
| 52 | + }, |
| 53 | + "type": "array" |
| 54 | + }, |
| 55 | + "wellKnown": { |
| 56 | + "description": "WellKnown holds a list \"standard\" 32-bit BGP Communities Attribute (RFC 1997) values defined as\nwell-known string aliases to their numeric values.", |
| 57 | + "items": { |
| 58 | + "description": "BGPWellKnownCommunity type represents a value of the \"standard\" 32-bit BGP Communities Attribute (RFC 1997)\nas a well-known string alias to its numeric value. Allowed values and their mapping to the numeric values:\n\n\tinternet = 0x00000000 (0:0)\n\tplanned-shut = 0xffff0000 (65535:0)\n\taccept-own = 0xffff0001 (65535:1)\n\troute-filter-translated-v4 = 0xffff0002 (65535:2)\n\troute-filter-v4 = 0xffff0003 (65535:3)\n\troute-filter-translated-v6 = 0xffff0004 (65535:4)\n\troute-filter-v6 = 0xffff0005 (65535:5)\n\tllgr-stale = 0xffff0006 (65535:6)\n\tno-llgr = 0xffff0007 (65535:7)\n\tblackhole = 0xffff029a (65535:666)\n\tno-export = 0xffffff01\t(65535:65281)\n\tno-advertise = 0xffffff02 (65535:65282)\n\tno-export-subconfed = 0xffffff03 (65535:65283)\n\tno-peer = 0xffffff04 (65535:65284)", |
| 59 | + "enum": [ |
| 60 | + "internet", |
| 61 | + "planned-shut", |
| 62 | + "accept-own", |
| 63 | + "route-filter-translated-v4", |
| 64 | + "route-filter-v4", |
| 65 | + "route-filter-translated-v6", |
| 66 | + "route-filter-v6", |
| 67 | + "llgr-stale", |
| 68 | + "no-llgr", |
| 69 | + "blackhole", |
| 70 | + "no-export", |
| 71 | + "no-advertise", |
| 72 | + "no-export-subconfed", |
| 73 | + "no-peer" |
| 74 | + ], |
| 75 | + "type": "string" |
| 76 | + }, |
| 77 | + "type": "array" |
| 78 | + } |
| 79 | + }, |
| 80 | + "type": "object", |
| 81 | + "additionalProperties": false |
| 82 | + }, |
| 83 | + "localPreference": { |
| 84 | + "description": "LocalPreference sets the local preference attribute in the route.\nIf not specified, no local preference attribute is set.", |
| 85 | + "format": "int64", |
| 86 | + "type": "integer" |
| 87 | + } |
| 88 | + }, |
| 89 | + "type": "object", |
| 90 | + "additionalProperties": false |
| 91 | + }, |
| 92 | + "selector": { |
| 93 | + "description": "Selector is a label selector to select objects of the type specified by AdvertisementType.\nFor the PodCIDR AdvertisementType it is not applicable. For other advertisement types,\nif not specified, no objects of the type specified by AdvertisementType are selected for advertisement.", |
| 94 | + "properties": { |
| 95 | + "matchExpressions": { |
| 96 | + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", |
| 97 | + "items": { |
| 98 | + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.", |
| 99 | + "properties": { |
| 100 | + "key": { |
| 101 | + "description": "key is the label key that the selector applies to.", |
| 102 | + "type": "string" |
| 103 | + }, |
| 104 | + "operator": { |
| 105 | + "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.", |
| 106 | + "enum": [ |
| 107 | + "In", |
| 108 | + "NotIn", |
| 109 | + "Exists", |
| 110 | + "DoesNotExist" |
| 111 | + ], |
| 112 | + "type": "string" |
| 113 | + }, |
| 114 | + "values": { |
| 115 | + "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.", |
| 116 | + "items": { |
| 117 | + "type": "string" |
| 118 | + }, |
| 119 | + "type": "array", |
| 120 | + "x-kubernetes-list-type": "atomic" |
| 121 | + } |
| 122 | + }, |
| 123 | + "required": [ |
| 124 | + "key", |
| 125 | + "operator" |
| 126 | + ], |
| 127 | + "type": "object", |
| 128 | + "additionalProperties": false |
| 129 | + }, |
| 130 | + "type": "array", |
| 131 | + "x-kubernetes-list-type": "atomic" |
| 132 | + }, |
| 133 | + "matchLabels": { |
| 134 | + "additionalProperties": { |
| 135 | + "description": "MatchLabelsValue represents the value from the MatchLabels {key,value} pair.", |
| 136 | + "maxLength": 63, |
| 137 | + "pattern": "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$", |
| 138 | + "type": "string" |
| 139 | + }, |
| 140 | + "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.", |
| 141 | + "type": "object" |
| 142 | + } |
| 143 | + }, |
| 144 | + "type": "object", |
| 145 | + "x-kubernetes-map-type": "atomic", |
| 146 | + "additionalProperties": false |
| 147 | + }, |
| 148 | + "service": { |
| 149 | + "description": "Service defines configuration options for advertisementType service.", |
| 150 | + "properties": { |
| 151 | + "addresses": { |
| 152 | + "description": "Addresses is a list of service address types which needs to be advertised via BGP.", |
| 153 | + "items": { |
| 154 | + "description": "BGPServiceAddressType defines type of service address to be advertised.\n\nNote list of supported service addresses is not exhaustive and can be extended in the future.\nConsumer of this API should be able to handle unknown values.", |
| 155 | + "enum": [ |
| 156 | + "LoadBalancerIP", |
| 157 | + "ClusterIP", |
| 158 | + "ExternalIP" |
| 159 | + ], |
| 160 | + "type": "string" |
| 161 | + }, |
| 162 | + "minItems": 1, |
| 163 | + "type": "array" |
| 164 | + }, |
| 165 | + "aggregationLengthIPv4": { |
| 166 | + "description": "IPv4 mask to aggregate BGP route advertisements of service", |
| 167 | + "maximum": 31, |
| 168 | + "minimum": 0, |
| 169 | + "type": "integer" |
| 170 | + }, |
| 171 | + "aggregationLengthIPv6": { |
| 172 | + "description": "IPv6 mask to aggregate BGP route advertisements of service", |
| 173 | + "maximum": 127, |
| 174 | + "minimum": 0, |
| 175 | + "type": "integer" |
| 176 | + } |
| 177 | + }, |
| 178 | + "required": [ |
| 179 | + "addresses" |
| 180 | + ], |
| 181 | + "type": "object", |
| 182 | + "additionalProperties": false |
| 183 | + } |
| 184 | + }, |
| 185 | + "required": [ |
| 186 | + "advertisementType" |
| 187 | + ], |
| 188 | + "type": "object", |
| 189 | + "x-kubernetes-validations": [ |
| 190 | + { |
| 191 | + "message": "service field is required for the 'Service' advertisementType", |
| 192 | + "rule": "self.advertisementType != 'Service' || has(self.service)" |
| 193 | + }, |
| 194 | + { |
| 195 | + "message": "selector field is not allowed for the 'PodCIDR' advertisementType", |
| 196 | + "rule": "self.advertisementType != 'PodCIDR' || !has(self.selector)" |
| 197 | + } |
| 198 | + ], |
| 199 | + "additionalProperties": false |
| 200 | + }, |
| 201 | + "type": "array" |
| 202 | + } |
| 203 | + }, |
| 204 | + "required": [ |
| 205 | + "advertisements" |
| 206 | + ], |
| 207 | + "type": "object", |
| 208 | + "additionalProperties": false |
| 209 | + } |
| 210 | + }, |
| 211 | + "required": [ |
| 212 | + "metadata", |
| 213 | + "spec" |
| 214 | + ], |
| 215 | + "type": "object" |
| 216 | +} |
0 commit comments