Add DaemonSets as Default Objects

Signed-off-by: Salomon Moreno <msalomon@vmware.com>
This commit is contained in:
Salomon Moreno
2022-08-09 10:03:55 -05:00
parent 9e20c7afc4
commit 0297da83c0
6 changed files with 37 additions and 4 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-kubernetes-backend': patch
'@backstage/plugin-kubernetes-common': patch
---
Added `DaemonSets` to the default kubernetes resources.
+2 -1
View File
@@ -227,7 +227,8 @@ export type KubernetesObjectTypes =
| 'cronjobs'
| 'ingresses'
| 'customresources'
| 'statefulsets';
| 'statefulsets'
| 'daemonsets';
// @alpha
export interface KubernetesServiceLocator {
@@ -118,6 +118,12 @@ export const DEFAULT_OBJECTS: ObjectToFetch[] = [
plural: 'statefulsets',
objectType: 'statefulsets',
},
{
group: 'apps',
apiVersion: 'v1',
plural: 'daemonsets',
objectType: 'daemonsets',
},
];
export interface KubernetesFanOutHandlerOptions
@@ -108,7 +108,8 @@ export type KubernetesObjectTypes =
| 'cronjobs'
| 'ingresses'
| 'customresources'
| 'statefulsets';
| 'statefulsets'
| 'daemonsets';
/**
* Used to load cluster details from different sources
+13 -1
View File
@@ -7,6 +7,7 @@ import { Entity } from '@backstage/catalog-model';
import type { JsonObject } from '@backstage/types';
import { V1ConfigMap } from '@kubernetes/client-node';
import { V1CronJob } from '@kubernetes/client-node';
import { V1DaemonSet } from '@kubernetes/client-node';
import { V1Deployment } from '@kubernetes/client-node';
import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node';
import { V1Ingress } from '@kubernetes/client-node';
@@ -114,6 +115,16 @@ export interface CustomResourceFetchResponse {
type: 'customresources';
}
// Warning: (ae-missing-release-tag) "DaemonSetsFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface DaemonSetsFetchResponse {
// (undocumented)
resources: Array<V1DaemonSet>;
// (undocumented)
type: 'daemonsets';
}
// Warning: (ae-missing-release-tag) "DeploymentFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -139,7 +150,8 @@ export type FetchResponse =
| CronJobsFetchResponse
| IngressesFetchResponse
| CustomResourceFetchResponse
| StatefulSetsFetchResponse;
| StatefulSetsFetchResponse
| DaemonSetsFetchResponse;
// Warning: (ae-missing-release-tag) "HorizontalPodAutoscalersFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
+8 -1
View File
@@ -18,6 +18,7 @@ import type { JsonObject } from '@backstage/types';
import {
V1ConfigMap,
V1CronJob,
V1DaemonSet,
V1Deployment,
V1HorizontalPodAutoscaler,
V1Ingress,
@@ -105,7 +106,8 @@ export type FetchResponse =
| CronJobsFetchResponse
| IngressesFetchResponse
| CustomResourceFetchResponse
| StatefulSetsFetchResponse;
| StatefulSetsFetchResponse
| DaemonSetsFetchResponse;
export interface PodFetchResponse {
type: 'pods';
@@ -167,6 +169,11 @@ export interface StatefulSetsFetchResponse {
resources: Array<V1StatefulSet>;
}
export interface DaemonSetsFetchResponse {
type: 'daemonsets';
resources: Array<V1DaemonSet>;
}
export interface KubernetesFetchError {
errorType: KubernetesErrorTypes;
statusCode?: number;