kubernetes: Updates kubernetes frontend to use common
Signed-off-by: Juan Lulkin <jmaiz@spotify.com>
This commit is contained in:
@@ -34,8 +34,8 @@
|
||||
"@backstage/catalog-model": "^0.7.4",
|
||||
"@backstage/config": "^0.1.4",
|
||||
"@backstage/core": "^0.7.6",
|
||||
"@backstage/plugin-catalog-react": "^0.1.3",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.3.2",
|
||||
"@backstage/kubernetes-common": "^0.1.0",
|
||||
"@backstage/plugin-catalog-react": "^0.1.3",
|
||||
"@backstage/theme": "^0.2.6",
|
||||
"@kubernetes/client-node": "^0.14.0",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
|
||||
Vendored
+1
-1
@@ -17,7 +17,7 @@
|
||||
import {
|
||||
ClusterLocatorMethod,
|
||||
CustomResource,
|
||||
} from '@backstage/plugin-kubernetes-backend';
|
||||
} from '@backstage/kubernetes-common';
|
||||
|
||||
export interface Config {
|
||||
kubernetes?: {
|
||||
|
||||
@@ -19,7 +19,7 @@ import { KubernetesApi } from './types';
|
||||
import {
|
||||
KubernetesRequestBody,
|
||||
ObjectsByEntityResponse,
|
||||
} from '@backstage/plugin-kubernetes-backend';
|
||||
} from '@backstage/kubernetes-common';
|
||||
|
||||
export class KubernetesBackendClient implements KubernetesApi {
|
||||
private readonly discoveryApi: DiscoveryApi;
|
||||
|
||||
@@ -18,7 +18,7 @@ import { createApiRef } from '@backstage/core';
|
||||
import {
|
||||
KubernetesRequestBody,
|
||||
ObjectsByEntityResponse,
|
||||
} from '@backstage/plugin-kubernetes-backend';
|
||||
} from '@backstage/kubernetes-common';
|
||||
|
||||
export const kubernetesApiRef = createApiRef<KubernetesApi>({
|
||||
id: 'plugin.kubernetes.service',
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import React from 'react';
|
||||
import { WarningPanel } from '@backstage/core';
|
||||
import { Typography } from '@material-ui/core';
|
||||
import { ClusterObjects } from '@backstage/plugin-kubernetes-backend';
|
||||
import { ClusterObjects } from '@backstage/kubernetes-common';
|
||||
|
||||
const clustersWithErrorsToErrorMessage = (
|
||||
clustersWithErrors: ClusterObjects[],
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
StatusOK,
|
||||
} from '@backstage/core';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { ClusterObjects } from '@backstage/plugin-kubernetes-backend';
|
||||
import { ClusterObjects } from '@backstage/kubernetes-common';
|
||||
import { ErrorPanel } from './ErrorPanel';
|
||||
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
|
||||
import { DeploymentsAccordions } from '../DeploymentsAccordions';
|
||||
|
||||
@@ -30,7 +30,7 @@ import * as maxedOutHpa from './__fixtures__/hpa-maxed-out.json';
|
||||
import {
|
||||
FetchResponse,
|
||||
ObjectsByEntityResponse,
|
||||
} from '@backstage/plugin-kubernetes-backend';
|
||||
} from '@backstage/kubernetes-common';
|
||||
|
||||
const CLUSTER_NAME = 'cluster-a';
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { DetectedError, DetectedErrorsByCluster } from './types';
|
||||
import { ObjectsByEntityResponse } from '@backstage/plugin-kubernetes-backend';
|
||||
import { ObjectsByEntityResponse } from '@backstage/kubernetes-common';
|
||||
import { groupResponses } from '../utils/response';
|
||||
import { detectErrorsInPods } from './pods';
|
||||
import { detectErrorsInDeployments } from './deployments';
|
||||
|
||||
@@ -22,7 +22,7 @@ import { useEffect, useState } from 'react';
|
||||
import {
|
||||
KubernetesRequestBody,
|
||||
ObjectsByEntityResponse,
|
||||
} from '@backstage/plugin-kubernetes-backend';
|
||||
} from '@backstage/kubernetes-common';
|
||||
|
||||
export interface KubernetesObjects {
|
||||
kubernetesObjects: ObjectsByEntityResponse | undefined;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { KubernetesAuthProvider } from './types';
|
||||
import { KubernetesRequestBody } from '@backstage/plugin-kubernetes-backend';
|
||||
import { KubernetesRequestBody } from '@backstage/kubernetes-common';
|
||||
|
||||
export class AwsKubernetesAuthProvider implements KubernetesAuthProvider {
|
||||
async decorateRequestBodyForAuth(
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { OAuthApi } from '@backstage/core';
|
||||
import { KubernetesAuthProvider } from './types';
|
||||
import { KubernetesRequestBody } from '@backstage/plugin-kubernetes-backend';
|
||||
import { KubernetesRequestBody } from '@backstage/kubernetes-common';
|
||||
|
||||
export class GoogleKubernetesAuthProvider implements KubernetesAuthProvider {
|
||||
authProvider: OAuthApi;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { OAuthApi } from '@backstage/core';
|
||||
import { KubernetesRequestBody } from '@backstage/plugin-kubernetes-backend';
|
||||
import { KubernetesRequestBody } from '@backstage/kubernetes-common';
|
||||
import { KubernetesAuthProvider, KubernetesAuthProvidersApi } from './types';
|
||||
import { GoogleKubernetesAuthProvider } from './GoogleKubernetesAuthProvider';
|
||||
import { ServiceAccountKubernetesAuthProvider } from './ServiceAccountKubernetesAuthProvider';
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { KubernetesAuthProvider } from './types';
|
||||
import { KubernetesRequestBody } from '@backstage/plugin-kubernetes-backend';
|
||||
import { KubernetesRequestBody } from '@backstage/kubernetes-common';
|
||||
|
||||
export class ServiceAccountKubernetesAuthProvider
|
||||
implements KubernetesAuthProvider {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { createApiRef } from '@backstage/core';
|
||||
import { KubernetesRequestBody } from '@backstage/plugin-kubernetes-backend';
|
||||
import { KubernetesRequestBody } from '@backstage/kubernetes-common';
|
||||
|
||||
export interface KubernetesAuthProvider {
|
||||
decorateRequestBodyForAuth(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { FetchResponse } from '@backstage/plugin-kubernetes-backend';
|
||||
import { FetchResponse } from '@backstage/kubernetes-common';
|
||||
import { GroupedResponses } from '../types/types';
|
||||
|
||||
// TODO this could probably be a lodash groupBy
|
||||
|
||||
Reference in New Issue
Block a user