@skyhook-io/radar-app 1.21.8 → 1.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/App.tsx +16 -1
- package/src/api/client.ts +18 -0
- package/src/api/cnpg-history.ts +3 -3
- package/src/api/cnpg-storage.ts +3 -3
- package/src/api/diagnose.test.ts +34 -0
- package/src/api/diagnose.ts +17 -4
- package/src/api/radarFeatures.test.ts +13 -1
- package/src/api/radarFeatures.ts +6 -0
- package/src/api/resourceActions.test.ts +829 -0
- package/src/api/resourceActions.ts +584 -0
- package/src/api/resourceActions.ui.test.tsx +1882 -0
- package/src/api/reviewedActionMutation.ts +56 -28
- package/src/api/substrateHealth.ts +2 -3
- package/src/api/traefik.ts +33 -0
- package/src/api/traffic.ts +14 -5
- package/src/api/workloadMetrics.test.ts +11 -2
- package/src/api/workloadMetrics.ts +2 -2
- package/src/components/CloudFunnelButton.test.tsx +39 -1
- package/src/components/CloudFunnelButton.tsx +10 -3
- package/src/components/cnpg/CNPGOverview.test.tsx +75 -3
- package/src/components/cnpg/CNPGOverview.tsx +62 -4
- package/src/components/diagnose/AnalysisStory.test.tsx +12 -0
- package/src/components/diagnose/DiagnoseContext.question.test.tsx +34 -1
- package/src/components/diagnose/DiagnoseContext.tsx +28 -3
- package/src/components/diagnose/DiagnoseSurface.tsx +5 -4
- package/src/components/diagnose/Home.tsx +3 -0
- package/src/components/diagnose/InvestigationEvidencePane.test.tsx +61 -0
- package/src/components/diagnose/InvestigationView.followupFailure.test.tsx +122 -0
- package/src/components/diagnose/InvestigationView.tsx +10 -2
- package/src/components/diagnose/LocalDiagnoseAction.history.test.tsx +1 -1
- package/src/components/diagnose/LocalDiagnoseAction.tsx +2 -2
- package/src/components/diagnose/QuestionComposer.test.tsx +16 -2
- package/src/components/diagnose/QuestionComposer.tsx +13 -8
- package/src/components/diagnose/diagnoseEvidenceTypes.ts +47 -8
- package/src/components/diagnose/investigationEvidence/adapters/diagnose.test.ts +153 -0
- package/src/components/diagnose/investigationEvidence/adapters/diagnose.ts +9 -13
- package/src/components/diagnose/investigationEvidence/adapters/issues.ts +21 -5
- package/src/components/diagnose/investigationEvidence/bodies/network.tsx +63 -26
- package/src/components/diagnose/launch.ts +1 -1
- package/src/components/dock/PodDebugSession.test.tsx +66 -0
- package/src/components/dock/PodDebugSession.tsx +3 -1
- package/src/components/dock/TerminalTab.test.tsx +43 -3
- package/src/components/dock/TerminalTab.tsx +10 -1
- package/src/components/helm/HelmReleaseDrawer.tsx +1 -1
- package/src/components/helm/InstallWizard.tsx +1 -1
- package/src/components/home/NetworkPolicyCoverageCard.test.tsx +37 -0
- package/src/components/home/NetworkPolicyCoverageCard.tsx +26 -2
- package/src/components/home/mcpToolCatalog.ts +1 -1
- package/src/components/resources/PodEvictAction.test.tsx +951 -0
- package/src/components/resources/PodEvictAction.tsx +167 -0
- package/src/components/resources/ResourcesView.tsx +3 -0
- package/src/components/resources/renderers/TraefikIngressRouteRenderer.test.tsx +23 -0
- package/src/components/resources/renderers/TraefikIngressRouteRenderer.tsx +23 -0
- package/src/components/resources/renderers/TraefikMiddlewareRenderer.test.tsx +23 -0
- package/src/components/resources/renderers/TraefikMiddlewareRenderer.tsx +29 -0
- package/src/components/resources/renderers/WorkloadRenderer.tsx +3 -0
- package/src/components/settings/LocalConnectionSettings.tsx +4 -4
- package/src/components/settings/SettingsDialog.tsx +23 -18
- package/src/components/settings/integrationQueries.test.ts +98 -0
- package/src/components/settings/integrationQueries.ts +36 -0
- package/src/components/traffic/TrafficConnectionsTable.test.tsx +23 -0
- package/src/components/traffic/TrafficConnectionsTable.tsx +5 -4
- package/src/components/traffic/TrafficFilterSidebar.test.tsx +14 -0
- package/src/components/traffic/TrafficFilterSidebar.tsx +17 -0
- package/src/components/traffic/TrafficFlowList.tsx +5 -5
- package/src/components/traffic/TrafficGraph.test.tsx +11 -0
- package/src/components/traffic/TrafficGraph.tsx +31 -19
- package/src/components/traffic/TrafficView.reconnect.test.tsx +229 -0
- package/src/components/traffic/TrafficView.tsx +108 -41
- package/src/components/traffic/traffic-export.test.ts +8 -0
- package/src/components/traffic/traffic-export.ts +7 -4
- package/src/components/traffic/trafficFilters.test.ts +51 -1
- package/src/components/traffic/trafficFilters.ts +39 -11
- package/src/components/ui/Markdown.test.tsx +37 -0
- package/src/components/ui/Markdown.tsx +15 -2
- package/src/components/ui/command-items-crd.test.tsx +23 -8
- package/src/components/useContextSwitchFlow.test.tsx +27 -2
- package/src/components/useContextSwitchFlow.tsx +20 -22
- package/src/components/whats-new/releaseNotes.ts +75 -1
- package/src/components/workload/WorkloadView.tsx +16 -3
- package/src/integrations/resourceHosts.test.tsx +1 -1
- package/src/integrations/resourceHosts.tsx +3 -0
|
@@ -4,20 +4,35 @@ import { createRoot } from 'react-dom/client'
|
|
|
4
4
|
import { expect, it, vi } from 'vitest'
|
|
5
5
|
import { bestScore, useCommandItems } from './command-items'
|
|
6
6
|
vi.mock('../../api/client', () => ({ useNamespaces: () => ({ data: [] }), useContexts: () => ({ data: [] }) }))
|
|
7
|
-
vi.mock('../../api/apiResources', () => ({
|
|
7
|
+
vi.mock('../../api/apiResources', () => ({
|
|
8
|
+
CORE_RESOURCES: [],
|
|
9
|
+
useAPIResources: () => ({
|
|
10
|
+
data: [
|
|
11
|
+
{ group: 'apiextensions.k8s.io', kind: 'CustomResourceDefinition', name: 'customresourcedefinitions', verbs: ['list'] },
|
|
12
|
+
{ group: '', kind: 'Pod', name: 'pods', verbs: ['list'] },
|
|
13
|
+
{ group: 'policy', kind: 'PodDisruptionBudget', name: 'poddisruptionbudgets', verbs: ['list'], shortNames: ['pdb'] },
|
|
14
|
+
],
|
|
15
|
+
}),
|
|
16
|
+
}))
|
|
8
17
|
;(globalThis as any).IS_REACT_ACT_ENVIRONMENT = true
|
|
9
|
-
it('uses the shared CRD aliases in command items', () => {
|
|
10
|
-
let
|
|
18
|
+
it('uses the shared CRD aliases and discovered short names in command items', () => {
|
|
19
|
+
let crdScores: number[] = []
|
|
20
|
+
let pdbScores: number[] = []
|
|
11
21
|
function Probe() {
|
|
12
22
|
const cb = { onNavigateView: vi.fn(), onNavigateKind: vi.fn(), onSwitchContext: vi.fn(), onSetNamespaces: vi.fn(), onToggleTheme: vi.fn() }
|
|
13
|
-
const items = useCommandItems(cb)
|
|
14
|
-
|
|
23
|
+
const items = useCommandItems(cb).filter(i => i.category === 'Resource Kinds')
|
|
24
|
+
crdScores = items.map(i => bestScore(i, 'crd'))
|
|
25
|
+
pdbScores = items.map(i => bestScore(i, 'pdb'))
|
|
15
26
|
return null
|
|
16
27
|
}
|
|
17
28
|
const host = document.createElement('div'); const root = createRoot(host)
|
|
18
29
|
act(() => root.render(<Probe />))
|
|
19
|
-
expect(
|
|
20
|
-
expect(
|
|
21
|
-
expect(
|
|
30
|
+
expect(crdScores).toHaveLength(3)
|
|
31
|
+
expect(crdScores[0]).toBeGreaterThan(0)
|
|
32
|
+
expect(crdScores[1]).toBe(0)
|
|
33
|
+
expect(crdScores[2]).toBe(0)
|
|
34
|
+
expect(pdbScores[0]).toBe(0)
|
|
35
|
+
expect(pdbScores[1]).toBe(0)
|
|
36
|
+
expect(pdbScores[2]).toBeGreaterThanOrEqual(100)
|
|
22
37
|
act(() => root.unmount())
|
|
23
38
|
})
|
|
@@ -9,10 +9,11 @@ const mocks = vi.hoisted(() => ({
|
|
|
9
9
|
mutateAsync: vi.fn(),
|
|
10
10
|
setFailedSwitch: vi.fn(),
|
|
11
11
|
startSwitch: vi.fn(),
|
|
12
|
+
counts: { portForwards: 0, execSessions: 0, localTerminals: 0, total: 0 },
|
|
12
13
|
}))
|
|
13
14
|
vi.mock('../api/client', () => ({
|
|
14
15
|
useSwitchContext: () => ({ mutateAsync: mocks.mutateAsync, isPending: false, isError: false, error: null }),
|
|
15
|
-
fetchSessionCounts: async () =>
|
|
16
|
+
fetchSessionCounts: async () => mocks.counts,
|
|
16
17
|
SwitchContextError: class extends Error {},
|
|
17
18
|
}))
|
|
18
19
|
vi.mock('../context/ConnectionContext', () => ({ useConnection: () => ({ connection: mocks.connection }) }))
|
|
@@ -25,7 +26,6 @@ vi.mock('../context/ContextSwitchContext', () => ({
|
|
|
25
26
|
}),
|
|
26
27
|
}))
|
|
27
28
|
vi.mock('./ui/Toast', () => ({ useToast: () => ({ showError: vi.fn() }) }))
|
|
28
|
-
vi.mock('./dock', () => ({ useDock: () => ({ tabs: [] }) }))
|
|
29
29
|
|
|
30
30
|
const { useContextSwitchFlow } = await import('./useContextSwitchFlow')
|
|
31
31
|
|
|
@@ -42,6 +42,7 @@ function Probe() {
|
|
|
42
42
|
beforeEach(() => {
|
|
43
43
|
vi.clearAllMocks()
|
|
44
44
|
mocks.connection.errorType = undefined
|
|
45
|
+
mocks.counts = { portForwards: 0, execSessions: 0, localTerminals: 0, total: 0 }
|
|
45
46
|
root = createRoot(document.createElement('div'))
|
|
46
47
|
act(() => root.render(<Probe />))
|
|
47
48
|
})
|
|
@@ -67,4 +68,28 @@ describe('useContextSwitchFlow', () => {
|
|
|
67
68
|
await act(() => flow().requestSwitch(ctx('staging', false)))
|
|
68
69
|
expect(mocks.mutateAsync).toHaveBeenCalledWith({ name: 'staging' })
|
|
69
70
|
})
|
|
71
|
+
|
|
72
|
+
it('asks first only for the live sessions a switch ends, as the server counts them', async () => {
|
|
73
|
+
mocks.counts = { portForwards: 0, execSessions: 0, localTerminals: 2, total: 2 }
|
|
74
|
+
await act(() => flow().requestSwitch(ctx('staging', false)))
|
|
75
|
+
expect(mocks.mutateAsync).toHaveBeenCalledTimes(1)
|
|
76
|
+
|
|
77
|
+
for (const counts of [
|
|
78
|
+
{ portForwards: 1, execSessions: 1, localTerminals: 0, total: 2 },
|
|
79
|
+
{ portForwards: 0, execSessions: 1, localTerminals: 0, total: 1 },
|
|
80
|
+
{ portForwards: 1, execSessions: 0, localTerminals: 0, total: 1 },
|
|
81
|
+
]) {
|
|
82
|
+
mocks.mutateAsync.mockClear()
|
|
83
|
+
mocks.counts = counts
|
|
84
|
+
await act(() => flow().requestSwitch(ctx('staging', false)))
|
|
85
|
+
expect(mocks.mutateAsync).not.toHaveBeenCalled()
|
|
86
|
+
const host = document.body.appendChild(document.createElement('div'))
|
|
87
|
+
const dialog = createRoot(host)
|
|
88
|
+
act(() => dialog.render(<>{flow().confirmDialog}</>))
|
|
89
|
+
expect(document.body.textContent?.includes('1 terminal session')).toBe(counts.execSessions === 1)
|
|
90
|
+
expect(document.body.textContent?.includes('1 port forward')).toBe(counts.portForwards === 1)
|
|
91
|
+
act(() => dialog.unmount())
|
|
92
|
+
host.remove()
|
|
93
|
+
}
|
|
94
|
+
})
|
|
70
95
|
})
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { useLayoutEffect, useState, type ReactNode } from 'react'
|
|
1
|
+
import { useId, useLayoutEffect, useState, type ReactNode } from 'react'
|
|
2
2
|
import { AlertTriangle } from 'lucide-react'
|
|
3
|
-
import { pluralize } from '@skyhook-io/k8s-ui'
|
|
3
|
+
import { DialogPortal, pluralize } from '@skyhook-io/k8s-ui'
|
|
4
4
|
import { useSwitchContext, fetchSessionCounts, SwitchContextError, type SessionCounts } from '../api/client'
|
|
5
5
|
import { finishSwitch, followSwitch, followingSwitch, switchInProgress, useTrackedContextSwitch } from '../api/contextSwitch'
|
|
6
6
|
import { useConnection } from '../context/ConnectionContext'
|
|
7
7
|
import { useContextSwitch } from '../context/ContextSwitchContext'
|
|
8
8
|
import { useToast } from './ui/Toast'
|
|
9
9
|
import { Tooltip } from './ui/Tooltip'
|
|
10
|
-
import { useDock } from './dock'
|
|
11
10
|
import type { ContextInfo, SelectedResource } from '../types'
|
|
12
11
|
import { parseContextForSwitcher } from '../utils/context-name'
|
|
13
12
|
|
|
@@ -36,8 +35,10 @@ export function useContextSwitchFlow() {
|
|
|
36
35
|
const switchContext = useSwitchContext()
|
|
37
36
|
const { isSwitching, startSwitch, endSwitch, setOpenAfterSwitch, setFailedSwitch } = useContextSwitch()
|
|
38
37
|
const { showError } = useToast()
|
|
39
|
-
const { tabs } = useDock()
|
|
40
38
|
const [pending, setPending] = useState<PendingSwitch | null>(null)
|
|
39
|
+
// Separate from `pending`, which the dialog keeps showing while it animates out.
|
|
40
|
+
const [confirming, setConfirming] = useState(false)
|
|
41
|
+
const titleId = useId()
|
|
41
42
|
const [sessionCounts, setSessionCounts] = useState<SessionCounts | null>(null)
|
|
42
43
|
|
|
43
44
|
const performSwitch = async ({ context, openAfter }: PendingSwitch) => {
|
|
@@ -74,15 +75,15 @@ export function useContextSwitchFlow() {
|
|
|
74
75
|
setFailedSwitch(null)
|
|
75
76
|
return
|
|
76
77
|
}
|
|
77
|
-
//
|
|
78
|
-
// a confirmation
|
|
78
|
+
// A switch ends the connection's port forwards and Pod and node terminals,
|
|
79
|
+
// so live ones get a confirmation. Local host terminals survive it.
|
|
79
80
|
try {
|
|
80
81
|
const counts = await fetchSessionCounts()
|
|
81
|
-
const
|
|
82
|
-
const total = counts.portForwards + terminalTabs
|
|
82
|
+
const total = counts.portForwards + counts.execSessions
|
|
83
83
|
if (total > 0) {
|
|
84
|
-
setSessionCounts({ ...counts,
|
|
84
|
+
setSessionCounts({ ...counts, total })
|
|
85
85
|
setPending({ context, openAfter })
|
|
86
|
+
setConfirming(true)
|
|
86
87
|
return
|
|
87
88
|
}
|
|
88
89
|
} catch (error) {
|
|
@@ -99,21 +100,18 @@ export function useContextSwitchFlow() {
|
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
const confirm = () => {
|
|
102
|
-
if (pending) performSwitch(pending)
|
|
103
|
-
|
|
103
|
+
if (confirming && pending) performSwitch(pending)
|
|
104
|
+
setConfirming(false)
|
|
104
105
|
}
|
|
105
106
|
|
|
106
|
-
const cancel = () =>
|
|
107
|
-
setPending(null)
|
|
108
|
-
setSessionCounts(null)
|
|
109
|
-
}
|
|
107
|
+
const cancel = () => setConfirming(false)
|
|
110
108
|
|
|
111
|
-
const confirmDialog: ReactNode =
|
|
112
|
-
<
|
|
113
|
-
|
|
109
|
+
const confirmDialog: ReactNode = (
|
|
110
|
+
<DialogPortal open={confirming} onClose={cancel} className="w-full max-w-md" ariaLabelledBy={titleId}>
|
|
111
|
+
{pending && sessionCounts && <>
|
|
114
112
|
<div className="px-4 py-3 border-b border-theme-border flex items-center gap-2">
|
|
115
113
|
<AlertTriangle className="w-5 h-5 text-amber-400" />
|
|
116
|
-
<
|
|
114
|
+
<h2 id={titleId} className="font-medium text-theme-text-primary">Active Sessions</h2>
|
|
117
115
|
</div>
|
|
118
116
|
<div className="px-4 py-4">
|
|
119
117
|
<p className="text-sm text-theme-text-secondary mb-3">
|
|
@@ -154,9 +152,9 @@ export function useContextSwitchFlow() {
|
|
|
154
152
|
Switch Anyway
|
|
155
153
|
</button>
|
|
156
154
|
</div>
|
|
157
|
-
|
|
158
|
-
</
|
|
159
|
-
)
|
|
155
|
+
</>}
|
|
156
|
+
</DialogPortal>
|
|
157
|
+
)
|
|
160
158
|
|
|
161
159
|
return {
|
|
162
160
|
requestSwitch,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LucideIcon } from 'lucide-react'
|
|
2
|
-
import { Activity, BellOff, Bot, Boxes, Braces, Database, GitBranch, GitCompareArrows, HardDrive, Hourglass, Layers, MessageCircleQuestionMark, Network, RefreshCcw, Scale, ScanSearch, ScrollText, Search, ShieldAlert, SlidersHorizontal, Undo2, Zap } from 'lucide-react'
|
|
2
|
+
import { Activity, BellOff, Bot, Boxes, Braces, Bug, ChartLine, Database, Download, GitBranch, GitCompareArrows, HardDrive, History, Hourglass, Layers, MessageCircleQuestionMark, Network, RefreshCcw, Scale, ScanSearch, ScrollText, Search, ShieldAlert, SlidersHorizontal, Undo2, Zap } from 'lucide-react'
|
|
3
3
|
import { compareVersions } from '../../utils/version'
|
|
4
4
|
|
|
5
5
|
export interface ReleaseHighlight {
|
|
@@ -48,6 +48,80 @@ export const CHANGELOG_URL = 'https://radarhq.io/changelog'
|
|
|
48
48
|
// major release must have its own entry: scripts/check-whats-new.sh refuses to
|
|
49
49
|
// release one without it.
|
|
50
50
|
export const RELEASE_NOTES: ReleaseNotes[] = [
|
|
51
|
+
{
|
|
52
|
+
version: 'v1.22.0',
|
|
53
|
+
highlights: [
|
|
54
|
+
{
|
|
55
|
+
id: 'app-deploys-timeline',
|
|
56
|
+
icon: History,
|
|
57
|
+
title: 'Detailed deployment and rollout history for applications and workloads',
|
|
58
|
+
description: 'Applications get a Deploys tab (Helm, Flux and Argo CD, with Argo sync diffs) and a richer Timeline; workloads get a Revisions tab to diff specs.',
|
|
59
|
+
leadDescription: "The Timeline tab in Applications now puts deploys, config changes and problems in one view. A new Deploys tab tracks Helm releases, Flux history and Argo CD syncs (with inline rendered diffs when the Argo CD API is connected), and a new Revisions tab on workloads lets you diff pod templates even when the image tag didn't change.",
|
|
60
|
+
importance: 7,
|
|
61
|
+
path: '/applications',
|
|
62
|
+
cta: 'Open Applications',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'new-integration-views',
|
|
66
|
+
icon: Boxes,
|
|
67
|
+
title: 'New integrations: MetalLB, Longhorn and k3s',
|
|
68
|
+
description: 'MetalLB pools, peers and config Issues; Longhorn Volumes with live replicas, PV links and Issues; and k3s/RKE2 HelmChart badges and drawers.',
|
|
69
|
+
importance: 7,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'issues-recent-changes',
|
|
73
|
+
icon: GitCompareArrows,
|
|
74
|
+
title: 'See what changed before an issue started',
|
|
75
|
+
description: 'Issue rows and expanded details show recent changes before failure, and related issues group into one panel per application.',
|
|
76
|
+
importance: 7,
|
|
77
|
+
path: '/issues',
|
|
78
|
+
cta: 'Open Issues',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'vulnerabilities-exposure-csv',
|
|
82
|
+
icon: ShieldAlert,
|
|
83
|
+
title: 'Prioritize exposed CVEs and export CSV',
|
|
84
|
+
description: 'Sort CVEs by severity then external exposure, filter exposed workloads in UI or MCP, export full CSVs, and scan private Amazon ECR for Java4Shell.',
|
|
85
|
+
importance: 7,
|
|
86
|
+
path: '/checks/vulnerabilities',
|
|
87
|
+
cta: 'Open Vulnerabilities',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'export-graphs',
|
|
91
|
+
icon: Download,
|
|
92
|
+
title: 'Export graphs to SVG and draw.io',
|
|
93
|
+
description: 'Export Topology and Live Traffic as editable draw.io diagrams with K8s icons and namespace containers, vector SVG, or theme-matched images.',
|
|
94
|
+
importance: 6,
|
|
95
|
+
path: '/topology',
|
|
96
|
+
cta: 'Open Topology',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'better-pod-log-secret-debugging',
|
|
100
|
+
icon: Bug,
|
|
101
|
+
title: 'Better Pod, log and Secret debugging',
|
|
102
|
+
description: 'Start and reopen custom-image debug containers right from Pod details, stream ReplicaSet logs, copy Secret values unrevealed, and read any cert key.',
|
|
103
|
+
importance: 6,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 'more-metrics-sources',
|
|
107
|
+
icon: ChartLine,
|
|
108
|
+
title: 'OpenObserve, GKE and shared metrics stores',
|
|
109
|
+
description: 'Connect local Radar to shared OpenObserve, chart GKE system metrics via Managed Prometheus, and keep shared multi-cluster stores scoped cleanly.',
|
|
110
|
+
importance: 6,
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
improvements: [
|
|
114
|
+
// The grid fills row by row: pair lines of similar length.
|
|
115
|
+
'Match kubectl short names in the kind filter and Cmd-K, and see other-namespace counts on empty lists',
|
|
116
|
+
'GitOps actions check missing permissions upfront and explain RBAC or admission refusals',
|
|
117
|
+
'Flux flags sources ahead of what is applied, builds Activity from history, and follows ArtifactGenerators and dependsOn',
|
|
118
|
+
'Traefik IngressRoute drawers show each rule path to ready backends, cert expiry and Middleware usage',
|
|
119
|
+
'Stop or terminate Argo Workflows and submit WorkflowTemplates right from Radar',
|
|
120
|
+
'Remote MCP clients can sign in with OAuth on standalone OIDC installs (--mcp-oauth / mcp.oauth.enabled)',
|
|
121
|
+
'Beyla Live Traffic infers ports from Services and lets you hide node-to-node overlay UDP',
|
|
122
|
+
'CloudNativePG Clusters gain a fleet backup/HA posture bar with one-click filters',
|
|
123
|
+
],
|
|
124
|
+
},
|
|
51
125
|
{
|
|
52
126
|
version: 'v1.21.0',
|
|
53
127
|
highlights: [
|
|
@@ -113,11 +113,13 @@ import { RightsizingStrip } from '../resource/RightsizingStrip'
|
|
|
113
113
|
import { PrometheusChartsGrid } from '../resource/PrometheusChartsGrid'
|
|
114
114
|
import { DatadogSetupHint, DatadogWorkloadCharts, useDatadogWorkloadCharts, WorkloadCostRightsizing } from '../resource/DatadogWorkloadCharts'
|
|
115
115
|
import { PodDebugAction, usePodDetailAccess, type PodDebugTarget } from '../resources/PodDebugAction'
|
|
116
|
+
import { PodEvictAction, podEvictAccessKey, type PodEvictTarget } from '../resources/PodEvictAction'
|
|
116
117
|
import { useNavCustomization } from '../../context/NavCustomization'
|
|
117
118
|
import { RestartEventLane } from '../resource/RestartChart'
|
|
118
119
|
import { WorkloadCostTab } from '../cost/WorkloadCostTab'
|
|
119
120
|
import { isOpenCostWorkloadKind } from '../cost/kinds'
|
|
120
121
|
import { isRadarFeatureUnsupported } from '../../api/radarFeatures'
|
|
122
|
+
import { useResourceActionAdapter } from '../../api/resourceActions'
|
|
121
123
|
import { useTrafficAvailable } from '../../api/traffic'
|
|
122
124
|
import { useIssueExpansion, useIssueRowNotes } from '../issues/useIssueExpansion'
|
|
123
125
|
import { isNotFoundError, useResourceAudit, useResourceIssues, useSubjectIssues, useRadarFeature, useTrace, fetchTraceWithProbes, fetchInClusterCapability, runInClusterMerged } from '../../api/client'
|
|
@@ -343,7 +345,8 @@ function useActionsBarProps(
|
|
|
343
345
|
group: string | undefined,
|
|
344
346
|
cascadeEnabled: boolean,
|
|
345
347
|
nodeUID: string,
|
|
346
|
-
pod?: PodDebugTarget,
|
|
348
|
+
pod?: PodDebugTarget & PodEvictTarget,
|
|
349
|
+
podEvictEnabled = true,
|
|
347
350
|
) {
|
|
348
351
|
const [deletePreviewOpen, setDeletePreviewOpen] = useState(false)
|
|
349
352
|
const { showCopied } = useToast()
|
|
@@ -362,6 +365,7 @@ function useActionsBarProps(
|
|
|
362
365
|
const showPortForward = canPortForward || !isLocal
|
|
363
366
|
|
|
364
367
|
const deleteMutation = useDeleteResource()
|
|
368
|
+
const resourceActionAdapter = useResourceActionAdapter()
|
|
365
369
|
const restartWorkloadMutation = useRestartWorkload()
|
|
366
370
|
const pauseDeploymentMutation = usePauseDeployment()
|
|
367
371
|
const resumeDeploymentMutation = useResumeDeployment()
|
|
@@ -392,8 +396,13 @@ function useActionsBarProps(
|
|
|
392
396
|
const { support: replicaSetLogSupport } = useRadarFeature('replicaSetLogs')
|
|
393
397
|
const isAppsReplicaSet = kind === 'replicasets' && group === 'apps'
|
|
394
398
|
const { support: deploymentPauseSupport } = useRadarFeature('deploymentPause')
|
|
399
|
+
const deploymentPauseAvailable =
|
|
400
|
+
deploymentPauseSupport === 'supported' ||
|
|
401
|
+
(resourceActionAdapter.support === 'supported' &&
|
|
402
|
+
resourceActionAdapter.supportsAction('apps/Deployment/pause') &&
|
|
403
|
+
resourceActionAdapter.supportsAction('apps/Deployment/resume'))
|
|
395
404
|
const canPauseDeployments = !workloadWritesPending &&
|
|
396
|
-
canPauseDeployment({ name: kind, group }, workloadWrites,
|
|
405
|
+
canPauseDeployment({ name: kind, group }, workloadWrites, deploymentPauseAvailable)
|
|
397
406
|
const cronJobPermissionsReady = kind === 'cronjobs' && group === 'batch' && !workloadWritesPending
|
|
398
407
|
const allowCronJobTrigger = cronJobPermissionsReady && canTriggerCronJob(workloadWrites)
|
|
399
408
|
const allowCronJobSuspend = cronJobPermissionsReady && canSuspendCronJob(workloadWrites)
|
|
@@ -457,6 +466,7 @@ function useActionsBarProps(
|
|
|
457
466
|
canPortForward: showPortForward,
|
|
458
467
|
onOpenTerminal: openTerminal,
|
|
459
468
|
podDebugAction: pod && <PodDebugAction key={pod.metadata.uid} pod={pod} defaultImage={debugImage} unverifiedReview={unverifiedReview} debugDenial={debugDenial} reviewStatus={reviewStatus} />,
|
|
469
|
+
podEvictAction: pod && <PodEvictAction pod={pod} adapter={resourceActionAdapter} enabled={podEvictEnabled} />,
|
|
460
470
|
onOpenLogs: openLogs,
|
|
461
471
|
onOpenWorkloadLogs: openWorkloadLogs,
|
|
462
472
|
replicaSetLogs: isAppsReplicaSet && replicaSetLogSupport === 'supported',
|
|
@@ -496,6 +506,7 @@ function useActionsBarProps(
|
|
|
496
506
|
restartWorkloadMutation.mutate(params)
|
|
497
507
|
: undefined,
|
|
498
508
|
isRestarting: restartWorkloadMutation.isPending,
|
|
509
|
+
resourceActionAdapter,
|
|
499
510
|
onPauseDeployment: canPauseDeployments
|
|
500
511
|
? (params: Parameters<typeof pauseDeploymentMutation.mutate>[0]) =>
|
|
501
512
|
pauseDeploymentMutation.mutate(params)
|
|
@@ -728,6 +739,7 @@ export function WorkloadView({
|
|
|
728
739
|
...(apiKind === 'pods' && !effectiveGroup && resource?.metadata?.uid ? [
|
|
729
740
|
queryClient.invalidateQueries({queryKey: ['capabilities', namespace], exact: true}),
|
|
730
741
|
queryClient.invalidateQueries({queryKey: podDebugAccessKey(namespace, name, resource.metadata.uid)}),
|
|
742
|
+
queryClient.invalidateQueries({queryKey: podEvictAccessKey(namespace, name, resource.metadata.uid)}),
|
|
731
743
|
] : []),
|
|
732
744
|
...(apiKind === 'rayjobs' && effectiveGroup === 'ray.io' ? [
|
|
733
745
|
queryClient.refetchQueries({ queryKey: ['resource', 'jobs', namespace, name, 'batch'], type: 'active' }),
|
|
@@ -936,7 +948,8 @@ export function WorkloadView({
|
|
|
936
948
|
effectiveGroup,
|
|
937
949
|
!resourceLoading && Boolean(resource),
|
|
938
950
|
apiKind === 'nodes' && !effectiveGroup ? resource?.metadata?.uid ?? '' : '',
|
|
939
|
-
apiKind === 'pods' && resource?.apiVersion === 'v1' && resource?.kind === 'Pod' ? resource : undefined,
|
|
951
|
+
apiKind === 'pods' && !effectiveGroup && resource?.apiVersion === 'v1' && resource?.kind === 'Pod' && resource?.metadata?.namespace === namespace && resource?.metadata?.name === name ? resource : undefined,
|
|
952
|
+
rest.active !== false && !resourceLoading && !isNotFoundError(resourceError),
|
|
940
953
|
)
|
|
941
954
|
const desktopDownload = useDesktopDownload()
|
|
942
955
|
|
|
@@ -55,7 +55,7 @@ describe('application resource hosts', () => {
|
|
|
55
55
|
'RolloutRenderer', 'KyvernoPolicyCoverage', 'KyvernoPolicyQueued', 'CNPGObjectStoreRenderer',
|
|
56
56
|
'VeleroBSLRenderer', 'VeleroBackupRenderer', 'VeleroRestoreRenderer', 'CNPGClusterRenderer',
|
|
57
57
|
'CNPGDatabaseRenderer', 'CNPGPublicationRenderer', 'CNPGSubscriptionRenderer', 'CNPGImageCatalogRenderer',
|
|
58
|
-
'FluxHelmReleaseRenderer', 'OpenTelemetryCollectorRenderer', 'ValidatingAdmissionPolicyRenderer', 'ValidatingAdmissionPolicyBindingRenderer', 'MutatingAdmissionPolicyRenderer', 'MutatingAdmissionPolicyBindingRenderer', 'SecretProviderClassRenderer', 'UpgradePlanRenderer', 'SealedSecretRenderer', 'K3sHelmChartRenderer',
|
|
58
|
+
'FluxHelmReleaseRenderer', 'OpenTelemetryCollectorRenderer', 'ValidatingAdmissionPolicyRenderer', 'ValidatingAdmissionPolicyBindingRenderer', 'MutatingAdmissionPolicyRenderer', 'MutatingAdmissionPolicyBindingRenderer', 'SecretProviderClassRenderer', 'UpgradePlanRenderer', 'SealedSecretRenderer', 'K3sHelmChartRenderer', 'TraefikIngressRouteRenderer', 'TraefikMiddlewareRenderer',
|
|
59
59
|
].sort())
|
|
60
60
|
const inherited = [{ id: 'local', label: 'Local', render: () => null }]
|
|
61
61
|
expect(resourceDetailSlots({ kind: 'Pod', group: '', namespace: 'db', name: 'pg-1' }, inherited).extraTabs).toEqual(inherited)
|
|
@@ -41,6 +41,8 @@ import { LonghornVolumeRenderer } from '../components/resources/renderers/Longho
|
|
|
41
41
|
import { FluxHelmReleaseRenderer } from '../components/resources/renderers/FluxHelmReleaseRenderer'
|
|
42
42
|
import { SecretProviderClassRenderer } from '../components/resources/renderers/SecretProviderClassRenderer'
|
|
43
43
|
import { SealedSecretRenderer } from '../components/resources/renderers/SealedSecretRenderer'
|
|
44
|
+
import { TraefikIngressRouteRenderer } from '../components/resources/renderers/TraefikIngressRouteRenderer'
|
|
45
|
+
import { TraefikMiddlewareRenderer } from '../components/resources/renderers/TraefikMiddlewareRenderer'
|
|
44
46
|
import { K3sHelmChartRenderer } from '../components/resources/renderers/K3sHelmChartRenderer'
|
|
45
47
|
import { UpgradePlanRenderer } from '../components/resources/renderers/UpgradePlanRenderer'
|
|
46
48
|
import {
|
|
@@ -55,6 +57,7 @@ export const resourceHosts: readonly ResourceHost[] = [
|
|
|
55
57
|
{ id: 'gateway-api', renderers: { HTTPRouteRenderer } },
|
|
56
58
|
{ id: 'rbac', renderers: { ServiceAccountRenderer, RoleRenderer, RoleBindingRenderer, NamespaceRenderer } },
|
|
57
59
|
{ id: 'sealed-secrets', renderers: { SealedSecretRenderer } },
|
|
60
|
+
{ id: 'traefik', renderers: { TraefikIngressRouteRenderer, TraefikMiddlewareRenderer } },
|
|
58
61
|
{ id: 'k3s-helm', renderers: { K3sHelmChartRenderer } },
|
|
59
62
|
{ id: 'system-upgrade', renderers: { UpgradePlanRenderer } },
|
|
60
63
|
{ id: 'batch-and-admission', renderers: { JobRenderer, JobSetRenderer, KueueWorkloadRenderer } },
|