levelfour 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/resources/kubernetes/client/Client.d.mts +19 -0
- package/dist/api/resources/kubernetes/client/Client.d.ts +19 -0
- package/dist/api/resources/kubernetes/client/Client.js +96 -0
- package/dist/api/resources/kubernetes/client/Client.mjs +96 -0
- package/dist/api/types/AutomationEvent.d.mts +3 -3
- package/dist/api/types/AutomationEvent.d.ts +3 -3
- package/dist/api/types/InvoiceDetail.d.mts +2 -0
- package/dist/api/types/InvoiceDetail.d.ts +2 -0
- package/dist/api/types/InvoiceLinesPage.d.mts +7 -0
- package/dist/api/types/InvoiceLinesPage.d.ts +7 -0
- package/dist/api/types/InvoiceLinesPage.js +17 -0
- package/dist/api/types/InvoiceLinesPage.mjs +1 -0
- package/dist/api/types/InvoiceLinesResponse.d.mts +6 -0
- package/dist/api/types/InvoiceLinesResponse.d.ts +6 -0
- package/dist/api/types/InvoiceLinesResponse.js +17 -0
- package/dist/api/types/InvoiceLinesResponse.mjs +1 -0
- package/dist/api/types/KubernetesUsage.d.mts +9 -0
- package/dist/api/types/KubernetesUsage.d.ts +9 -0
- package/dist/api/types/KubernetesUsage.js +17 -0
- package/dist/api/types/KubernetesUsage.mjs +1 -0
- package/dist/api/types/KubernetesUsageResponse.d.mts +6 -0
- package/dist/api/types/KubernetesUsageResponse.d.ts +6 -0
- package/dist/api/types/KubernetesUsageResponse.js +17 -0
- package/dist/api/types/KubernetesUsageResponse.mjs +1 -0
- package/dist/api/types/KubernetesUsageSource.d.mts +29 -0
- package/dist/api/types/KubernetesUsageSource.d.ts +29 -0
- package/dist/api/types/KubernetesUsageSource.js +41 -0
- package/dist/api/types/KubernetesUsageSource.mjs +17 -0
- package/dist/api/types/NodeHealthDay.d.mts +2 -0
- package/dist/api/types/NodeHealthDay.d.ts +2 -0
- package/dist/api/types/PodsOnNode.d.mts +4 -0
- package/dist/api/types/PodsOnNode.d.ts +4 -0
- package/dist/api/types/ReliabilityEventDay.d.mts +2 -0
- package/dist/api/types/ReliabilityEventDay.d.ts +2 -0
- package/dist/api/types/ReliabilityFacetCount.d.mts +1 -0
- package/dist/api/types/ReliabilityFacetCount.d.ts +1 -0
- package/dist/api/types/ReliabilityFacetCount.js +1 -0
- package/dist/api/types/ReliabilityFacetCount.mjs +1 -0
- package/dist/api/types/ReliabilityLens.d.mts +1 -1
- package/dist/api/types/ReliabilityLens.d.ts +1 -1
- package/dist/api/types/SetSizingPolicyRequest.d.mts +23 -4
- package/dist/api/types/SetSizingPolicyRequest.d.ts +23 -4
- package/dist/api/types/SetSizingPolicyRequest.js +14 -1
- package/dist/api/types/SetSizingPolicyRequest.mjs +14 -1
- package/dist/api/types/SizingPolicies.d.mts +6 -3
- package/dist/api/types/SizingPolicies.d.ts +6 -3
- package/dist/api/types/SizingPolicies.js +2 -1
- package/dist/api/types/SizingPolicies.mjs +2 -1
- package/dist/api/types/SizingPolicy.d.mts +24 -3
- package/dist/api/types/SizingPolicy.d.ts +24 -3
- package/dist/api/types/SizingPolicy.js +14 -1
- package/dist/api/types/SizingPolicy.mjs +14 -1
- package/dist/api/types/UnmonitoredCluster.d.mts +2 -0
- package/dist/api/types/UnmonitoredCluster.d.ts +2 -0
- package/dist/api/types/WorkloadItem.d.mts +4 -0
- package/dist/api/types/WorkloadItem.d.ts +4 -0
- package/dist/api/types/WorkloadListItem.d.mts +4 -0
- package/dist/api/types/WorkloadListItem.d.ts +4 -0
- package/dist/api/types/index.d.mts +5 -0
- package/dist/api/types/index.d.ts +5 -0
- package/dist/api/types/index.js +10 -0
- package/dist/api/types/index.mjs +5 -0
- package/dist/version.d.mts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,25 @@ export declare namespace KubernetesClient {
|
|
|
10
10
|
export declare class KubernetesClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<KubernetesClient.Options>;
|
|
12
12
|
constructor(options: KubernetesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Answers every organization, with or without the Kubernetes module, so the dashboard can show the module to those who run Kubernetes. In use means a bill carries EKS, GKE or AKS spend in the last 30 days, or an agent cluster reported. Each cloud's cost is the bill's own: its Kubernetes service line plus the nodes the bill ties to a cluster, partial when some could not be tied. Its clusters are the agent clusters plus those GET /v1/k8s/unmonitored-clusters lists for it. It only reads: it never turns the module on.
|
|
15
|
+
*
|
|
16
|
+
* @param {KubernetesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
|
+
*
|
|
18
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
19
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
20
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
21
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
22
|
+
* @throws {@link LevelFour.ConflictError}
|
|
23
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
24
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
25
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.kubernetes.getKubernetesUsage()
|
|
29
|
+
*/
|
|
30
|
+
getKubernetesUsage(requestOptions?: KubernetesClient.RequestOptions): core.HttpResponsePromise<LevelFour.KubernetesUsageResponse>;
|
|
31
|
+
private __getKubernetesUsage;
|
|
13
32
|
/**
|
|
14
33
|
* Read through the customer's own role every few hours. A cluster LevelFour could not match to an EKS cluster in a connected account, or whose role refused a read, says why in state and reason.
|
|
15
34
|
*
|
|
@@ -10,6 +10,25 @@ export declare namespace KubernetesClient {
|
|
|
10
10
|
export declare class KubernetesClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<KubernetesClient.Options>;
|
|
12
12
|
constructor(options: KubernetesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Answers every organization, with or without the Kubernetes module, so the dashboard can show the module to those who run Kubernetes. In use means a bill carries EKS, GKE or AKS spend in the last 30 days, or an agent cluster reported. Each cloud's cost is the bill's own: its Kubernetes service line plus the nodes the bill ties to a cluster, partial when some could not be tied. Its clusters are the agent clusters plus those GET /v1/k8s/unmonitored-clusters lists for it. It only reads: it never turns the module on.
|
|
15
|
+
*
|
|
16
|
+
* @param {KubernetesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
|
+
*
|
|
18
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
19
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
20
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
21
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
22
|
+
* @throws {@link LevelFour.ConflictError}
|
|
23
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
24
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
25
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.kubernetes.getKubernetesUsage()
|
|
29
|
+
*/
|
|
30
|
+
getKubernetesUsage(requestOptions?: KubernetesClient.RequestOptions): core.HttpResponsePromise<LevelFour.KubernetesUsageResponse>;
|
|
31
|
+
private __getKubernetesUsage;
|
|
13
32
|
/**
|
|
14
33
|
* Read through the customer's own role every few hours. A cluster LevelFour could not match to an EKS cluster in a connected account, or whose role refused a read, says why in state and reason.
|
|
15
34
|
*
|
|
@@ -42,6 +42,102 @@ class KubernetesClient {
|
|
|
42
42
|
constructor(options) {
|
|
43
43
|
this._options = (0, import_BaseClient.normalizeClientOptionsWithAuth)(options);
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Answers every organization, with or without the Kubernetes module, so the dashboard can show the module to those who run Kubernetes. In use means a bill carries EKS, GKE or AKS spend in the last 30 days, or an agent cluster reported. Each cloud's cost is the bill's own: its Kubernetes service line plus the nodes the bill ties to a cluster, partial when some could not be tied. Its clusters are the agent clusters plus those GET /v1/k8s/unmonitored-clusters lists for it. It only reads: it never turns the module on.
|
|
47
|
+
*
|
|
48
|
+
* @param {KubernetesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
|
+
*
|
|
50
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
51
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
52
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
53
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
54
|
+
* @throws {@link LevelFour.ConflictError}
|
|
55
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
56
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
57
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.kubernetes.getKubernetesUsage()
|
|
61
|
+
*/
|
|
62
|
+
getKubernetesUsage(requestOptions) {
|
|
63
|
+
return core.HttpResponsePromise.fromPromise(this.__getKubernetesUsage(requestOptions));
|
|
64
|
+
}
|
|
65
|
+
async __getKubernetesUsage(requestOptions) {
|
|
66
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
67
|
+
const _headers = (0, import_headers.mergeHeaders)(
|
|
68
|
+
_authRequest.headers,
|
|
69
|
+
this._options?.headers,
|
|
70
|
+
requestOptions?.headers
|
|
71
|
+
);
|
|
72
|
+
const _response = await core.fetcher({
|
|
73
|
+
url: core.url.join(
|
|
74
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
75
|
+
"api/v1/k8s/usage"
|
|
76
|
+
),
|
|
77
|
+
method: "GET",
|
|
78
|
+
headers: _headers,
|
|
79
|
+
queryParameters: requestOptions?.queryParams,
|
|
80
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
81
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
82
|
+
abortSignal: requestOptions?.abortSignal,
|
|
83
|
+
fetchFn: this._options?.fetch,
|
|
84
|
+
logging: this._options.logging
|
|
85
|
+
});
|
|
86
|
+
if (_response.ok) {
|
|
87
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
88
|
+
}
|
|
89
|
+
if (_response.error.reason === "status-code") {
|
|
90
|
+
switch (_response.error.statusCode) {
|
|
91
|
+
case 400:
|
|
92
|
+
throw new LevelFour.BadRequestError(
|
|
93
|
+
_response.error.body,
|
|
94
|
+
_response.rawResponse
|
|
95
|
+
);
|
|
96
|
+
case 401:
|
|
97
|
+
throw new LevelFour.UnauthorizedError(
|
|
98
|
+
_response.error.body,
|
|
99
|
+
_response.rawResponse
|
|
100
|
+
);
|
|
101
|
+
case 403:
|
|
102
|
+
throw new LevelFour.ForbiddenError(
|
|
103
|
+
_response.error.body,
|
|
104
|
+
_response.rawResponse
|
|
105
|
+
);
|
|
106
|
+
case 404:
|
|
107
|
+
throw new LevelFour.NotFoundError(
|
|
108
|
+
_response.error.body,
|
|
109
|
+
_response.rawResponse
|
|
110
|
+
);
|
|
111
|
+
case 409:
|
|
112
|
+
throw new LevelFour.ConflictError(
|
|
113
|
+
_response.error.body,
|
|
114
|
+
_response.rawResponse
|
|
115
|
+
);
|
|
116
|
+
case 422:
|
|
117
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
118
|
+
_response.error.body,
|
|
119
|
+
_response.rawResponse
|
|
120
|
+
);
|
|
121
|
+
case 429:
|
|
122
|
+
throw new LevelFour.TooManyRequestsError(
|
|
123
|
+
_response.error.body,
|
|
124
|
+
_response.rawResponse
|
|
125
|
+
);
|
|
126
|
+
case 500:
|
|
127
|
+
throw new LevelFour.InternalServerError(
|
|
128
|
+
_response.error.body,
|
|
129
|
+
_response.rawResponse
|
|
130
|
+
);
|
|
131
|
+
default:
|
|
132
|
+
throw new errors.LevelFourError({
|
|
133
|
+
statusCode: _response.error.statusCode,
|
|
134
|
+
body: _response.error.body,
|
|
135
|
+
rawResponse: _response.rawResponse
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return (0, import_handleNonStatusCodeError.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/k8s/usage");
|
|
140
|
+
}
|
|
45
141
|
/**
|
|
46
142
|
* Read through the customer's own role every few hours. A cluster LevelFour could not match to an EKS cluster in a connected account, or whose role refused a read, says why in state and reason.
|
|
47
143
|
*
|
|
@@ -9,6 +9,102 @@ class KubernetesClient {
|
|
|
9
9
|
constructor(options) {
|
|
10
10
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Answers every organization, with or without the Kubernetes module, so the dashboard can show the module to those who run Kubernetes. In use means a bill carries EKS, GKE or AKS spend in the last 30 days, or an agent cluster reported. Each cloud's cost is the bill's own: its Kubernetes service line plus the nodes the bill ties to a cluster, partial when some could not be tied. Its clusters are the agent clusters plus those GET /v1/k8s/unmonitored-clusters lists for it. It only reads: it never turns the module on.
|
|
14
|
+
*
|
|
15
|
+
* @param {KubernetesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
|
+
*
|
|
17
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
18
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
19
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
20
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
21
|
+
* @throws {@link LevelFour.ConflictError}
|
|
22
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
23
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
24
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* await client.kubernetes.getKubernetesUsage()
|
|
28
|
+
*/
|
|
29
|
+
getKubernetesUsage(requestOptions) {
|
|
30
|
+
return core.HttpResponsePromise.fromPromise(this.__getKubernetesUsage(requestOptions));
|
|
31
|
+
}
|
|
32
|
+
async __getKubernetesUsage(requestOptions) {
|
|
33
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
34
|
+
const _headers = mergeHeaders(
|
|
35
|
+
_authRequest.headers,
|
|
36
|
+
this._options?.headers,
|
|
37
|
+
requestOptions?.headers
|
|
38
|
+
);
|
|
39
|
+
const _response = await core.fetcher({
|
|
40
|
+
url: core.url.join(
|
|
41
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
42
|
+
"api/v1/k8s/usage"
|
|
43
|
+
),
|
|
44
|
+
method: "GET",
|
|
45
|
+
headers: _headers,
|
|
46
|
+
queryParameters: requestOptions?.queryParams,
|
|
47
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
48
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
49
|
+
abortSignal: requestOptions?.abortSignal,
|
|
50
|
+
fetchFn: this._options?.fetch,
|
|
51
|
+
logging: this._options.logging
|
|
52
|
+
});
|
|
53
|
+
if (_response.ok) {
|
|
54
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
55
|
+
}
|
|
56
|
+
if (_response.error.reason === "status-code") {
|
|
57
|
+
switch (_response.error.statusCode) {
|
|
58
|
+
case 400:
|
|
59
|
+
throw new LevelFour.BadRequestError(
|
|
60
|
+
_response.error.body,
|
|
61
|
+
_response.rawResponse
|
|
62
|
+
);
|
|
63
|
+
case 401:
|
|
64
|
+
throw new LevelFour.UnauthorizedError(
|
|
65
|
+
_response.error.body,
|
|
66
|
+
_response.rawResponse
|
|
67
|
+
);
|
|
68
|
+
case 403:
|
|
69
|
+
throw new LevelFour.ForbiddenError(
|
|
70
|
+
_response.error.body,
|
|
71
|
+
_response.rawResponse
|
|
72
|
+
);
|
|
73
|
+
case 404:
|
|
74
|
+
throw new LevelFour.NotFoundError(
|
|
75
|
+
_response.error.body,
|
|
76
|
+
_response.rawResponse
|
|
77
|
+
);
|
|
78
|
+
case 409:
|
|
79
|
+
throw new LevelFour.ConflictError(
|
|
80
|
+
_response.error.body,
|
|
81
|
+
_response.rawResponse
|
|
82
|
+
);
|
|
83
|
+
case 422:
|
|
84
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
85
|
+
_response.error.body,
|
|
86
|
+
_response.rawResponse
|
|
87
|
+
);
|
|
88
|
+
case 429:
|
|
89
|
+
throw new LevelFour.TooManyRequestsError(
|
|
90
|
+
_response.error.body,
|
|
91
|
+
_response.rawResponse
|
|
92
|
+
);
|
|
93
|
+
case 500:
|
|
94
|
+
throw new LevelFour.InternalServerError(
|
|
95
|
+
_response.error.body,
|
|
96
|
+
_response.rawResponse
|
|
97
|
+
);
|
|
98
|
+
default:
|
|
99
|
+
throw new errors.LevelFourError({
|
|
100
|
+
statusCode: _response.error.statusCode,
|
|
101
|
+
body: _response.error.body,
|
|
102
|
+
rawResponse: _response.rawResponse
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/v1/k8s/usage");
|
|
107
|
+
}
|
|
12
108
|
/**
|
|
13
109
|
* Read through the customer's own role every few hours. A cluster LevelFour could not match to an EKS cluster in a connected account, or whose role refused a read, says why in state and reason.
|
|
14
110
|
*
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type * as LevelFour from "../index.mjs";
|
|
2
2
|
export interface AutomationEvent {
|
|
3
3
|
event_id: string;
|
|
4
|
-
/** What the component reported (revert_finished, with no pod, ends a revert with detail.outcome and its pod counts), what a person changed, or what LevelFour recorded on its own: in_place_ceiling_reached each time a rightsizing walk gets to the most the component sets in place for a request, twice the template's value, while its target is higher, with detail.resource, detail.reached, detail.wanted (the values the workload's spec needs) and detail.recommendation_id, the newest open pull request recommendation for the container, which changes its spec, read with the page, null with none */
|
|
4
|
+
/** What the component reported (revert_finished, with no pod, ends a revert with detail.outcome and its pod counts), what a person changed, or what LevelFour recorded on its own: in_place_ceiling_reached each time a rightsizing walk gets to the most the component sets in place for a request, twice the template's value, while its target is higher, with detail.resource, detail.reached, detail.wanted (the values the workload's spec needs) and detail.recommendation_id, the newest open pull request recommendation for the container, which changes its spec, read with the page, null with none; and hard_limit_exceeded each time a walk would take a step that leaves a request or a limit above the install's hard limits, which the component refuses, with the same fields and detail.hard_limit */
|
|
5
5
|
type: string;
|
|
6
6
|
/** raise or cut for a step's events by the way it moves the request, rollback for a rollback or revert, settings for what a person changed, other for the rest */
|
|
7
7
|
category: AutomationEvent.Category;
|
|
8
8
|
occurred_at: string;
|
|
9
|
-
/** A person's email, levelfour-automation for the component, levelfour for what LevelFour decided on its own (a refusal, the in-place ceiling), or levelfour-takeover (automatic) for a takeover's freeze, whose detail names the admin who marked it */
|
|
9
|
+
/** A person's email, levelfour-automation for the component, levelfour for what LevelFour decided on its own (a refusal, the in-place ceiling, the hard limit), or levelfour-takeover (automatic) for a takeover's freeze, whose detail names the admin who marked it */
|
|
10
10
|
actor?: (string | null) | undefined;
|
|
11
11
|
namespace?: (string | null) | undefined;
|
|
12
12
|
workload_kind?: (string | null) | undefined;
|
|
@@ -19,7 +19,7 @@ export interface AutomationEvent {
|
|
|
19
19
|
before?: (LevelFour.ContainerResources | null) | undefined;
|
|
20
20
|
/** The values this event left the container on, or would have, on the same reading as before */
|
|
21
21
|
after?: (LevelFour.ContainerResources | null) | undefined;
|
|
22
|
-
/** Why: oom_kills, cpu_throttling or rightsizing_step for a change, the refusal reason for one LevelFour refused, revert for a revert, still_out_of_memory once a raise did not end the OOM kills, the rollback's trigger, in_place_ceiling for a raise the in-place ceiling stopped, or the component's own reason for what it held back or skipped */
|
|
22
|
+
/** Why: oom_kills, cpu_throttling or rightsizing_step for a change, the refusal reason for one LevelFour refused, revert for a revert, still_out_of_memory once a raise did not end the OOM kills, the rollback's trigger, in_place_ceiling for a raise the in-place ceiling stopped, hard_limit for a step the install's hard limits stopped, or the component's own reason for what it held back or skipped */
|
|
23
23
|
reason?: (string | null) | undefined;
|
|
24
24
|
}
|
|
25
25
|
export declare namespace AutomationEvent {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type * as LevelFour from "../index.js";
|
|
2
2
|
export interface AutomationEvent {
|
|
3
3
|
event_id: string;
|
|
4
|
-
/** What the component reported (revert_finished, with no pod, ends a revert with detail.outcome and its pod counts), what a person changed, or what LevelFour recorded on its own: in_place_ceiling_reached each time a rightsizing walk gets to the most the component sets in place for a request, twice the template's value, while its target is higher, with detail.resource, detail.reached, detail.wanted (the values the workload's spec needs) and detail.recommendation_id, the newest open pull request recommendation for the container, which changes its spec, read with the page, null with none */
|
|
4
|
+
/** What the component reported (revert_finished, with no pod, ends a revert with detail.outcome and its pod counts), what a person changed, or what LevelFour recorded on its own: in_place_ceiling_reached each time a rightsizing walk gets to the most the component sets in place for a request, twice the template's value, while its target is higher, with detail.resource, detail.reached, detail.wanted (the values the workload's spec needs) and detail.recommendation_id, the newest open pull request recommendation for the container, which changes its spec, read with the page, null with none; and hard_limit_exceeded each time a walk would take a step that leaves a request or a limit above the install's hard limits, which the component refuses, with the same fields and detail.hard_limit */
|
|
5
5
|
type: string;
|
|
6
6
|
/** raise or cut for a step's events by the way it moves the request, rollback for a rollback or revert, settings for what a person changed, other for the rest */
|
|
7
7
|
category: AutomationEvent.Category;
|
|
8
8
|
occurred_at: string;
|
|
9
|
-
/** A person's email, levelfour-automation for the component, levelfour for what LevelFour decided on its own (a refusal, the in-place ceiling), or levelfour-takeover (automatic) for a takeover's freeze, whose detail names the admin who marked it */
|
|
9
|
+
/** A person's email, levelfour-automation for the component, levelfour for what LevelFour decided on its own (a refusal, the in-place ceiling, the hard limit), or levelfour-takeover (automatic) for a takeover's freeze, whose detail names the admin who marked it */
|
|
10
10
|
actor?: (string | null) | undefined;
|
|
11
11
|
namespace?: (string | null) | undefined;
|
|
12
12
|
workload_kind?: (string | null) | undefined;
|
|
@@ -19,7 +19,7 @@ export interface AutomationEvent {
|
|
|
19
19
|
before?: (LevelFour.ContainerResources | null) | undefined;
|
|
20
20
|
/** The values this event left the container on, or would have, on the same reading as before */
|
|
21
21
|
after?: (LevelFour.ContainerResources | null) | undefined;
|
|
22
|
-
/** Why: oom_kills, cpu_throttling or rightsizing_step for a change, the refusal reason for one LevelFour refused, revert for a revert, still_out_of_memory once a raise did not end the OOM kills, the rollback's trigger, in_place_ceiling for a raise the in-place ceiling stopped, or the component's own reason for what it held back or skipped */
|
|
22
|
+
/** Why: oom_kills, cpu_throttling or rightsizing_step for a change, the refusal reason for one LevelFour refused, revert for a revert, still_out_of_memory once a raise did not end the OOM kills, the rollback's trigger, in_place_ceiling for a raise the in-place ceiling stopped, hard_limit for a step the install's hard limits stopped, or the component's own reason for what it held back or skipped */
|
|
23
23
|
reason?: (string | null) | undefined;
|
|
24
24
|
}
|
|
25
25
|
export declare namespace AutomationEvent {
|
|
@@ -40,6 +40,8 @@ export interface InvoiceDetail {
|
|
|
40
40
|
column_mapping: Record<string, string>;
|
|
41
41
|
/** Printed columns no field was read from */
|
|
42
42
|
unmapped_columns: string[];
|
|
43
|
+
/** Lines that are not tax, the ones `lines_total` adds up; `line_count` counts every line */
|
|
44
|
+
charge_line_count: number;
|
|
43
45
|
lines: LevelFour.InvoiceLine[];
|
|
44
46
|
}
|
|
45
47
|
export declare namespace InvoiceDetail {
|
|
@@ -40,6 +40,8 @@ export interface InvoiceDetail {
|
|
|
40
40
|
column_mapping: Record<string, string>;
|
|
41
41
|
/** Printed columns no field was read from */
|
|
42
42
|
unmapped_columns: string[];
|
|
43
|
+
/** Lines that are not tax, the ones `lines_total` adds up; `line_count` counts every line */
|
|
44
|
+
charge_line_count: number;
|
|
43
45
|
lines: LevelFour.InvoiceLine[];
|
|
44
46
|
}
|
|
45
47
|
export declare namespace InvoiceDetail {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as LevelFour from "../index.mjs";
|
|
2
|
+
export interface InvoiceLinesPage {
|
|
3
|
+
/** The lines after `after_line`, in printed order */
|
|
4
|
+
lines: LevelFour.InvoiceLine[];
|
|
5
|
+
/** The `after_line` that reads the next page, or null when this page holds the last line */
|
|
6
|
+
next_after_line: number | null;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as LevelFour from "../index.js";
|
|
2
|
+
export interface InvoiceLinesPage {
|
|
3
|
+
/** The lines after `after_line`, in printed order */
|
|
4
|
+
lines: LevelFour.InvoiceLine[];
|
|
5
|
+
/** The `after_line` that reads the next page, or null when this page holds the last line */
|
|
6
|
+
next_after_line: number | null;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var InvoiceLinesPage_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(InvoiceLinesPage_exports);
|
|
17
|
+
//# sourceMappingURL=InvoiceLinesPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=InvoiceLinesPage.mjs.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var InvoiceLinesResponse_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(InvoiceLinesResponse_exports);
|
|
17
|
+
//# sourceMappingURL=InvoiceLinesResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=InvoiceLinesResponse.mjs.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as LevelFour from "../index.mjs";
|
|
2
|
+
export interface KubernetesUsage {
|
|
3
|
+
/** True when a bill carries EKS, GKE or AKS spend in the last 30 days, or an agent cluster reported */
|
|
4
|
+
in_use: boolean;
|
|
5
|
+
/** The first day a bill carried Kubernetes spend or a cluster was seen; null if never */
|
|
6
|
+
first_seen_at: string | null;
|
|
7
|
+
/** One per cloud, then agent; empty when not in use */
|
|
8
|
+
sources: LevelFour.KubernetesUsageSource[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as LevelFour from "../index.js";
|
|
2
|
+
export interface KubernetesUsage {
|
|
3
|
+
/** True when a bill carries EKS, GKE or AKS spend in the last 30 days, or an agent cluster reported */
|
|
4
|
+
in_use: boolean;
|
|
5
|
+
/** The first day a bill carried Kubernetes spend or a cluster was seen; null if never */
|
|
6
|
+
first_seen_at: string | null;
|
|
7
|
+
/** One per cloud, then agent; empty when not in use */
|
|
8
|
+
sources: LevelFour.KubernetesUsageSource[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var KubernetesUsage_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(KubernetesUsage_exports);
|
|
17
|
+
//# sourceMappingURL=KubernetesUsage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=KubernetesUsage.mjs.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var KubernetesUsageResponse_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(KubernetesUsageResponse_exports);
|
|
17
|
+
//# sourceMappingURL=KubernetesUsageResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=KubernetesUsageResponse.mjs.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface KubernetesUsageSource {
|
|
2
|
+
/** eks, gke or aks from that cloud's bill and clusters, agent for the clusters a LevelFour agent reports */
|
|
3
|
+
kind: KubernetesUsageSource.Kind;
|
|
4
|
+
/** USD over the last 30 days from the bill: the cloud's Kubernetes service line plus the nodes the bill ties to a cluster; null for agent, or when the bill has no line for the cloud */
|
|
5
|
+
monthly_cost: number | null;
|
|
6
|
+
/** The Kubernetes service line alone (EKS and GKE control planes, AKS paid tiers); null for agent */
|
|
7
|
+
control_plane_cost: number | null;
|
|
8
|
+
/** The nodes the bill ties to a cluster: priced from the bill through an agent or a cost split, and on AWS the EC2 lines tagged aws:eks:cluster-name where that tag is activated; null for agent */
|
|
9
|
+
nodes_cost: number | null;
|
|
10
|
+
/** complete when every cluster of the cloud had its nodes on every day of the 30; partial when some were not tied to a cluster, so monthly_cost is a floor; null for agent */
|
|
11
|
+
cost_scope: KubernetesUsageSource.CostScope | null;
|
|
12
|
+
/** The cloud's agent clusters plus those GET /v1/k8s/unmonitored-clusters lists for it, or the reporting agent clusters for agent; null when unknown (AKS for now) */
|
|
13
|
+
clusters: number | null;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace KubernetesUsageSource {
|
|
16
|
+
/** eks, gke or aks from that cloud's bill and clusters, agent for the clusters a LevelFour agent reports */
|
|
17
|
+
const Kind: {
|
|
18
|
+
readonly Eks: "eks";
|
|
19
|
+
readonly Gke: "gke";
|
|
20
|
+
readonly Aks: "aks";
|
|
21
|
+
readonly Agent: "agent";
|
|
22
|
+
};
|
|
23
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
24
|
+
const CostScope: {
|
|
25
|
+
readonly Complete: "complete";
|
|
26
|
+
readonly Partial: "partial";
|
|
27
|
+
};
|
|
28
|
+
type CostScope = (typeof CostScope)[keyof typeof CostScope];
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface KubernetesUsageSource {
|
|
2
|
+
/** eks, gke or aks from that cloud's bill and clusters, agent for the clusters a LevelFour agent reports */
|
|
3
|
+
kind: KubernetesUsageSource.Kind;
|
|
4
|
+
/** USD over the last 30 days from the bill: the cloud's Kubernetes service line plus the nodes the bill ties to a cluster; null for agent, or when the bill has no line for the cloud */
|
|
5
|
+
monthly_cost: number | null;
|
|
6
|
+
/** The Kubernetes service line alone (EKS and GKE control planes, AKS paid tiers); null for agent */
|
|
7
|
+
control_plane_cost: number | null;
|
|
8
|
+
/** The nodes the bill ties to a cluster: priced from the bill through an agent or a cost split, and on AWS the EC2 lines tagged aws:eks:cluster-name where that tag is activated; null for agent */
|
|
9
|
+
nodes_cost: number | null;
|
|
10
|
+
/** complete when every cluster of the cloud had its nodes on every day of the 30; partial when some were not tied to a cluster, so monthly_cost is a floor; null for agent */
|
|
11
|
+
cost_scope: KubernetesUsageSource.CostScope | null;
|
|
12
|
+
/** The cloud's agent clusters plus those GET /v1/k8s/unmonitored-clusters lists for it, or the reporting agent clusters for agent; null when unknown (AKS for now) */
|
|
13
|
+
clusters: number | null;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace KubernetesUsageSource {
|
|
16
|
+
/** eks, gke or aks from that cloud's bill and clusters, agent for the clusters a LevelFour agent reports */
|
|
17
|
+
const Kind: {
|
|
18
|
+
readonly Eks: "eks";
|
|
19
|
+
readonly Gke: "gke";
|
|
20
|
+
readonly Aks: "aks";
|
|
21
|
+
readonly Agent: "agent";
|
|
22
|
+
};
|
|
23
|
+
type Kind = (typeof Kind)[keyof typeof Kind];
|
|
24
|
+
const CostScope: {
|
|
25
|
+
readonly Complete: "complete";
|
|
26
|
+
readonly Partial: "partial";
|
|
27
|
+
};
|
|
28
|
+
type CostScope = (typeof CostScope)[keyof typeof CostScope];
|
|
29
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var KubernetesUsageSource_exports = {};
|
|
20
|
+
__export(KubernetesUsageSource_exports, {
|
|
21
|
+
KubernetesUsageSource: () => KubernetesUsageSource
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(KubernetesUsageSource_exports);
|
|
24
|
+
var KubernetesUsageSource;
|
|
25
|
+
((KubernetesUsageSource2) => {
|
|
26
|
+
KubernetesUsageSource2.Kind = {
|
|
27
|
+
Eks: "eks",
|
|
28
|
+
Gke: "gke",
|
|
29
|
+
Aks: "aks",
|
|
30
|
+
Agent: "agent"
|
|
31
|
+
};
|
|
32
|
+
KubernetesUsageSource2.CostScope = {
|
|
33
|
+
Complete: "complete",
|
|
34
|
+
Partial: "partial"
|
|
35
|
+
};
|
|
36
|
+
})(KubernetesUsageSource || (KubernetesUsageSource = {}));
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
KubernetesUsageSource
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=KubernetesUsageSource.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var KubernetesUsageSource;
|
|
2
|
+
((KubernetesUsageSource2) => {
|
|
3
|
+
KubernetesUsageSource2.Kind = {
|
|
4
|
+
Eks: "eks",
|
|
5
|
+
Gke: "gke",
|
|
6
|
+
Aks: "aks",
|
|
7
|
+
Agent: "agent"
|
|
8
|
+
};
|
|
9
|
+
KubernetesUsageSource2.CostScope = {
|
|
10
|
+
Complete: "complete",
|
|
11
|
+
Partial: "partial"
|
|
12
|
+
};
|
|
13
|
+
})(KubernetesUsageSource || (KubernetesUsageSource = {}));
|
|
14
|
+
export {
|
|
15
|
+
KubernetesUsageSource
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=KubernetesUsageSource.mjs.map
|
|
@@ -8,6 +8,8 @@ export interface NodeHealthDay {
|
|
|
8
8
|
pid_pressure_hours: number;
|
|
9
9
|
/** Pods evicted from the node */
|
|
10
10
|
evictions: number;
|
|
11
|
+
/** At most the pods moved off a node that a Spot interruption, an instance event or a Karpenter disruption (consolidation, drift, expiry) removed. They leave through the Eviction API, so evictions does not count them. Per removal, each workload counts the most of its pods that ran on the node at once in the hour the removal began, a pod that left the node earlier in that hour included. DaemonSet and static pods go with their node and are not counted, nor is a removal that began while the agent was not watching. A day is measured from agent 0.6.2 on, when every watched hour a removal's pods are read from carries the pods' peaks. Here the removals of the instance the drawer shows, those that began while it held the name, each counted on the day it began. Null on a day its cluster did not measure, and on a day before the removal events kept are whole: ingest keeps them 90 days, and a day's count also reads the day before it */
|
|
12
|
+
drained_pods: number | null;
|
|
11
13
|
pids_running_max?: (number | null) | undefined;
|
|
12
14
|
pid_limit?: (number | null) | undefined;
|
|
13
15
|
}
|
|
@@ -8,6 +8,8 @@ export interface NodeHealthDay {
|
|
|
8
8
|
pid_pressure_hours: number;
|
|
9
9
|
/** Pods evicted from the node */
|
|
10
10
|
evictions: number;
|
|
11
|
+
/** At most the pods moved off a node that a Spot interruption, an instance event or a Karpenter disruption (consolidation, drift, expiry) removed. They leave through the Eviction API, so evictions does not count them. Per removal, each workload counts the most of its pods that ran on the node at once in the hour the removal began, a pod that left the node earlier in that hour included. DaemonSet and static pods go with their node and are not counted, nor is a removal that began while the agent was not watching. A day is measured from agent 0.6.2 on, when every watched hour a removal's pods are read from carries the pods' peaks. Here the removals of the instance the drawer shows, those that began while it held the name, each counted on the day it began. Null on a day its cluster did not measure, and on a day before the removal events kept are whole: ingest keeps them 90 days, and a day's count also reads the day before it */
|
|
12
|
+
drained_pods: number | null;
|
|
11
13
|
pids_running_max?: (number | null) | undefined;
|
|
12
14
|
pid_limit?: (number | null) | undefined;
|
|
13
15
|
}
|