Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix connect plugin overriding pods with same name #524

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/management-api/src/management-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class ManagementService extends EventEmitter {
}

private connectionKeyName(pod: ManagedPod, container: Container) {
return `${pod.getMetadata()?.name}-${container.name}`
return `${pod.getMetadata()?.namespace}-${pod.getMetadata()?.name}-${container.name}`
}

refreshConnections(pod: ManagedPod): string[] {
Expand Down
5 changes: 3 additions & 2 deletions packages/online-shell/src/discover/DiscoverGroupList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export const DiscoverGroupList: React.FunctionComponent = () => {
return (
<Accordion asDefinitionList>
{discoverGroups.map(group => {
const key = `${group.name}-${group.namespace}`
return (
<AccordionItem key={'item-' + group.name}>
<AccordionItem key={'item-' + key}>
<AccordionToggle
onClick={() => {
onToggle(group)
Expand All @@ -35,7 +36,7 @@ export const DiscoverGroupList: React.FunctionComponent = () => {
>
<DiscoverGroupLabel group={group} />
</AccordionToggle>
<AccordionContent id={'item-' + group.name + 'expand'} isHidden={!group.expanded}>
<AccordionContent id={'item-' + key + 'expand'} isHidden={!group.expanded}>
<List isBordered={true} iconSize='large'>
{group.replicas.map(replica => (
<DiscoverPodItem key={replica.uid} pod={replica} />
Expand Down