1# Copyright 2020 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15apiVersion: apiextensions.k8s.io/v1
16kind: CustomResourceDefinition
17metadata:
18 annotations:
19 cnrm.cloud.google.com/version: 1.106.0
20 creationTimestamp: null
21 labels:
22 cnrm.cloud.google.com/dcl2crd: "true"
23 cnrm.cloud.google.com/managed-by-kcc: "true"
24 cnrm.cloud.google.com/stability-level: stable
25 cnrm.cloud.google.com/system: "true"
26 name: billingbudgetsbudgets.billingbudgets.cnrm.cloud.google.com
27spec:
28 group: billingbudgets.cnrm.cloud.google.com
29 names:
30 categories:
31 - gcp
32 kind: BillingBudgetsBudget
33 plural: billingbudgetsbudgets
34 shortNames:
35 - gcpbillingbudgetsbudget
36 - gcpbillingbudgetsbudgets
37 singular: billingbudgetsbudget
38 scope: Namespaced
39 versions:
40 - additionalPrinterColumns:
41 - jsonPath: .metadata.creationTimestamp
42 name: Age
43 type: date
44 - description: When 'True', the most recent reconcile of the resource succeeded
45 jsonPath: .status.conditions[?(@.type=='Ready')].status
46 name: Ready
47 type: string
48 - description: The reason for the value in 'Ready'
49 jsonPath: .status.conditions[?(@.type=='Ready')].reason
50 name: Status
51 type: string
52 - description: The last transition time for the value in 'Status'
53 jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime
54 name: Status Age
55 type: date
56 name: v1beta1
57 schema:
58 openAPIV3Schema:
59 properties:
60 apiVersion:
61 description: 'apiVersion defines the versioned schema of this representation
62 of an object. Servers should convert recognized schemas to the latest
63 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
64 type: string
65 kind:
66 description: 'kind is a string value representing the REST resource this
67 object represents. Servers may infer this from the endpoint the client
68 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
69 type: string
70 metadata:
71 type: object
72 spec:
73 properties:
74 allUpdatesRule:
75 description: Optional. Rules to apply to notifications sent based
76 on budget spend and thresholds.
77 properties:
78 disableDefaultIamRecipients:
79 description: Optional. When set to true, disables default notifications
80 sent when a threshold is exceeded. Default notifications are
81 sent to those with Billing Account Administrator and Billing
82 Account User IAM roles for the target account.
83 type: boolean
84 monitoringNotificationChannels:
85 items:
86 oneOf:
87 - not:
88 required:
89 - external
90 required:
91 - name
92 - not:
93 anyOf:
94 - required:
95 - name
96 - required:
97 - namespace
98 required:
99 - external
100 properties:
101 external:
102 description: 'Allowed value: The Google Cloud resource name
103 of a `MonitoringNotificationChannel` resource (format:
104 `projects/{{project}}/notificationChannels/{{name}}`).'
105 type: string
106 name:
107 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
108 type: string
109 namespace:
110 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
111 type: string
112 type: object
113 type: array
114 pubsubTopicRef:
115 oneOf:
116 - not:
117 required:
118 - external
119 required:
120 - name
121 - not:
122 anyOf:
123 - required:
124 - name
125 - required:
126 - namespace
127 required:
128 - external
129 properties:
130 external:
131 description: |-
132 Optional. The name of the Pub/Sub topic where budget related messages will be published, in the form `projects/{project_id}/topics/{topic_id}`. Updates are sent at regular intervals to the topic. The topic needs to be created before the budget is created; see https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications for more details. Caller is expected to have `pubsub.topics.setIamPolicy` permission on the topic when it's set for a budget, otherwise, the API call will fail with PERMISSION_DENIED. See https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task for more details on Pub/Sub roles and permissions.
133
134 Allowed value: The Google Cloud resource name of a `PubSubTopic` resource (format: `projects/{{project}}/topics/{{name}}`).
135 type: string
136 name:
137 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
138 type: string
139 namespace:
140 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
141 type: string
142 type: object
143 schemaVersion:
144 description: Optional. Required when NotificationsRule.pubsub_topic
145 is set. The schema version of the notification sent to NotificationsRule.pubsub_topic.
146 Only "1.0" is accepted. It represents the JSON schema as defined
147 in https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format.
148 type: string
149 type: object
150 amount:
151 description: Required. Budgeted amount.
152 properties:
153 lastPeriodAmount:
154 description: Use the last period's actual spend as the budget
155 for the present period. LastPeriodAmount can only be set when
156 the budget's time period is a .
157 type: object
158 x-kubernetes-preserve-unknown-fields: true
159 specifiedAmount:
160 description: A specified amount to use as the budget. `currency_code`
161 is optional. If specified when creating a budget, it must match
162 the currency of the billing account. If specified when updating
163 a budget, it must match the currency_code of the existing budget.
164 The `currency_code` is provided on output.
165 properties:
166 currencyCode:
167 description: Immutable. The three-letter currency code defined
168 in ISO 4217.
169 type: string
170 nanos:
171 description: Number of nano (10^-9) units of the amount. The
172 value must be between -999,999,999 and +999,999,999 inclusive.
173 If `units` is positive, `nanos` must be positive or zero.
174 If `units` is zero, `nanos` can be positive, zero, or negative.
175 If `units` is negative, `nanos` must be negative or zero.
176 For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
177 format: int64
178 type: integer
179 units:
180 description: The whole units of the amount. For example if
181 `currencyCode` is `"USD"`, then 1 unit is one US dollar.
182 format: int64
183 type: integer
184 type: object
185 type: object
186 billingAccountRef:
187 description: Immutable.
188 oneOf:
189 - not:
190 required:
191 - external
192 required:
193 - name
194 - not:
195 anyOf:
196 - required:
197 - name
198 - required:
199 - namespace
200 required:
201 - external
202 properties:
203 external:
204 description: |-
205 The billing account of the resource
206
207 Allowed value: The Google Cloud resource name of a Google Cloud Billing Account (format: `billingAccounts/{{name}}`).
208 type: string
209 name:
210 description: |-
211 [WARNING] BillingAccount not yet supported in Config Connector, use 'external' field to reference existing resources.
212 Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
213 type: string
214 namespace:
215 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
216 type: string
217 type: object
218 budgetFilter:
219 description: Optional. Filters that define which resources are used
220 to compute the actual spend against the budget amount, such as projects,
221 services, and the budget's time period, as well as other filters.
222 properties:
223 calendarPeriod:
224 description: 'Optional. Specifies to track usage for recurring
225 calendar period. For example, assume that CalendarPeriod.QUARTER
226 is set. The budget will track usage from April 1 to June 30,
227 when the current calendar month is April, May, June. After that,
228 it will track usage from July 1 to September 30 when the current
229 calendar month is July, August, September, so on. Possible values:
230 CALENDAR_PERIOD_UNSPECIFIED, MONTH, QUARTER, YEAR'
231 type: string
232 creditTypes:
233 description: Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS,
234 this is a list of credit types to be subtracted from gross cost
235 to determine the spend for threshold calculations. See a list
236 of acceptable credit type values. If Filter.credit_types_treatment
237 is not INCLUDE_SPECIFIED_CREDITS, this field must be empty.
238 items:
239 type: string
240 type: array
241 creditTypesTreatment:
242 description: Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`.
243 type: string
244 customPeriod:
245 description: Optional. Specifies to track usage from any start
246 date (required) to any end date (optional). This time period
247 is static, it does not recur.
248 properties:
249 endDate:
250 description: Immutable. Optional. The end date of the time
251 period. Budgets with elapsed end date won't be processed.
252 If unset, specifies to track all usage incurred since the
253 start_date.
254 properties:
255 day:
256 description: Immutable. Day of a month. Must be from 1
257 to 31 and valid for the year and month, or 0 to specify
258 a year by itself or a year and month where the day isn't
259 significant.
260 format: int64
261 type: integer
262 month:
263 description: Immutable. Month of a year. Must be from
264 1 to 12, or 0 to specify a year without a month and
265 day.
266 format: int64
267 type: integer
268 year:
269 description: Immutable. Year of the date. Must be from
270 1 to 9999, or 0 to specify a date without a year.
271 format: int64
272 type: integer
273 type: object
274 startDate:
275 description: Immutable. Required. The start date must be after
276 January 1, 2017.
277 properties:
278 day:
279 description: Immutable. Day of a month. Must be from 1
280 to 31 and valid for the year and month, or 0 to specify
281 a year by itself or a year and month where the day isn't
282 significant.
283 format: int64
284 type: integer
285 month:
286 description: Immutable. Month of a year. Must be from
287 1 to 12, or 0 to specify a year without a month and
288 day.
289 format: int64
290 type: integer
291 year:
292 description: Immutable. Year of the date. Must be from
293 1 to 9999, or 0 to specify a date without a year.
294 format: int64
295 type: integer
296 type: object
297 required:
298 - startDate
299 type: object
300 labels:
301 additionalProperties:
302 properties:
303 values:
304 description: Immutable. The values of the label
305 items:
306 type: string
307 type: array
308 type: object
309 description: Optional. A single label and value pair specifying
310 that usage from only this set of labeled resources should be
311 included in the budget. Currently, multiple entries or multiple
312 values per entry are not allowed. If omitted, the report will
313 include all labeled and unlabeled usage.
314 type: object
315 projects:
316 items:
317 oneOf:
318 - not:
319 required:
320 - external
321 required:
322 - name
323 - not:
324 anyOf:
325 - required:
326 - name
327 - required:
328 - namespace
329 required:
330 - external
331 properties:
332 external:
333 description: 'Allowed value: The Google Cloud resource name
334 of a `Project` resource (format: `projects/{{name}}`).'
335 type: string
336 name:
337 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
338 type: string
339 namespace:
340 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
341 type: string
342 type: object
343 type: array
344 services:
345 description: 'Optional. A set of services of the form `services/{service_id}`,
346 specifying that usage from only this set of services should
347 be included in the budget. If omitted, the report will include
348 usage for all the services. The service names are available
349 through the Catalog API: https://cloud.google.com/billing/v1/how-tos/catalog-api.'
350 items:
351 type: string
352 type: array
353 subaccounts:
354 items:
355 oneOf:
356 - not:
357 required:
358 - external
359 required:
360 - name
361 - not:
362 anyOf:
363 - required:
364 - name
365 - required:
366 - namespace
367 required:
368 - external
369 properties:
370 external:
371 type: string
372 name:
373 description: |-
374 [WARNING] CloudBillingBillingAccount not yet supported in Config Connector, use 'external' field to reference existing resources.
375 Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
376 type: string
377 namespace:
378 description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
379 type: string
380 type: object
381 type: array
382 type: object
383 displayName:
384 description: User data for display name in UI. The name must be less
385 than or equal to 60 characters.
386 type: string
387 resourceID:
388 description: Immutable. Optional. The service-generated name of the
389 resource. Used for acquisition only. Leave unset to create a new
390 resource.
391 type: string
392 thresholdRules:
393 description: Optional. Rules that trigger alerts (notifications of
394 thresholds being crossed) when spend exceeds the specified percentages
395 of the budget.
396 items:
397 properties:
398 spendBasis:
399 description: 'Optional. The type of basis used to determine
400 if spend has passed the threshold. Behavior defaults to CURRENT_SPEND
401 if not set. Possible values: BASIS_UNSPECIFIED, CURRENT_SPEND,
402 FORECASTED_SPEND'
403 type: string
404 thresholdPercent:
405 description: 'Required. Send an alert when this threshold is
406 exceeded. This is a 1.0-based percentage, so 0.5 = 50%. Validation:
407 non-negative number.'
408 format: double
409 type: number
410 required:
411 - thresholdPercent
412 type: object
413 type: array
414 required:
415 - amount
416 - billingAccountRef
417 type: object
418 status:
419 properties:
420 conditions:
421 description: Conditions represent the latest available observation
422 of the resource's current state.
423 items:
424 properties:
425 lastTransitionTime:
426 description: Last time the condition transitioned from one status
427 to another.
428 type: string
429 message:
430 description: Human-readable message indicating details about
431 last transition.
432 type: string
433 reason:
434 description: Unique, one-word, CamelCase reason for the condition's
435 last transition.
436 type: string
437 status:
438 description: Status is the status of the condition. Can be True,
439 False, Unknown.
440 type: string
441 type:
442 description: Type is the type of the condition.
443 type: string
444 type: object
445 type: array
446 etag:
447 description: Optional. Etag to validate that the object is unchanged
448 for a read-modify-write operation. An empty etag will cause an update
449 to overwrite other changes.
450 type: string
451 observedGeneration:
452 description: ObservedGeneration is the generation of the resource
453 that was most recently observed by the Config Connector controller.
454 If this is equal to metadata.generation, then that means that the
455 current reported status reflects the most recent desired state of
456 the resource.
457 type: integer
458 type: object
459 required:
460 - spec
461 type: object
462 served: true
463 storage: true
464 subresources:
465 status: {}
466status:
467 acceptedNames:
468 kind: ""
469 plural: ""
470 conditions: []
471 storedVersions: []
View as plain text