Skip to content

Commit

Permalink
Add additional kube resources to Workload page (#4830)
Browse files Browse the repository at this point in the history
* Allow k8s namespaces to be added as favourites

* k8s: Add support for more resource types in a generic way

* Improve the home page

* Fix lint issue

* Tweaks and refactoring

* Add separator to layout menu

* Improve incremental loading

* Various tidyups and improvements

* Tidy ups and improvemts to async loading

* Fix progress spinner alignment

* Unscubribe

* Minor bug fixes and a few tidy ups

* Further tidy ups

* Fix front end unit tests

* Unit test fix

* Further unit tests fixes

* Endpoint card unit test fixes

* Fix unit tests

* Tidy up favorite card

* Further refinement to the UI

* Fix missing dates from recents on CF view

* Get app deploy from home screen working

* Add message for when no connected endpoints

* Unit test fixes

* Kubernetes Home Card unit test fixes

* Fix unit test error

* Move components to remove dependency on large shared module

* Fix unit test and add deploy tiles to CF Home Card

* Fix word wrap on favorite name

* Add tool tip

* Style tidy ups

* Minor tidy ups

* Check favorites exists before navigating to them

* Fix test imports

* First round of tidy ups of the user favorites code

* Further refactor to reduce the complexity of user favorites

* Fix unit tests

* Allow Kubernetes namespaces to be favorited

* Fix duplicate import

* Tidy ups

* e2e Debugging

* Fix for org delete e2e test

* E2e Test fix

* Refactor out common entity operator

* Slight refactor

* Fix frontend unit tests

* Unit test fix

* Address PR feedback so far

* Address PR feedback

* Fix connected endpoint state check on home screen

* Address PR feedback

* Restore apps link

* Improve typing

* Fix undefined error

* Fix unit test

* Fix ordering issue

* Add a default home card

* Fix frong end lint issues

* Merge fixes

* Fix unit tests

* WIP

* Fixes for pods view

* Tidy ups

* Add more resource types

* Fix lint issue

* Fix lint issue

* Fix unit test

* Fix lint issues

* Fix build issue

* Fix unit test

* Unit test fix

* Fix unit tests

* More improvements

* Numerous improvements

* Fix lint issue

* RE-arrange kube entity creation
- now assign directly to kube entity catalog
- to access custom kube generator resources have to do some funnies in
  kubernetes-tab-base.component.ts

* Fix services in namespace view
- kube guid and namespace was mixed up
- now follow standard pattern of kube guid then namespace in ctor

* Fix merge issues

* Changes following review

* Fix unit tests

* Fix merge issue

* Fix merge issues

* Changes following merge

* Changes following merge

* Fix merge conflicts

* Only show analysis link when enabled

* Fix issue favoriting from side panel

* Fix expression changed error

* Fix expression changed errors

* Fix a few minor issues and unit test

* Remove old namespace components

* Remvoe TODO

* Add additional kube resources to Workload page
Two small todos left
- tidy up process in helm-release-socket-service
- switch service and pods view over to new process and remove old components/files

* Convert workload pods and services view to standard resource views

* Tidy up HelmReleaseSocketService

* Delete fixes
- fixes to delete action param
- added to delete pods
- successEntityHandler doesn't run, so have to manually clear pagination sections

* Fix delete ns
- ensure delete action has correct guid
- ensure response has kube guid

* Fix expanding pod row

* Fix show of analysis in namespace resource viewer

* Fix fav namespace link

* Fix PR issues

* remove fluff from kube generator

* Fixes post merge

* Add additional information to new kube resource tables (#4825)

* Allow k8s namespaces to be added as favourites

* k8s: Add support for more resource types in a generic way

* Improve the home page

* Fix lint issue

* Tweaks and refactoring

* Add separator to layout menu

* Improve incremental loading

* Various tidyups and improvements

* Tidy ups and improvemts to async loading

* Fix progress spinner alignment

* Unscubribe

* Minor bug fixes and a few tidy ups

* Further tidy ups

* Fix front end unit tests

* Unit test fix

* Further unit tests fixes

* Endpoint card unit test fixes

* Fix unit tests

* Tidy up favorite card

* Further refinement to the UI

* Fix missing dates from recents on CF view

* Get app deploy from home screen working

* Add message for when no connected endpoints

* Unit test fixes

* Kubernetes Home Card unit test fixes

* Fix unit test error

* Move components to remove dependency on large shared module

* Fix unit test and add deploy tiles to CF Home Card

* Fix word wrap on favorite name

* Add tool tip

* Style tidy ups

* Minor tidy ups

* Check favorites exists before navigating to them

* Fix test imports

* First round of tidy ups of the user favorites code

* Further refactor to reduce the complexity of user favorites

* Fix unit tests

* Allow Kubernetes namespaces to be favorited

* Fix duplicate import

* Tidy ups

* e2e Debugging

* Fix for org delete e2e test

* E2e Test fix

* Refactor out common entity operator

* Slight refactor

* Fix frontend unit tests

* Unit test fix

* Address PR feedback so far

* Address PR feedback

* Fix connected endpoint state check on home screen

* Address PR feedback

* Restore apps link

* Improve typing

* Fix undefined error

* Fix unit test

* Fix ordering issue

* Add a default home card

* Fix frong end lint issues

* Merge fixes

* Fix unit tests

* WIP

* Fixes for pods view

* Tidy ups

* Add more resource types

* Fix lint issue

* Fix lint issue

* Fix unit test

* Fix lint issues

* Fix build issue

* Fix unit test

* Unit test fix

* Fix unit tests

* More improvements

* Numerous improvements

* Fix lint issue

* RE-arrange kube entity creation
- now assign directly to kube entity catalog
- to access custom kube generator resources have to do some funnies in
  kubernetes-tab-base.component.ts

* Fix services in namespace view
- kube guid and namespace was mixed up
- now follow standard pattern of kube guid then namespace in ctor

* Fix merge issues

* Changes following review

* Fix unit tests

* Fix merge issue

* Fix merge issues

* Changes following merge

* Changes following merge

* Add additional information to new kube resource tables

* Fix merge conflicts

* Only show analysis link when enabled

* Fix issue favoriting from side panel

* Fix expression changed error

* Fix expression changed errors

* Fix a few minor issues and unit test

* Remove old namespace components

* Remvoe TODO

* Fix merge issue

* Fix PR issues

* Delete fixes
- fixes to delete action param
- added to delete pods
- successEntityHandler doesn't run, so have to manually clear pagination sections

* Fix delete ns
- ensure delete action has correct guid
- ensure response has kube guid

* Don't use generic url validation for kube endpoints (#4826)

- this was recently added
- false negative for minikube url (https://192.168.39.159:8443)

* Improvement and fix for no-content component (#4827)

* Improvements and fixes for no-content component
- add colour to improve monotone views on first load
- fix issue where no-content header arrow failed to show in production
  (see angular/angular-cli#17440)

* Fix another opacity percentage
- seen in import kube table edit endpoint name cell

* Bump github.com/mattn/go-sqlite3 from 1.13.0 to 1.14.5 in /src/jetstream (#4816)

Bumps [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) from 1.13.0 to 1.14.5.
- [Release notes](https://github.com/mattn/go-sqlite3/releases)
- [Commits](mattn/go-sqlite3@v1.13.0...v1.14.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Document deployment with an ingress; make ingress host optional (#4793)

* Minor Kube Fixes (#4829)

* Fix home screen kube card pod link

* Ensure reset list filter button also resets helm chart repo filter

* Ensure we handle the case where the versions info is unable

* Fix link for namespaces

Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>

* Fix expanding pod row

* Fix show of analysis in namespace resource viewer

* Fix fav namespace link

Co-authored-by: Neil MacDougall <neil.macdougall@suse.com>
Co-authored-by: Neil MacDougall <neil_macdougall@hotmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Ivan Kapelyukhin <ikapelyukhin@suse.com>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>

* Add comment after review

Co-authored-by: Neil MacDougall <neil.macdougall@suse.com>
Co-authored-by: Neil MacDougall <neil_macdougall@hotmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Ivan Kapelyukhin <ikapelyukhin@suse.com>
Co-authored-by: Neil MacDougall <nwmac@users.noreply.github.com>
  • Loading branch information
6 people authored Dec 9, 2020
1 parent 12e63ab commit 0b43865
Show file tree
Hide file tree
Showing 23 changed files with 200 additions and 331 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ export class KubeEntityCatalog {
apiVersion: '/api/v1',
apiName: 'pods',
apiNamespaced: true,
apiWorkspaced: true,
listConfig: 'k8s-pods',
getKubeCatalogEntity: (definition) => new StratosCatalogEntity<IFavoriteMetadata, KubernetesPod, KubePodActionBuilders>(
definition, { actionBuilders: kubePodActionBuilders }
Expand Down Expand Up @@ -363,6 +364,7 @@ export class KubeEntityCatalog {
apiVersion: '/api/v1',
apiName: 'service',
apiNamespaced: true,
apiWorkspaced: true,
listConfig: 'k8s-services',
getKubeCatalogEntity: (definition) => new StratosCatalogEntity<IFavoriteMetadata, KubeService, KubeServiceActionBuilders>(
definition, {
Expand Down Expand Up @@ -392,6 +394,7 @@ export class KubeEntityCatalog {
label: 'Secret',
apiVersion: '/api/v1',
apiName: 'secrets',
apiWorkspaced: true,
listColumns: [
{
header: 'Type',
Expand All @@ -411,6 +414,7 @@ export class KubeEntityCatalog {
labelTab: 'PVCs',
apiVersion: '/api/v1',
apiName: 'persistentvolumeclaims',
apiWorkspaced: true,
listColumns: [
{
header: 'Storage Class',
Expand Down Expand Up @@ -468,6 +472,7 @@ export class KubeEntityCatalog {
label: 'Replica Set',
apiVersion: '/apis/apps/v1',
apiName: 'replicasets',
apiWorkspaced: true,
listColumns: [
{
header: 'Desired',
Expand Down Expand Up @@ -500,6 +505,7 @@ export class KubeEntityCatalog {
label: 'Service Account',
apiVersion: '/api/v1',
apiName: 'serviceaccounts',
apiWorkspaced: true,
listColumns: [{
header: 'Secrets',
field: (row: KubeServiceAccount) => row.secrets?.length.toString()
Expand All @@ -511,13 +517,15 @@ export class KubeEntityCatalog {
label: 'Role',
apiVersion: '/apis/rbac.authorization.k8s.io/v1',
apiName: 'roles',
apiWorkspaced: true,
});
this.job = KubeResourceEntityHelper.generate<BasicKubeAPIResource, KubeResourceActionBuilders>(endpointDef, {
type: 'job',
icon: 'job',
label: 'Job',
apiVersion: '/apis/batch/v1',
apiName: 'jobs',
apiWorkspaced: true,
listColumns: [{
header: 'Completions',
field: (row: BasicKubeAPIResource) => this.jobToCompletion(row.spec, row.status)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<app-page-sub-nav>
<div class="sub-nav-menu-button">
<div class="sub-nav-menu-button" *ngIf="namespaces$">
<mat-menu #appMenu="matMenu" class="menu">
<button (click)="select('*')" mat-menu-item>All namespaces</button>
<button *ngFor="let ns of namespaces$ | async" (click)="select(ns)" mat-menu-item>{{ ns }}</button>
</mat-menu>
<button mat-button [matMenuTriggerFor]="appMenu" class="sub-nav-menu-button__btn" [ngClass]="{'sub-nav-menu-button__not-allowed': !isNamespacedView}">
<button mat-button [matMenuTriggerFor]="appMenu" class="sub-nav-menu-button__btn"
[ngClass]="{'sub-nav-menu-button__not-allowed': !isNamespacedView}">
<mat-icon *ngIf="selectedNamespace" fontSet="stratos-icons" class="sub-nav-menu-button__icon">namespace</mat-icon>
<span class="sub-nav-menu-button__label">{{ selectedNamespace || 'All namespaces'}}</span>
<mat-icon class="sub-nav-menu-button__arrow">arrow_drop_down</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Store } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs';
import { filter, map } from 'rxjs/operators';

import { ListConfigUpdate } from '../../../../../core/src/shared/components/list/list-generics/list-config-provider.types';
import {
ActionListConfigProvider,
} from '../../../../../core/src/shared/components/list/list-generics/list-providers/action-list-config-provider';
Expand Down Expand Up @@ -31,6 +32,7 @@ import {
SimpleColumnValueGetter,
SimpleKubeListColumn,
} from '../../store/kube.types';
import { getHelmReleaseDetailsFromGuid } from '../../workloads/store/workloads-entity-factory';
import { SetCurrentNamespaceAction } from './../../store/kubernetes.actions';

const namespaceColumnId = 'namespace';
Expand All @@ -53,14 +55,18 @@ export class KubernetesResourceListComponent implements OnDestroy {
public provider: ActionListConfigProvider<KubeAPIResource>;

public isNamespacedView = true;
public isWorkloadView = false;

private sub: Subscription;
private kubeId: string;
private workloadTitle: string;
private workloadNamespace: string;

constructor(
private store: Store<any>,
route: ActivatedRoute,
private route: ActivatedRoute,
router: Router,
private kubeId: BaseKubeGuid,
kubeId: BaseKubeGuid,
private uiConfigService: KubernetesUIConfigService
) {
// Entity Catalog Key can be specified in the route config
Expand All @@ -77,21 +83,32 @@ export class KubernetesResourceListComponent implements OnDestroy {
return;
}

const namespacesObs = kubeEntityCatalog.namespace.store.getPaginationService(kubeId.guid);
this.namespaces$ = namespacesObs.entities$.pipe(map(ns => ns.map(n => n.metadata.name)));
// Workload
if (route.snapshot.data?.isWorkload) {
this.isWorkloadView = true;
const { endpointId, namespace, releaseTitle } = getHelmReleaseDetailsFromGuid(this.route.snapshot.parent.parent.params.guid);
this.kubeId = endpointId;
this.workloadNamespace = namespace;
this.workloadTitle = releaseTitle;
} else {
// Namespaced
this.kubeId = kubeId.guid;
const namespacesObs = kubeEntityCatalog.namespace.store.getPaginationService(kubeId.guid);
this.namespaces$ = namespacesObs.entities$.pipe(map(ns => ns.map(n => n.metadata.name)));

// Watch for namespace changes
this.sub = this.store.select<KubernetesCurrentNamespace>(state => state.k8sCurrentNamespace).pipe(
map(data => data[this.kubeId]),
filter(data => !!data)
).subscribe(ns => {
this.selectedNamespace = ns === '*' ? undefined : ns;
if (this.isNamespacedView) {
this.createProvider(catalogEntity);
}
});
}

this.createProvider(catalogEntity);

// Watch for namespace changes
this.sub = this.store.select<KubernetesCurrentNamespace>(state => state.k8sCurrentNamespace).pipe(
map(data => data[this.kubeId.guid]),
filter(data => !!data)
).subscribe(ns => {
this.selectedNamespace = ns === '*' ? undefined : ns;
if (this.isNamespacedView) {
this.createProvider(catalogEntity);
}
});
}

ngOnDestroy() {
Expand All @@ -101,37 +118,37 @@ export class KubernetesResourceListComponent implements OnDestroy {
}

private createProvider(catalogEntity: any) {
this.isNamespacedView = !!catalogEntity.definition.apiNamespaced;
this.isNamespacedView = !this.isWorkloadView && !!catalogEntity.definition.apiNamespaced;
let action;
if (this.selectedNamespace && this.isNamespacedView) {
action = catalogEntity.actions.getInNamespace(this.kubeId.guid, this.selectedNamespace);
if (this.isWorkloadView) {
action = catalogEntity.actions.getInWorkload(this.kubeId, this.workloadNamespace, this.workloadTitle);
} else if (this.selectedNamespace && this.isNamespacedView) {
action = catalogEntity.actions.getInNamespace(this.kubeId, this.selectedNamespace);
} else {
action = catalogEntity.actions.getMultiple(this.kubeId.guid);
action = catalogEntity.actions.getMultiple(this.kubeId);
}

const provider = new ActionListConfigProvider<KubeAPIResource>(this.store, action);
const listConfigName = catalogEntity.definition ? catalogEntity.definition.listConfig : null;
let listConfig: any = this.uiConfigService.listConfig.get(listConfigName);
if (!listConfig) {
listConfig = {
pageSizeOptions: defaultHelmKubeListPageSize,
viewType: ListViewTypes.TABLE_ONLY,
enableTextFilter: true,
text: {
title: null,
filter: 'Filter by Name',
noEntries: 'There are no resources'
},
getColumns: () => this.getColumns(catalogEntity.definition)
};
}
const listConfig: ListConfigUpdate<any> = this.uiConfigService.listConfig.get(listConfigName) || {
pageSizeOptions: defaultHelmKubeListPageSize,
viewType: ListViewTypes.TABLE_ONLY,
enableTextFilter: true,
text: {
title: null,
filter: 'Filter by Name',
noEntries: 'There are no resources'
},
getColumns: () => this.getColumns(catalogEntity.definition),
};
listConfig.hideRefresh = this.isWorkloadView;

provider.updateListConfig(listConfig);
this.provider = provider;
}

select(item?: string) {
this.store.dispatch(new SetCurrentNamespaceAction(this.kubeId.guid, item));
this.store.dispatch(new SetCurrentNamespaceAction(this.kubeId, item));
}

private getColumns(definition: KubeResourceEntityDefinition): ITableColumn<KubeAPIResource>[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
GetKubernetesResource,
GetKubernetesResources,
GetKubernetesResourcesInNamespace,
GetKubernetesResourcesInWorkload,
} from '../kube-resource.actions';
import { BasicKubeAPIResource } from '../kube.types';

Expand All @@ -22,6 +23,11 @@ export interface KubeResourceActionBuilders extends OrchestratedActionBuilders {
kubeGuid: string,
namespace: string
) => GetKubernetesResourcesInNamespace;
getInWorkload: (
kubeGuid: string,
namespace: string,
releaseTitle: string
) => GetKubernetesResourcesInWorkload;
deleteResource: (
resource: BasicKubeAPIResource,
kubeGuid: string,
Expand All @@ -35,6 +41,8 @@ export function createKubeResourceActionBuilder(entityType: string): KubeResourc
get: (resName: string, kubeGuid: string, { namespace }) => new GetKubernetesResource(entityType, resName, namespace, kubeGuid),
getMultiple: (kubeGuid: string, paginationKey?: string) => new GetKubernetesResources(entityType, kubeGuid),
getInNamespace: (kubeGuid: string, namespace: string) => new GetKubernetesResourcesInNamespace(entityType, kubeGuid, namespace),
getInWorkload: (kubeGuid: string, namespace: string, releaseTitle: string) =>
new GetKubernetesResourcesInWorkload(entityType, kubeGuid, namespace, releaseTitle),
deleteResource: (resource: BasicKubeAPIResource, resName: string, kubeGuid: string, namespace: string) =>
new DeleteKubernetesResource(entityType, resource, kubeGuid, resName, namespace)
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { OrchestratedActionBuilders } from '../../../../../store/src/entity-catalog/action-orchestrator/action-orchestrator';
import { kubernetesNamespacesEntityType, kubernetesPodsEntityType } from '../../kubernetes-entity-factory';
import { GetHelmReleasePods, GetHelmReleaseServices } from '../../workloads/store/workloads.actions';
import {
kubernetesNamespacesEntityType,
kubernetesPodsEntityType,
kubernetesServicesEntityType,
} from '../../kubernetes-entity-factory';
import {
DeleteAnalysisReport,
GetAnalysisReportById,
GetAnalysisReports,
GetAnalysisReportsByPath,
RunAnalysisReport,
} from '../analysis.actions';
import { DeleteKubernetesResource } from '../kube-resource.actions';
import { DeleteKubernetesResource, GetKubernetesResourcesInWorkload } from '../kube-resource.actions';
import { BasicKubeAPIResource } from '../kube.types';
import {
CreateKubernetesNamespace,
Expand Down Expand Up @@ -59,8 +62,9 @@ export interface KubePodActionBuilders extends OrchestratedActionBuilders {
) => GetKubernetesPodsInNamespace;
getInWorkload: (
kubeGuid: string,
namespace: string,
releaseTitle: string
) => GetHelmReleasePods;
) => GetKubernetesResourcesInWorkload;
deleteResource: (
resource: BasicKubeAPIResource,
kubeGuid: string,
Expand All @@ -74,7 +78,11 @@ export const kubePodActionBuilders: KubePodActionBuilders = {
getMultiple: (kubeGuid: string, paginationKey?: string) => new GetKubernetesPods(kubeGuid),
getOnNode: (kubeGuid: string, nodeName: string) => new GetKubernetesPodsOnNode(kubeGuid, nodeName),
getInNamespace: (kubeGuid: string, namespace: string) => new GetKubernetesPodsInNamespace(kubeGuid, namespace),
getInWorkload: (kubeGuid: string, releaseTitle: string) => new GetHelmReleasePods(kubeGuid, releaseTitle),
getInWorkload: (
kubeGuid: string,
namespace: string,
releaseTitle: string
) => new GetKubernetesResourcesInWorkload(kubernetesPodsEntityType, kubeGuid, namespace, releaseTitle),
deleteResource: (
resource: BasicKubeAPIResource,
kubeGuid: string,
Expand Down Expand Up @@ -153,15 +161,20 @@ export interface KubeServiceActionBuilders extends OrchestratedActionBuilders {
namespace: string,
) => GetKubernetesServicesInNamespace;
getInWorkload: (
releaseTitle: string,
kubeGuid: string
) => GetHelmReleaseServices;
kubeGuid: string,
namespace: string,
releaseTitle: string
) => GetKubernetesResourcesInWorkload;
}

export const kubeServiceActionBuilders: KubeServiceActionBuilders = {
getMultiple: (kubeGuid: string, paginationKey?: string) => new GetKubernetesServices(kubeGuid),
getInNamespace: (kubeGuid: string, namespace: string) => new GetKubernetesServicesInNamespace(kubeGuid, namespace),
getInWorkload: (releaseTitle: string, kubeGuid: string) => new GetHelmReleaseServices(kubeGuid, releaseTitle),
getInWorkload: (
kubeGuid: string,
namespace: string,
releaseTitle: string
) => new GetKubernetesResourcesInWorkload(kubernetesServicesEntityType, kubeGuid, namespace, releaseTitle)
};

export interface KubeDashboardActionBuilders extends OrchestratedActionBuilders {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export const GET_KUBE_RESOURCES_IN_NAMESPACE = '[KUBERNETES Endpoint] Get Resour
export const GET_KUBE_RESOURCES_IN_NAMESPACE_SUCCESS = '[KUBERNETES Endpoint] Get Resources in namespace Success';
export const GET_KUBE_RESOURCES_IN_NAMESPACE_FAILURE = '[KUBERNETES Endpoint] Get Resources in namespace Failure';

export const GET_KUBE_RESOURCES_IN_WORKLOAD = '[KUBERNETES Endpoint] Get Resources in workload';
export const GET_KUBE_RESOURCES_IN_WORKLOAD_SUCCESS = '[KUBERNETES Endpoint] Get Resources in workload Success';
export const GET_KUBE_RESOURCES_IN_WORKLOAD_FAILURE = '[KUBERNETES Endpoint] Get Resources in workload Failure';

export const DELETE_KUBE_RESOURCE = '[KUBERNETES Endpoint] Delete Resource';
export const DELETE_KUBE_RESOURCE_SUCCESS = '[KUBERNETES Endpoint] Delete Resource Success';
export const DELETE_KUBE_RESOURCE_FAILURE = '[KUBERNETES Endpoint] Delete Resource Failure';
Expand Down Expand Up @@ -85,6 +89,19 @@ export class GetKubernetesResourcesInNamespace extends GetKubernetesResources {
];
}

export class GetKubernetesResourcesInWorkload extends GetKubernetesResources {
constructor(entityType: string, kubeGuid: string, namespace: string, releaseTitle: string) {
super(entityType, kubeGuid);
this.paginationKey = getPaginationKey(entityType, namespace + ':' + releaseTitle, kubeGuid);
}
type = GET_KUBE_RESOURCES_IN_WORKLOAD;
actions = [
GET_KUBE_RESOURCES_IN_WORKLOAD,
GET_KUBE_RESOURCES_IN_WORKLOAD_SUCCESS,
GET_KUBE_RESOURCES_IN_WORKLOAD_FAILURE
];
}

export class DeleteKubernetesResource implements KubeSingleEntityAction {

public entity: EntitySchema[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface KubeResourceEntityDefinition<
apiVersion: string;
apiName: string;
apiNamespaced?: boolean;
apiWorkspaced?: boolean;
label: string;
labelPlural?: string;
labelTab?: string;
Expand Down

This file was deleted.

Loading

0 comments on commit 0b43865

Please sign in to comment.