|
| 1 | +--- |
| 2 | +apiVersion: apiextensions.k8s.io/v1 |
| 3 | +kind: CustomResourceDefinition |
| 4 | +metadata: |
| 5 | + annotations: |
| 6 | + controller-gen.kubebuilder.io/version: v0.10.0 |
| 7 | + creationTimestamp: null |
| 8 | + name: circuitbreakers.ctrlmesh.kusionstack.io |
| 9 | +spec: |
| 10 | + group: ctrlmesh.kusionstack.io |
| 11 | + names: |
| 12 | + kind: CircuitBreaker |
| 13 | + listKind: CircuitBreakerList |
| 14 | + plural: circuitbreakers |
| 15 | + shortNames: |
| 16 | + - cbk |
| 17 | + singular: circuitbreaker |
| 18 | + scope: Namespaced |
| 19 | + versions: |
| 20 | + - name: v1alpha1 |
| 21 | + schema: |
| 22 | + openAPIV3Schema: |
| 23 | + description: CircuitBreaker is the Schema for the circuitbreakers API |
| 24 | + properties: |
| 25 | + apiVersion: |
| 26 | + description: 'APIVersion defines the versioned schema of this representation |
| 27 | + of an object. Servers should convert recognized schemas to the latest |
| 28 | + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' |
| 29 | + type: string |
| 30 | + kind: |
| 31 | + description: 'Kind is a string value representing the REST resource this |
| 32 | + object represents. Servers may infer this from the endpoint the client |
| 33 | + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' |
| 34 | + type: string |
| 35 | + metadata: |
| 36 | + type: object |
| 37 | + spec: |
| 38 | + description: CircuitBreakerSpec defines the desired state of CircuitBreaker |
| 39 | + properties: |
| 40 | + rateLimitings: |
| 41 | + description: RateLimitings defines the limit policies |
| 42 | + items: |
| 43 | + description: Limiting defines the limit policy |
| 44 | + properties: |
| 45 | + bucket: |
| 46 | + description: Bucket defines the whole token bucket of the policy |
| 47 | + properties: |
| 48 | + burst: |
| 49 | + description: Burst is the max token number of the bucket |
| 50 | + format: int32 |
| 51 | + type: integer |
| 52 | + interval: |
| 53 | + description: 'Interval is the time interval of the limiting |
| 54 | + policy, in format of time like: 1h, 3m, 5s.' |
| 55 | + type: string |
| 56 | + limit: |
| 57 | + description: Limit is the token number of the limiting policy. |
| 58 | + format: int32 |
| 59 | + type: integer |
| 60 | + required: |
| 61 | + - burst |
| 62 | + - interval |
| 63 | + - limit |
| 64 | + type: object |
| 65 | + name: |
| 66 | + description: Name is the name of the policy |
| 67 | + type: string |
| 68 | + properties: |
| 69 | + additionalProperties: |
| 70 | + type: string |
| 71 | + description: 'ValidatePolicy determine the opportunity to validate |
| 72 | + req ValidatePolicy ValidatePolicy `json:"validatePolicy,omitempty"` |
| 73 | + Properties defines the additional properties of the policy, |
| 74 | + like: SleepingWindowSize' |
| 75 | + type: object |
| 76 | + recoverPolicy: |
| 77 | + description: RecoverPolicy defines how the circuit-breaking |
| 78 | + policy recovered from 'Opened' to 'Closed' |
| 79 | + properties: |
| 80 | + sleepingWindowSize: |
| 81 | + type: string |
| 82 | + type: |
| 83 | + type: string |
| 84 | + required: |
| 85 | + - type |
| 86 | + type: object |
| 87 | + resourceRules: |
| 88 | + description: ResourceRules defines the target k8s resource of |
| 89 | + the limiting policy |
| 90 | + items: |
| 91 | + description: ResourceRule defines the target k8s resource |
| 92 | + of the limiting policy |
| 93 | + properties: |
| 94 | + apiGroups: |
| 95 | + description: APIGroups is the name of the APIGroup that |
| 96 | + contains the resources. If multiple API groups are |
| 97 | + specified, any action requested against one of the enumerated |
| 98 | + resources in any API group will be allowed. "*" means |
| 99 | + all. |
| 100 | + items: |
| 101 | + type: string |
| 102 | + type: array |
| 103 | + namespaces: |
| 104 | + description: Namespaces is a list of namespaces the rule |
| 105 | + applies to. "*" means all. |
| 106 | + items: |
| 107 | + type: string |
| 108 | + type: array |
| 109 | + resources: |
| 110 | + description: Resources is a list of resources this rule |
| 111 | + applies to. "*" means all in the specified apiGroups. |
| 112 | + "*/foo" represents the subresource 'foo' for all resources |
| 113 | + in the specified apiGroups. |
| 114 | + items: |
| 115 | + type: string |
| 116 | + type: array |
| 117 | + verbs: |
| 118 | + description: 'Verb is a list of kubernetes resource API |
| 119 | + verbs, like: get, list, watch, create, update, delete, |
| 120 | + proxy. "*" means all.' |
| 121 | + items: |
| 122 | + type: string |
| 123 | + type: array |
| 124 | + required: |
| 125 | + - apiGroups |
| 126 | + - namespaces |
| 127 | + - resources |
| 128 | + - verbs |
| 129 | + type: object |
| 130 | + type: array |
| 131 | + restRules: |
| 132 | + description: RestRules defines the target rest resource of the |
| 133 | + limiting policy |
| 134 | + items: |
| 135 | + description: RestRule defines the target rest resource of |
| 136 | + the limiting policy |
| 137 | + properties: |
| 138 | + method: |
| 139 | + description: 'Method specifies the http method of the |
| 140 | + request, like: PUT, POST, GET, DELETE.' |
| 141 | + type: string |
| 142 | + url: |
| 143 | + description: URL gives the location of the rest request, |
| 144 | + in standard URL form (`scheme://host:port/path`) |
| 145 | + type: string |
| 146 | + required: |
| 147 | + - method |
| 148 | + - url |
| 149 | + type: object |
| 150 | + type: array |
| 151 | + triggerPolicy: |
| 152 | + description: TriggerPolicy defines how the circuit-breaking |
| 153 | + policy triggered from 'Closed' to 'Opened' |
| 154 | + type: string |
| 155 | + required: |
| 156 | + - bucket |
| 157 | + - name |
| 158 | + - triggerPolicy |
| 159 | + type: object |
| 160 | + type: array |
| 161 | + selector: |
| 162 | + description: Selector is a label query over pods of this application. |
| 163 | + properties: |
| 164 | + matchExpressions: |
| 165 | + description: matchExpressions is a list of label selector requirements. |
| 166 | + The requirements are ANDed. |
| 167 | + items: |
| 168 | + description: A label selector requirement is a selector that |
| 169 | + contains values, a key, and an operator that relates the key |
| 170 | + and values. |
| 171 | + properties: |
| 172 | + key: |
| 173 | + description: key is the label key that the selector applies |
| 174 | + to. |
| 175 | + type: string |
| 176 | + operator: |
| 177 | + description: operator represents a key's relationship to |
| 178 | + a set of values. Valid operators are In, NotIn, Exists |
| 179 | + and DoesNotExist. |
| 180 | + type: string |
| 181 | + values: |
| 182 | + description: values is an array of string values. If the |
| 183 | + operator is In or NotIn, the values array must be non-empty. |
| 184 | + If the operator is Exists or DoesNotExist, the values |
| 185 | + array must be empty. This array is replaced during a strategic |
| 186 | + merge patch. |
| 187 | + items: |
| 188 | + type: string |
| 189 | + type: array |
| 190 | + required: |
| 191 | + - key |
| 192 | + - operator |
| 193 | + type: object |
| 194 | + type: array |
| 195 | + matchLabels: |
| 196 | + additionalProperties: |
| 197 | + type: string |
| 198 | + description: matchLabels is a map of {key,value} pairs. A single |
| 199 | + {key,value} in the matchLabels map is equivalent to an element |
| 200 | + of matchExpressions, whose key field is "key", the operator |
| 201 | + is "In", and the values array contains only "value". The requirements |
| 202 | + are ANDed. |
| 203 | + type: object |
| 204 | + type: object |
| 205 | + x-kubernetes-map-type: atomic |
| 206 | + trafficInterceptRules: |
| 207 | + description: TrafficInterceptRules defines the traffic rules |
| 208 | + items: |
| 209 | + description: TrafficInterceptRule defines the traffic intercept |
| 210 | + rule |
| 211 | + properties: |
| 212 | + contentType: |
| 213 | + description: ContentType is the content type of the traffic |
| 214 | + rule |
| 215 | + type: string |
| 216 | + contents: |
| 217 | + description: Content is the content of the traffic rule |
| 218 | + items: |
| 219 | + type: string |
| 220 | + type: array |
| 221 | + interceptType: |
| 222 | + description: InterceptType is the intercept type of the traffic |
| 223 | + rule |
| 224 | + type: string |
| 225 | + methods: |
| 226 | + description: 'Method specifies the http method of the request, |
| 227 | + like: PUT, POST, GET, DELETE.' |
| 228 | + items: |
| 229 | + type: string |
| 230 | + type: array |
| 231 | + name: |
| 232 | + description: Name is the name of the traffic rule |
| 233 | + type: string |
| 234 | + required: |
| 235 | + - contentType |
| 236 | + - contents |
| 237 | + - interceptType |
| 238 | + - methods |
| 239 | + - name |
| 240 | + type: object |
| 241 | + type: array |
| 242 | + required: |
| 243 | + - selector |
| 244 | + type: object |
| 245 | + status: |
| 246 | + description: CircuitBreakerStatus defines the observed state of CircuitBreaker |
| 247 | + properties: |
| 248 | + currentSpecHash: |
| 249 | + type: string |
| 250 | + lastUpdatedTime: |
| 251 | + format: date-time |
| 252 | + type: string |
| 253 | + observedGeneration: |
| 254 | + format: int64 |
| 255 | + type: integer |
| 256 | + targetStatus: |
| 257 | + items: |
| 258 | + properties: |
| 259 | + configHash: |
| 260 | + type: string |
| 261 | + limitingSnapshots: |
| 262 | + items: |
| 263 | + description: LimitingSnapshot defines the snapshot of the |
| 264 | + whole limiting policy |
| 265 | + properties: |
| 266 | + lastTransitionTime: |
| 267 | + description: LastTransitionTime is the last time that |
| 268 | + the status changed |
| 269 | + format: date-time |
| 270 | + type: string |
| 271 | + name: |
| 272 | + description: Name specifies the name of the policy |
| 273 | + type: string |
| 274 | + state: |
| 275 | + description: Status is the status of the circuit breaker, |
| 276 | + which may be 'Opened' or 'Closed'. |
| 277 | + type: string |
| 278 | + required: |
| 279 | + - name |
| 280 | + - state |
| 281 | + type: object |
| 282 | + type: array |
| 283 | + message: |
| 284 | + type: string |
| 285 | + podIP: |
| 286 | + type: string |
| 287 | + podName: |
| 288 | + type: string |
| 289 | + type: object |
| 290 | + type: array |
| 291 | + type: object |
| 292 | + type: object |
| 293 | + served: true |
| 294 | + storage: true |
| 295 | + subresources: |
| 296 | + status: {} |
0 commit comments