Skip to content

Commit

Permalink
Merge pull request #2094 from headlamp-k8s/fix-crashing-services-page
Browse files Browse the repository at this point in the history
frontend k8s/service: Make spec.ports optional to reflect the K8s API
  • Loading branch information
joaquimrocha authored Jun 27, 2024
2 parents c8ac575 + 7132711 commit e16f75d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/service/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function ServiceList() {
id: 'ports',
label: t('Ports'),
getValue: service => service.getPorts()?.join(', '),
render: service => <LabelListItem labels={service.getPorts()} />,
render: service => <LabelListItem labels={service.getPorts() ?? []} />,
},
{
id: 'selector',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/k8s/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface KubeLoadBalancerIngress {
export interface KubeService extends KubeObjectInterface {
spec: {
clusterIP: string;
ports: {
ports?: {
name: string;
nodePort: number;
port: number;
Expand Down

0 comments on commit e16f75d

Please sign in to comment.