-
Notifications
You must be signed in to change notification settings - Fork 204
/
monitoringservicelevelobjective_types.go
324 lines (256 loc) · 16.5 KB
/
monitoringservicelevelobjective_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------
//
// *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
//
// ----------------------------------------------------------------------------
//
// This file is automatically generated by Config Connector and manual
// changes will be clobbered when the file is regenerated.
//
// ----------------------------------------------------------------------------
// *** DISCLAIMER ***
// Config Connector's go-client for CRDs is currently in ALPHA, which means
// that future versions of the go-client may include breaking changes.
// Please try it out and give us feedback!
package v1beta1
import (
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type ServicelevelobjectiveAvailability struct {
}
type ServicelevelobjectiveBasicSli struct {
/* Good service is defined to be the count of requests made to this service that return successfully. */
// +optional
Availability *ServicelevelobjectiveAvailability `json:"availability,omitempty"`
/* Good service is defined to be the count of requests made to this service that are fast enough with respect to `latency.threshold`. */
// +optional
Latency *ServicelevelobjectiveLatency `json:"latency,omitempty"`
/* OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don't support breaking down by location, setting this field will result in an error. */
// +optional
Location []string `json:"location,omitempty"`
/* OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service's methods. For service types that don't support breaking down by method, setting this field will result in an error. */
// +optional
Method []string `json:"method,omitempty"`
/* Good service is defined to be the count of operations performed by this service that return successfully */
// +optional
OperationAvailability *ServicelevelobjectiveOperationAvailability `json:"operationAvailability,omitempty"`
/* Good service is defined to be the count of operations performed by this service that are fast enough with respect to `operation_latency.threshold`. */
// +optional
OperationLatency *ServicelevelobjectiveOperationLatency `json:"operationLatency,omitempty"`
/* OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don't support breaking down by version, setting this field will result in an error. */
// +optional
Version []string `json:"version,omitempty"`
}
type ServicelevelobjectiveBasicSliPerformance struct {
/* Good service is defined to be the count of requests made to this service that return successfully. */
// +optional
Availability *ServicelevelobjectiveAvailability `json:"availability,omitempty"`
/* Good service is defined to be the count of requests made to this service that are fast enough with respect to `latency.threshold`. */
// +optional
Latency *ServicelevelobjectiveLatency `json:"latency,omitempty"`
/* OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don't support breaking down by location, setting this field will result in an error. */
// +optional
Location []string `json:"location,omitempty"`
/* OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service's methods. For service types that don't support breaking down by method, setting this field will result in an error. */
// +optional
Method []string `json:"method,omitempty"`
/* Good service is defined to be the count of operations performed by this service that return successfully */
// +optional
OperationAvailability *ServicelevelobjectiveOperationAvailability `json:"operationAvailability,omitempty"`
/* Good service is defined to be the count of operations performed by this service that are fast enough with respect to `operation_latency.threshold`. */
// +optional
OperationLatency *ServicelevelobjectiveOperationLatency `json:"operationLatency,omitempty"`
/* OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don't support breaking down by version, setting this field will result in an error. */
// +optional
Version []string `json:"version,omitempty"`
}
type ServicelevelobjectiveDistributionCut struct {
/* A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` aggregating values. Must have `ValueType = DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. */
// +optional
DistributionFilter *string `json:"distributionFilter,omitempty"`
/* Range of values considered "good." For a one-sided range, set one bound to an infinite value. */
// +optional
Range *ServicelevelobjectiveRange `json:"range,omitempty"`
}
type ServicelevelobjectiveGoodTotalRatio struct {
/* A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` quantifying bad service, either demanded service that was not provided or demanded service that was of inadequate quality. Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. */
// +optional
BadServiceFilter *string `json:"badServiceFilter,omitempty"`
/* A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` quantifying good service provided. Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. */
// +optional
GoodServiceFilter *string `json:"goodServiceFilter,omitempty"`
/* A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` quantifying total demanded service. Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. */
// +optional
TotalServiceFilter *string `json:"totalServiceFilter,omitempty"`
}
type ServicelevelobjectiveGoodTotalRatioThreshold struct {
/* `BasicSli` to evaluate to judge window quality. */
// +optional
BasicSliPerformance *ServicelevelobjectiveBasicSliPerformance `json:"basicSliPerformance,omitempty"`
/* `RequestBasedSli` to evaluate to judge window quality. */
// +optional
Performance *ServicelevelobjectivePerformance `json:"performance,omitempty"`
/* If window `performance >= threshold`, the window is counted as good. */
// +optional
Threshold *float64 `json:"threshold,omitempty"`
}
type ServicelevelobjectiveLatency struct {
/* A description of the experience associated with failing requests. Possible values: LATENCY_EXPERIENCE_UNSPECIFIED, DELIGHTING, SATISFYING, ANNOYING */
// +optional
Experience *string `json:"experience,omitempty"`
/* Good service is defined to be the count of requests made to this service that return in no more than `threshold`. */
// +optional
Threshold *string `json:"threshold,omitempty"`
}
type ServicelevelobjectiveMetricMeanInRange struct {
/* Range of values considered "good." For a one-sided range, set one bound to an infinite value. */
// +optional
Range *ServicelevelobjectiveRange `json:"range,omitempty"`
/* A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying the `TimeSeries` to use for evaluating window quality. */
// +optional
TimeSeries *string `json:"timeSeries,omitempty"`
}
type ServicelevelobjectiveMetricSumInRange struct {
/* Range of values considered "good." For a one-sided range, set one bound to an infinite value. */
// +optional
Range *ServicelevelobjectiveRange `json:"range,omitempty"`
/* A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying the `TimeSeries` to use for evaluating window quality. */
// +optional
TimeSeries *string `json:"timeSeries,omitempty"`
}
type ServicelevelobjectiveOperationAvailability struct {
}
type ServicelevelobjectiveOperationLatency struct {
/* A description of the experience associated with failing requests. Possible values: LATENCY_EXPERIENCE_UNSPECIFIED, DELIGHTING, SATISFYING, ANNOYING */
// +optional
Experience *string `json:"experience,omitempty"`
/* Good service is defined to be the count of operations that are completed in no more than `threshold`. */
// +optional
Threshold *string `json:"threshold,omitempty"`
}
type ServicelevelobjectivePerformance struct {
/* `distribution_cut` is used when `good_service` is a count of values aggregated in a `Distribution` that fall into a good range. The `total_service` is the total count of all values aggregated in the `Distribution`. */
// +optional
DistributionCut *ServicelevelobjectiveDistributionCut `json:"distributionCut,omitempty"`
/* `good_total_ratio` is used when the ratio of `good_service` to `total_service` is computed from two `TimeSeries`. */
// +optional
GoodTotalRatio *ServicelevelobjectiveGoodTotalRatio `json:"goodTotalRatio,omitempty"`
}
type ServicelevelobjectiveRange struct {
/* Range maximum. */
// +optional
Max *float64 `json:"max,omitempty"`
/* Range minimum. */
// +optional
Min *float64 `json:"min,omitempty"`
}
type ServicelevelobjectiveRequestBased struct {
/* `distribution_cut` is used when `good_service` is a count of values aggregated in a `Distribution` that fall into a good range. The `total_service` is the total count of all values aggregated in the `Distribution`. */
// +optional
DistributionCut *ServicelevelobjectiveDistributionCut `json:"distributionCut,omitempty"`
/* `good_total_ratio` is used when the ratio of `good_service` to `total_service` is computed from two `TimeSeries`. */
// +optional
GoodTotalRatio *ServicelevelobjectiveGoodTotalRatio `json:"goodTotalRatio,omitempty"`
}
type ServicelevelobjectiveServiceLevelIndicator struct {
/* Basic SLI on a well-known service type. */
// +optional
BasicSli *ServicelevelobjectiveBasicSli `json:"basicSli,omitempty"`
/* Request-based SLIs */
// +optional
RequestBased *ServicelevelobjectiveRequestBased `json:"requestBased,omitempty"`
/* Windows-based SLIs */
// +optional
WindowsBased *ServicelevelobjectiveWindowsBased `json:"windowsBased,omitempty"`
}
type ServicelevelobjectiveWindowsBased struct {
/* A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if any `true` values appear in the window. */
// +optional
GoodBadMetricFilter *string `json:"goodBadMetricFilter,omitempty"`
/* A window is good if its `performance` is high enough. */
// +optional
GoodTotalRatioThreshold *ServicelevelobjectiveGoodTotalRatioThreshold `json:"goodTotalRatioThreshold,omitempty"`
/* A window is good if the metric's value is in a good range, averaged across returned streams. */
// +optional
MetricMeanInRange *ServicelevelobjectiveMetricMeanInRange `json:"metricMeanInRange,omitempty"`
/* A window is good if the metric's value is in a good range, summed across returned streams. */
// +optional
MetricSumInRange *ServicelevelobjectiveMetricSumInRange `json:"metricSumInRange,omitempty"`
/* Duration over which window quality is evaluated. Must be an integer fraction of a day and at least `60s`. */
// +optional
WindowPeriod *string `json:"windowPeriod,omitempty"`
}
type MonitoringServiceLevelObjectiveSpec struct {
/* A calendar period, semantically "since the start of the current ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and `MONTH` are supported. Possible values: CALENDAR_PERIOD_UNSPECIFIED, DAY, WEEK, FORTNIGHT, MONTH, QUARTER, HALF, YEAR */
// +optional
CalendarPeriod *string `json:"calendarPeriod,omitempty"`
/* Name used for UI elements listing this SLO. */
// +optional
DisplayName *string `json:"displayName,omitempty"`
/* The fraction of service that must be good in order for this objective to be met. `0 < goal <= 0.999`. */
Goal float64 `json:"goal"`
/* Immutable. The Project that this resource belongs to. */
ProjectRef v1alpha1.ResourceRef `json:"projectRef"`
/* Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */
// +optional
ResourceID *string `json:"resourceID,omitempty"`
/* A rolling time period, semantically "in the past ``". Must be an integer multiple of 1 day no larger than 30 days. */
// +optional
RollingPeriod *string `json:"rollingPeriod,omitempty"`
/* The definition of good service, used to measure and calculate the quality of the `Service`'s performance with respect to a single aspect of service quality. */
// +optional
ServiceLevelIndicator *ServicelevelobjectiveServiceLevelIndicator `json:"serviceLevelIndicator,omitempty"`
/* Immutable. */
ServiceRef v1alpha1.ResourceRef `json:"serviceRef"`
}
type MonitoringServiceLevelObjectiveStatus struct {
/* Conditions represent the latest available observations of the
MonitoringServiceLevelObjective's current state. */
Conditions []v1alpha1.Condition `json:"conditions,omitempty"`
/* Time stamp of the `Create` or most recent `Update` command on this `Slo`. */
// +optional
CreateTime *string `json:"createTime,omitempty"`
/* Time stamp of the `Update` or `Delete` command that made this no longer a current `Slo`. This field is not populated in `ServiceLevelObjective`s returned from calls to `GetServiceLevelObjective` and `ListServiceLevelObjectives`, because it is always empty in the current version. It is populated in `ServiceLevelObjective`s representing previous versions in the output of `ListServiceLevelObjectiveVersions`. Because all old configuration versions are stored, `Update` operations mark the obsoleted version as deleted. */
// +optional
DeleteTime *string `json:"deleteTime,omitempty"`
/* ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. */
// +optional
ObservedGeneration *int `json:"observedGeneration,omitempty"`
/* Output only. If set, this SLO is managed at the [Service Management](https://cloud.google.com/service-management/overview) level. Therefore the service yaml file is the source of truth for this SLO, and API `Update` and `Delete` operations are forbidden. */
// +optional
ServiceManagementOwned *bool `json:"serviceManagementOwned,omitempty"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// MonitoringServiceLevelObjective is the Schema for the monitoring API
// +k8s:openapi-gen=true
type MonitoringServiceLevelObjective struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MonitoringServiceLevelObjectiveSpec `json:"spec,omitempty"`
Status MonitoringServiceLevelObjectiveStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// MonitoringServiceLevelObjectiveList contains a list of MonitoringServiceLevelObjective
type MonitoringServiceLevelObjectiveList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MonitoringServiceLevelObjective `json:"items"`
}
func init() {
SchemeBuilder.Register(&MonitoringServiceLevelObjective{}, &MonitoringServiceLevelObjectiveList{})
}