Add LimitRanges as Default Objects

Signed-off-by: Salomon Moreno <msalomon@vmware.com>
This commit is contained in:
Salomon Moreno
2022-06-16 16:04:05 -05:00
parent fe391c8bb4
commit 60e5f9fe68
6 changed files with 33 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-kubernetes-backend': patch
'@backstage/plugin-kubernetes-common': patch
---
Fixed the lack of `limitranges` as part of the Default Objects to fetch from the kubernetes api
+1
View File
@@ -214,6 +214,7 @@ export type KubernetesObjectTypes =
| 'services'
| 'configmaps'
| 'deployments'
| 'limitranges'
| 'replicasets'
| 'horizontalpodautoscalers'
| 'jobs'
@@ -70,6 +70,12 @@ export const DEFAULT_OBJECTS: ObjectToFetch[] = [
plural: 'configmaps',
objectType: 'configmaps',
},
{
group: '',
apiVersion: 'v1',
plural: 'limitranges',
objectType: 'limitranges',
},
{
group: 'apps',
apiVersion: 'v1',
@@ -101,6 +101,7 @@ export type KubernetesObjectTypes =
| 'services'
| 'configmaps'
| 'deployments'
| 'limitranges'
| 'replicasets'
| 'horizontalpodautoscalers'
| 'jobs'
+12
View File
@@ -11,6 +11,7 @@ import { V1Deployment } from '@kubernetes/client-node';
import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node';
import { V1Ingress } from '@kubernetes/client-node';
import { V1Job } from '@kubernetes/client-node';
import { V1LimitRange } from '@kubernetes/client-node';
import { V1Pod } from '@kubernetes/client-node';
import { V1ReplicaSet } from '@kubernetes/client-node';
import { V1Service } from '@kubernetes/client-node';
@@ -131,6 +132,7 @@ export type FetchResponse =
| ServiceFetchResponse
| ConfigMapFetchResponse
| DeploymentFetchResponse
| LimitRangeFetchReponse
| ReplicaSetsFetchResponse
| HorizontalPodAutoscalersFetchResponse
| JobsFetchResponse
@@ -212,6 +214,16 @@ export interface KubernetesRequestBody {
entity: Entity;
}
// Warning: (ae-missing-release-tag) "LimitRangeFetchReponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface LimitRangeFetchReponse {
// (undocumented)
resources: Array<V1LimitRange>;
// (undocumented)
type: 'limitranges';
}
// Warning: (ae-missing-release-tag) "ObjectsByEntityResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
+7
View File
@@ -22,6 +22,7 @@ import {
V1HorizontalPodAutoscaler,
V1Ingress,
V1Job,
V1LimitRange,
V1Pod,
V1ReplicaSet,
V1Service,
@@ -97,6 +98,7 @@ export type FetchResponse =
| ServiceFetchResponse
| ConfigMapFetchResponse
| DeploymentFetchResponse
| LimitRangeFetchReponse
| ReplicaSetsFetchResponse
| HorizontalPodAutoscalersFetchResponse
| JobsFetchResponse
@@ -130,6 +132,11 @@ export interface ReplicaSetsFetchResponse {
resources: Array<V1ReplicaSet>;
}
export interface LimitRangeFetchReponse {
type: 'limitranges';
resources: Array<V1LimitRange>;
}
export interface HorizontalPodAutoscalersFetchResponse {
type: 'horizontalpodautoscalers';
resources: Array<V1HorizontalPodAutoscaler>;