@backstage/plugin-kubernetes-common 0.9.12 → 0.9.13-next.1
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/CHANGELOG.md +13 -0
- package/dist/index.d.ts +50 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @backstage/plugin-kubernetes-common
|
|
2
2
|
|
|
3
|
+
## 0.9.13-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/plugin-permission-common@0.9.11-next.0
|
|
9
|
+
|
|
10
|
+
## 0.9.13-next.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- d9a57de: Add `KubernetesWatcher` interface for streaming Kubernetes resource changes via an async iterator. The watcher is separated from `KubernetesFetcher` because watching is a long-lived streaming connection that only works with server-side auth providers. Watch supports all event types (ADDED, MODIFIED, DELETED, BOOKMARK, ERROR) with errors yielded as data rather than thrown.
|
|
15
|
+
|
|
3
16
|
## 0.9.12
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -237,6 +237,55 @@ interface GroupedResponses extends DeploymentResources {
|
|
|
237
237
|
persistentVolumes: V1PersistentVolume[];
|
|
238
238
|
persistentVolumeClaims: V1PersistentVolumeClaim[];
|
|
239
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* Kubernetes watch event types from the API
|
|
242
|
+
* @public
|
|
243
|
+
*/
|
|
244
|
+
type KubernetesWatchEventType = 'ADDED' | 'MODIFIED' | 'DELETED' | 'BOOKMARK' | 'ERROR';
|
|
245
|
+
/**
|
|
246
|
+
* Watch event emitted by the Kubernetes watch stream
|
|
247
|
+
* @public
|
|
248
|
+
*/
|
|
249
|
+
type KubernetesWatchEvent = {
|
|
250
|
+
type: Exclude<KubernetesWatchEventType, 'ERROR'>;
|
|
251
|
+
object: JsonObject;
|
|
252
|
+
resourceVersion?: string;
|
|
253
|
+
} | {
|
|
254
|
+
type: 'ERROR';
|
|
255
|
+
error: KubernetesFetchError;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Options for watching Kubernetes resources
|
|
259
|
+
* @public
|
|
260
|
+
*/
|
|
261
|
+
interface KubernetesWatchOptions {
|
|
262
|
+
/** Namespace to watch resources in (optional for cluster-scoped resources) */
|
|
263
|
+
namespace?: string;
|
|
264
|
+
/** Label selector to filter resources */
|
|
265
|
+
labelSelector?: string;
|
|
266
|
+
/** Resource version to start watching from */
|
|
267
|
+
resourceVersion?: string;
|
|
268
|
+
/** Timeout in seconds for the watch operation */
|
|
269
|
+
timeoutSeconds?: number;
|
|
270
|
+
/** Allow watch bookmarks (for efficient resource version tracking) */
|
|
271
|
+
allowWatchBookmarks?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* When true, the watch stream begins with synthetic events that reproduce
|
|
274
|
+
* the current state of the collection, followed by a bookmark with the
|
|
275
|
+
* annotation `k8s.io/initial-events-end`. Requires `allowWatchBookmarks`
|
|
276
|
+
* and `resourceVersionMatch` set to `'NotOlderThan'`.
|
|
277
|
+
* See KEP-3157 (watch-list). Supported in Kubernetes 1.32+ (Beta).
|
|
278
|
+
*/
|
|
279
|
+
sendInitialEvents?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* How the resourceVersion constraint is applied. Set to `'NotOlderThan'`
|
|
282
|
+
* when using `sendInitialEvents` so the server can serve from its watch
|
|
283
|
+
* cache rather than quorum-reading etcd.
|
|
284
|
+
*/
|
|
285
|
+
resourceVersionMatch?: 'NotOlderThan' | 'Exact';
|
|
286
|
+
/** AbortSignal to cancel the watch from outside the iteration loop */
|
|
287
|
+
signal?: AbortSignal;
|
|
288
|
+
}
|
|
240
289
|
|
|
241
290
|
/**
|
|
242
291
|
* The annotation key used to identify Kubernetes resources in Backstage.
|
|
@@ -432,4 +481,4 @@ declare const detectErrors: (objects: ObjectsByEntityResponse$1) => DetectedErro
|
|
|
432
481
|
declare const groupResponses: (fetchResponse: FetchResponse$1[]) => GroupedResponses;
|
|
433
482
|
|
|
434
483
|
export { ANNOTATION_KUBERNETES_API_SERVER, ANNOTATION_KUBERNETES_API_SERVER_CA, ANNOTATION_KUBERNETES_AUTH_PROVIDER, ANNOTATION_KUBERNETES_AWS_ASSUME_ROLE, ANNOTATION_KUBERNETES_AWS_CLUSTER_ID, ANNOTATION_KUBERNETES_AWS_EXTERNAL_ID, ANNOTATION_KUBERNETES_DASHBOARD_APP, ANNOTATION_KUBERNETES_DASHBOARD_PARAMETERS, ANNOTATION_KUBERNETES_DASHBOARD_URL, ANNOTATION_KUBERNETES_OIDC_TOKEN_PROVIDER, ANNOTATION_KUBERNETES_SKIP_METRICS_LOOKUP, ANNOTATION_KUBERNETES_SKIP_TLS_VERIFY, KUBERNETES_ANNOTATION, KUBERNETES_LABEL_SELECTOR_QUERY_ANNOTATION, SERVICEACCOUNT_CA_PATH, detectErrors, groupResponses, kubernetesClustersReadPermission, kubernetesPermissions, kubernetesProxyPermission, kubernetesResourcesReadPermission };
|
|
435
|
-
export type { AuthProviderType, ClientContainerStatus, ClientCurrentResourceUsage, ClientPodStatus, ClusterAttributes, ClusterObjects, ConfigMapFetchResponse, CronJobsFetchResponse, CustomObjectsByEntityRequest, CustomResourceFetchResponse, CustomResourceMatcher, DaemonSetsFetchResponse, DeploymentFetchResponse, DeploymentResources, DetectedError, DetectedErrorsByCluster, DocsSolution, ErrorMapper, ErrorSeverity, EventsSolution, FetchResponse, GroupedResponses, HorizontalPodAutoscalersFetchResponse, IngressesFetchResponse, JobsFetchResponse, KubernetesErrorTypes, KubernetesFetchError, KubernetesRequestAuth, KubernetesRequestBody, LimitRangeFetchResponse, LogSolution, ObjectsByEntityResponse, PersistentVolumeClaimsFetchResponse, PersistentVolumeFetchResponse, PodFetchResponse, PodStatusFetchResponse, ProposedFix, ProposedFixBase, RawFetchError, ReplicaSetsFetchResponse, ResourceQuotaFetchResponse, ResourceRef, SecretFetchResponse, SecretsFetchResponse, ServiceFetchResponse, StatefulSetsFetchResponse, StatusError, WorkloadsByEntityRequest };
|
|
484
|
+
export type { AuthProviderType, ClientContainerStatus, ClientCurrentResourceUsage, ClientPodStatus, ClusterAttributes, ClusterObjects, ConfigMapFetchResponse, CronJobsFetchResponse, CustomObjectsByEntityRequest, CustomResourceFetchResponse, CustomResourceMatcher, DaemonSetsFetchResponse, DeploymentFetchResponse, DeploymentResources, DetectedError, DetectedErrorsByCluster, DocsSolution, ErrorMapper, ErrorSeverity, EventsSolution, FetchResponse, GroupedResponses, HorizontalPodAutoscalersFetchResponse, IngressesFetchResponse, JobsFetchResponse, KubernetesErrorTypes, KubernetesFetchError, KubernetesRequestAuth, KubernetesRequestBody, KubernetesWatchEvent, KubernetesWatchEventType, KubernetesWatchOptions, LimitRangeFetchResponse, LogSolution, ObjectsByEntityResponse, PersistentVolumeClaimsFetchResponse, PersistentVolumeFetchResponse, PodFetchResponse, PodStatusFetchResponse, ProposedFix, ProposedFixBase, RawFetchError, ReplicaSetsFetchResponse, ResourceQuotaFetchResponse, ResourceRef, SecretFetchResponse, SecretsFetchResponse, ServiceFetchResponse, StatefulSetsFetchResponse, StatusError, WorkloadsByEntityRequest };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-kubernetes-common",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.13-next.1",
|
|
4
4
|
"description": "Common functionalities for kubernetes, to be shared between kubernetes and kubernetes-backend plugin",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "common-library",
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@backstage/catalog-model": "
|
|
56
|
-
"@backstage/plugin-permission-common": "
|
|
57
|
-
"@backstage/types": "
|
|
55
|
+
"@backstage/catalog-model": "1.10.0",
|
|
56
|
+
"@backstage/plugin-permission-common": "0.9.11-next.0",
|
|
57
|
+
"@backstage/types": "1.2.2",
|
|
58
58
|
"@kubernetes/client-node": "1.4.0",
|
|
59
59
|
"kubernetes-models": "^4.3.1",
|
|
60
60
|
"lodash": "^4.17.21",
|
|
61
61
|
"luxon": "^3.0.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@backstage/cli": "
|
|
64
|
+
"@backstage/cli": "0.36.6-next.1"
|
|
65
65
|
},
|
|
66
66
|
"typesVersions": {
|
|
67
67
|
"*": {
|