Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: PC-12014 Support CompositesV2 #194

Merged
merged 30 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5d087b1
PC-12014 Initial sketch
BSski Feb 28, 2024
dcf88c4
PC-12014 Merge main in
BSski Mar 8, 2024
f4ee4e2
PC-12014 Add some TODOs
BSski Mar 8, 2024
cd3dc94
Merge branch 'main' into pc-12014-support-composite-2.0-in-terraform
BSski Mar 14, 2024
bc740ea
Merge branch 'main' into pc-12014-support-composite-2.0-in-terraform
BSski Mar 15, 2024
4697c59
PC-12014 Move schemas, add marshal func
BSski Mar 15, 2024
f39d8bf
PC-12014 Major rewrite
BSski Mar 26, 2024
50bf49a
PC-12014 Deprecate old composite
BSski Mar 26, 2024
e4adb0a
PC-12014 Schema rework
BSski Mar 27, 2024
11097a0
PC-12014 Major rewrite 2
BSski Mar 29, 2024
58f81d5
PC-12014 Tests fix prototype, regen docs
BSski Apr 2, 2024
04756ab
Merge branch 'main' into pc-12014-support-composite-2.0-in-terraform
BSski Apr 2, 2024
40ad804
PC-12014 Change CompositeV2 description
BSski Apr 3, 2024
6359846
PC-12014 Fix linter, remove comment
BSski Apr 3, 2024
f5f62ea
PC-12014 Format code
BSski Apr 3, 2024
f59cd41
PC-12014 Change CompositeV2 field description
BSski Apr 3, 2024
efda66f
PC-12014 Ignore staticcheck for CompositeV1
BSski Apr 3, 2024
a4f8d82
PC-12014 Regen docs
BSski Apr 3, 2024
c6c82b6
PC-12014 Remove "V2" suffixes
BSski Apr 5, 2024
054f773
PC-12014 Modify fields descriptions
BSski Apr 8, 2024
52a08fa
PC-12014 Make composite objectives optional
BSski Apr 8, 2024
40e9997
PC-12014 Fix error when applying composite without objectives
BSski Apr 8, 2024
2deae04
PC-12014 Rename "schemas" to "resources"
BSski Apr 8, 2024
d96df02
PC-12014 Make display name of objective optional
BSski Apr 9, 2024
fe1d254
PC-12014 Make components and objectives optional
BSski Apr 9, 2024
c919bf1
PC-12014 Update descriptions
BSski Apr 10, 2024
4c629c8
PC-12014 Merge main in
BSski Apr 10, 2024
a9ef0db
PC-12014 Make Indicator optional again
BSski Apr 10, 2024
627ba70
PC-12014 Change when_delayed description
BSski Apr 11, 2024
ffb77a1
Merge branch 'main' into pc-12014-support-composite-2.0-in-terraform
BSski Apr 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 77 additions & 36 deletions docs/resources/slo.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,67 +145,95 @@ resource "nobl9_slo" "this" {

### Required

- `budgeting_method` (String) Method which will be use to calculate budget
- `indicator` (Block Set, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--indicator))
- `budgeting_method` (String) Method which will be use to calculate budget.
- `name` (String) Unique name of the resource, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- `objective` (Block Set, Min: 1) [Objectives documentation](https://docs.nobl9.com/yaml-guide#objective) (see [below for nested schema](#nestedblock--objective))
- `project` (String) Name of the Nobl9 project the resource sits in, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- `service` (String) Name of the service
- `service` (String) Name of the service.
- `time_window` (Block Set, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--time_window))

### Optional

- `alert_policies` (List of String) Alert Policies attached to SLO
- `alert_policies` (List of String) Alert Policies attached to SLO.
- `anomaly_config` (Block Set, Max: 1) Configuration for Anomalies. Currently supported Anomaly Type is NoData (see [below for nested schema](#nestedblock--anomaly_config))
- `attachment` (Block List, Max: 20) (see [below for nested schema](#nestedblock--attachment))
- `attachments` (Block List, Max: 20, Deprecated) (see [below for nested schema](#nestedblock--attachments))
- `composite` (Block Set, Max: 1) [Composite SLO documentation](https://docs.nobl9.com/yaml-guide/#slo) (see [below for nested schema](#nestedblock--composite))
- `composite` (Block Set, Max: 1, Deprecated) [Composite SLO documentation](https://docs.nobl9.com/yaml-guide/#slo) (see [below for nested schema](#nestedblock--composite))
- `description` (String) Optional description of the resource. Here, you can add details about who is responsible for the integration (team/owner) or the purpose of creating it.
- `display_name` (String) User-friendly display name of the resource.
- `indicator` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--indicator))
- `label` (Block List) [Labels](https://docs.nobl9.com/Features/labels/) containing a single key and a list of values. (see [below for nested schema](#nestedblock--label))

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--indicator"></a>
### Nested Schema for `indicator`
<a id="nestedblock--objective"></a>
### Nested Schema for `objective`

Required:

- `name` (String) Name of the metric source (agent).
- `target` (Number) Designated value.
- `value` (Number) Value.

Optional:

- `kind` (String) Kind of the metric source. One of {Agent, Direct}.
- `project` (String) Name of the metric source project.

- `composite` (Block Set) An assembly of objectives from different SLOs reflecting their combined performance. (see [below for nested schema](#nestedblock--objective--composite))
- `count_metrics` (Block Set) Compares two time series, calculating the ratio of either good or bad values to the total number of values. Fill either the 'good' or 'bad' series, but not both. (see [below for nested schema](#nestedblock--objective--count_metrics))
- `display_name` (String) Name to be displayed.
- `name` (String) Objective's name. This field is computed if not provided.
- `op` (String) Type of logical operation.
- `primary` (Boolean) Is objective marked as primary.
- `raw_metric` (Block Set) Raw data is used to compare objective values. (see [below for nested schema](#nestedblock--objective--raw_metric))
- `time_slice_target` (Number) Designated value for slice.

<a id="nestedblock--objective"></a>
### Nested Schema for `objective`
<a id="nestedblock--objective--composite"></a>
### Nested Schema for `objective.composite`

Required:

- `display_name` (String) Name to be displayed
- `target` (Number) Designated value
- `value` (Number) Value
- `max_delay` (String) Maximum time for your composite SLO to wait for data from objectives.

Optional:

- `count_metrics` (Block Set) Compares two time series, calculating the ratio of either good or bad values to the total number of values. Fill either the 'good' or 'bad' series, but not both. (see [below for nested schema](#nestedblock--objective--count_metrics))
- `name` (String) Objective's name. This field is computed if not provided.
- `op` (String) Type of logical operation
- `primary` (Boolean) Is objective marked as primary.
- `raw_metric` (Block Set) Raw data is used to compare objective values. (see [below for nested schema](#nestedblock--objective--raw_metric))
- `time_slice_target` (Number) Designated value for slice
- `components` (Block Set) Objectives to be assembled in your composite SLO. (see [below for nested schema](#nestedblock--objective--composite--components))

<a id="nestedblock--objective--composite--components"></a>
### Nested Schema for `objective.composite.components`

Optional:

- `objectives` (Block Set) An additional nesting for the components of your composite SLO. (see [below for nested schema](#nestedblock--objective--composite--components--objectives))

<a id="nestedblock--objective--composite--components--objectives"></a>
### Nested Schema for `objective.composite.components.objectives`

Optional:

- `composite_objective` (Block List) Your composite SLO component. (see [below for nested schema](#nestedblock--objective--composite--components--objectives--composite_objective))

<a id="nestedblock--objective--composite--components--objectives--composite_objective"></a>
### Nested Schema for `objective.composite.components.objectives.composite_objective`

Required:

- `objective` (String) SLO objective name.
- `project` (String) Project name.
- `slo` (String) SLO name.
- `weight` (Number) Weights determine each component’s contribution to the composite SLO.
- `when_delayed` (String) Defines how to treat missing component data on `max_delay` expiry.





<a id="nestedblock--objective--count_metrics"></a>
### Nested Schema for `objective.count_metrics`

Required:

- `incremental` (Boolean) Should the metrics be incrementing or not
- `total` (Block Set, Min: 1) Configuration for metric source (see [below for nested schema](#nestedblock--objective--count_metrics--total))
- `incremental` (Boolean) Should the metrics be incrementing or not.
- `total` (Block Set, Min: 1) Configuration for metric source. (see [below for nested schema](#nestedblock--objective--count_metrics--total))

Optional:

Expand Down Expand Up @@ -1265,7 +1293,7 @@ Required:

Required:

- `query` (Block Set, Min: 1) Configuration for metric source (see [below for nested schema](#nestedblock--objective--raw_metric--query))
- `query` (Block Set, Min: 1) Configuration for metric source. (see [below for nested schema](#nestedblock--objective--raw_metric--query))

<a id="nestedblock--objective--raw_metric--query"></a>
### Nested Schema for `objective.raw_metric.query`
Expand Down Expand Up @@ -1623,25 +1651,25 @@ Required:

Required:

- `count` (Number) Count of the time unit
- `unit` (String) Unit of time
- `count` (Number) Count of the time unit.
- `unit` (String) Unit of time.

Optional:

- `calendar` (Block Set) Alert Policies attached to SLO (see [below for nested schema](#nestedblock--time_window--calendar))
- `is_rolling` (Boolean) Is the window moving or not
- `calendar` (Block Set) Alert Policies attached to SLO. (see [below for nested schema](#nestedblock--time_window--calendar))
- `is_rolling` (Boolean) Is the window moving or not.

Read-Only:

- `period` (Map of String) Period between start time and added count
- `period` (Map of String) Period between start time and added count.

<a id="nestedblock--time_window--calendar"></a>
### Nested Schema for `time_window.calendar`

Required:

- `start_time` (String) Date of the start
- `time_zone` (String) Timezone name in IANA Time Zone Database
- `start_time` (String) Date of the start.
- `time_zone` (String) Timezone name in IANA Time Zone Database.



Expand Down Expand Up @@ -1675,7 +1703,7 @@ Required:

Required:

- `url` (String) URL to the attachment
- `url` (String) URL to the attachment.

Optional:

Expand All @@ -1687,7 +1715,7 @@ Optional:

Required:

- `url` (String) URL to the attachment
- `url` (String) URL to the attachment.

Optional:

Expand All @@ -1699,7 +1727,7 @@ Optional:

Required:

- `target` (Number) Designated value
- `target` (Number) Designated value.

Optional:

Expand All @@ -1710,11 +1738,24 @@ Optional:

Required:

- `op` (String) Type of logical operation
- `op` (String) Type of logical operation.
- `value` (Number) Burn rate value.



<a id="nestedblock--indicator"></a>
### Nested Schema for `indicator`

Required:

- `name` (String) Name of the metric source (agent).

Optional:

- `kind` (String) Kind of the metric source. One of {Agent, Direct}.
- `project` (String) Name of the metric source project.


<a id="nestedblock--label"></a>
### Nested Schema for `label`

Expand Down
Loading
Loading