Skip to content

Commit

Permalink
fix:template service nodeport (#4503)
Browse files Browse the repository at this point in the history
Signed-off-by: jingyang <3161362058@qq.com>
  • Loading branch information
zjy365 committed Jan 23, 2024
1 parent 61e6921 commit 4ff45a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -68,6 +68,13 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
backups.map((item) => delBackupByName({ backupName: item.metadata.name, req }))
);

// del service
await k8sCore.deleteNamespacedService(`${instanceName}-export`, namespace).catch((err) => {
if (err?.body?.code !== 404) {
throw new Error(err?.message || 'Delete DB Service Export Error');
}
});

// del role
await Promise.all([
k8sAuth.deleteNamespacedRole(instanceName, namespace),
Expand Down
Expand Up @@ -58,7 +58,7 @@ export default function OtherList({ instanceName }: { instanceName: string }) {
render: (item: ResourceListItemType) => {
const text = item?.servicePorts
? item?.servicePorts
?.map((item) => `${item?.port}:${item?.targetPort}/${item?.protocol}`)
?.map((item) => `${item?.port}:${item?.nodePort}/${item?.protocol}`)
.join(', ')
: '';
return <Text>{text}</Text>;
Expand Down

0 comments on commit 4ff45a8

Please sign in to comment.