+
diff --git a/src/app/frontend/common/services/resource/endpoint.ts b/src/app/frontend/common/services/resource/endpoint.ts
index a441551cedb1..c1e1190473a9 100644
--- a/src/app/frontend/common/services/resource/endpoint.ts
+++ b/src/app/frontend/common/services/resource/endpoint.ts
@@ -33,6 +33,7 @@ export enum Resource {
namespace = 'namespace',
persistentVolume = 'persistentvolume',
storageClass = 'storageclass',
+ ingressClass = 'ingressclass',
clusterRole = 'clusterrole',
clusterRoleBinding = 'clusterrolebinding',
role = 'role',
diff --git a/src/app/frontend/overview/template.html b/src/app/frontend/overview/template.html
index b3a773b55f99..dd3e8c27f5ab 100644
--- a/src/app/frontend/overview/template.html
+++ b/src/app/frontend/overview/template.html
@@ -76,6 +76,8 @@
[hideable]="true">
+ ();
+
+ ingressClass: IngressClassDetail;
+ isInitialized = false;
+
+ constructor(
+ private readonly ingressClass_: ResourceService,
+ private readonly actionbar_: ActionbarService,
+ private readonly activatedRoute_: ActivatedRoute,
+ private readonly notifications_: NotificationsService
+ ) {}
+
+ ngOnInit(): void {
+ const resourceName = this.activatedRoute_.snapshot.params.resourceName;
+
+ this.ingressClass_
+ .get(this.endpoint_.detail(), resourceName)
+ .pipe(takeUntil(this.unsubscribe_))
+ .subscribe((d: IngressClassDetail) => {
+ this.ingressClass = d;
+ this.notifications_.pushErrors(d.errors);
+ this.actionbar_.onInit.emit(new ResourceMeta('Ingress Class', d.objectMeta, d.typeMeta));
+ this.isInitialized = true;
+ });
+ }
+
+ ngOnDestroy(): void {
+ this.unsubscribe_.next();
+ this.unsubscribe_.complete();
+ this.actionbar_.onDetailsLeave.emit();
+ }
+
+ getParameterNames(): string[] {
+ return this.ingressClass.parameters ? Object.keys(this.ingressClass.parameters) : [];
+ }
+}
diff --git a/src/app/frontend/resource/cluster/ingressclass/detail/style.scss b/src/app/frontend/resource/cluster/ingressclass/detail/style.scss
new file mode 100644
index 000000000000..1b08d10a84df
--- /dev/null
+++ b/src/app/frontend/resource/cluster/ingressclass/detail/style.scss
@@ -0,0 +1,23 @@
+// Copyright 2017 The Kubernetes Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+@use '../../../../variables' as *;
+@use '../../../../mixins' as *;
+
+.kd-ingress-class-parameter-icon {
+ @include kd-icon-size($caption-font-size-base);
+
+ align-self: center;
+ margin-left: $baseline-grid * 0.5;
+}
diff --git a/src/app/frontend/resource/cluster/ingressclass/detail/template.html b/src/app/frontend/resource/cluster/ingressclass/detail/template.html
new file mode 100644
index 000000000000..e8f46134a8c4
--- /dev/null
+++ b/src/app/frontend/resource/cluster/ingressclass/detail/template.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
Resource information
+
+
+
Controller
+
{{ ingressClass?.controller }}
+
+
+
+ {{ parameter }}
+ tune
+
+
{{ ingressClass?.parameters[parameter] }}
+
+
+
diff --git a/src/app/frontend/resource/cluster/ingressclass/list/component.ts b/src/app/frontend/resource/cluster/ingressclass/list/component.ts
new file mode 100644
index 000000000000..b898242f1d38
--- /dev/null
+++ b/src/app/frontend/resource/cluster/ingressclass/list/component.ts
@@ -0,0 +1,21 @@
+// Copyright 2017 The Kubernetes Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import {Component} from '@angular/core';
+
+@Component({
+ selector: 'kd-ingress-class-list-state',
+ template: '',
+})
+export class IngressClassListComponent {}
diff --git a/src/app/frontend/resource/cluster/ingressclass/module.ts b/src/app/frontend/resource/cluster/ingressclass/module.ts
new file mode 100644
index 000000000000..d6bca5594065
--- /dev/null
+++ b/src/app/frontend/resource/cluster/ingressclass/module.ts
@@ -0,0 +1,28 @@
+// Copyright 2017 The Kubernetes Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import {NgModule} from '@angular/core';
+
+import {ComponentsModule} from '@common/components/module';
+import {SharedModule} from '../../../shared.module';
+
+import {IngressClassDetailComponent} from './detail/component';
+import {IngressClassListComponent} from './list/component';
+import {IngressClassRoutingModule} from './routing';
+
+@NgModule({
+ imports: [SharedModule, ComponentsModule, IngressClassRoutingModule],
+ declarations: [IngressClassListComponent, IngressClassDetailComponent],
+})
+export class IngressClassModule {}
diff --git a/src/app/frontend/resource/cluster/ingressclass/routing.ts b/src/app/frontend/resource/cluster/ingressclass/routing.ts
new file mode 100644
index 000000000000..d091d76147a0
--- /dev/null
+++ b/src/app/frontend/resource/cluster/ingressclass/routing.ts
@@ -0,0 +1,46 @@
+// Copyright 2017 The Kubernetes Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import {NgModule} from '@angular/core';
+import {Route, RouterModule} from '@angular/router';
+import {DEFAULT_ACTIONBAR} from '@common/components/actionbars/routing';
+
+import {CLUSTER_ROUTE} from '../routing';
+
+import {IngressClassDetailComponent} from './detail/component';
+import {IngressClassListComponent} from './list/component';
+
+const INGRESSCLASS_LIST_ROUTE: Route = {
+ path: '',
+ component: IngressClassListComponent,
+ data: {
+ breadcrumb: 'Ingress Classes',
+ parent: CLUSTER_ROUTE,
+ },
+};
+
+const INGRESSCLASS_DETAIL_ROUTE: Route = {
+ path: ':resourceName',
+ component: IngressClassDetailComponent,
+ data: {
+ breadcrumb: '{{ resourceName }}',
+ parent: INGRESSCLASS_LIST_ROUTE,
+ },
+};
+
+@NgModule({
+ imports: [RouterModule.forChild([INGRESSCLASS_LIST_ROUTE, INGRESSCLASS_DETAIL_ROUTE, DEFAULT_ACTIONBAR])],
+ exports: [RouterModule],
+})
+export class IngressClassRoutingModule {}
diff --git a/src/app/frontend/search/template.html b/src/app/frontend/search/template.html
index 2f68dd6eb41c..18dc090b74c6 100644
--- a/src/app/frontend/search/template.html
+++ b/src/app/frontend/search/template.html
@@ -85,6 +85,8 @@
[hideable]="true">
+
diff --git a/src/app/frontend/typings/root.api.ts b/src/app/frontend/typings/root.api.ts
index d1b9081a6874..4a07b1bb1595 100644
--- a/src/app/frontend/typings/root.api.ts
+++ b/src/app/frontend/typings/root.api.ts
@@ -211,6 +211,10 @@ export interface StorageClassList extends ResourceList {
items: StorageClass[];
}
+export interface IngressClassList extends ResourceList {
+ items: IngressClass[];
+}
+
// Simple detail types
export type ClusterRole = Resource;
@@ -405,6 +409,11 @@ export interface StorageClass extends Resource {
parameters: StringMap[];
}
+export interface IngressClass extends Resource {
+ controller: string;
+ parameters: StringMap[];
+}
+
// Detail types
export interface ReplicaSetDetail extends ResourceDetail {
@@ -581,6 +590,11 @@ export interface StorageClassDetail extends ResourceDetail {
provisioner: string;
}
+export interface IngressClassDetail extends ResourceDetail {
+ parameters: StringMap;
+ controller: string;
+}
+
export interface ConfigMapDetail extends ResourceDetail {
data: StringMap;
}