@skyhook-io/radar-app 1.20.0 → 1.20.3

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.
Files changed (109) hide show
  1. package/package.json +1 -1
  2. package/src/App.tsx +18 -11
  3. package/src/api/client.namespaceSwitch.hook.test.tsx +170 -1
  4. package/src/api/client.pauseDeployment.test.tsx +77 -0
  5. package/src/api/client.restartError.test.ts +14 -0
  6. package/src/api/client.revisionRefresh.test.tsx +44 -0
  7. package/src/api/client.rollbackError.test.ts +14 -0
  8. package/src/api/client.ts +287 -21
  9. package/src/api/helmInventory.test.tsx +108 -0
  10. package/src/api/networkAttachments.test.tsx +120 -0
  11. package/src/api/networkAttachments.ts +30 -0
  12. package/src/api/radarFeatures.test.ts +5 -0
  13. package/src/api/radarFeatures.ts +5 -0
  14. package/src/api/secretsStore.test.ts +33 -0
  15. package/src/api/secretsStore.ts +37 -0
  16. package/src/components/ConnectionErrorView.test.tsx +11 -0
  17. package/src/components/ConnectionErrorView.tsx +19 -0
  18. package/src/components/ContextSwitcher.tsx +9 -2
  19. package/src/components/applications/ApplicationsView.openResource.test.tsx +118 -0
  20. package/src/components/applications/ApplicationsView.tsx +8 -11
  21. package/src/components/cost/CostView.tsx +27 -9
  22. package/src/components/curl/ServiceCurlAvailability.test.tsx +32 -0
  23. package/src/components/curl/ServiceCurlButton.tsx +2 -2
  24. package/src/components/diagnose/InvestigationView.tsx +12 -3
  25. package/src/components/diagnose/investigationCase.test.tsx +41 -0
  26. package/src/components/diagnose/investigationEvidence/adapters/coverage.test.tsx +72 -0
  27. package/src/components/diagnose/investigationEvidence/adapters/helm.test.tsx +52 -0
  28. package/src/components/diagnose/investigationEvidence/adapters/helm.ts +61 -16
  29. package/src/components/diagnose/investigationEvidence/adapters/listings.ts +34 -4
  30. package/src/components/diagnose/investigationEvidence/adapters/resource.ts +3 -2
  31. package/src/components/diagnose/investigationEvidence/bodies/platform.tsx +82 -51
  32. package/src/components/diagnose/investigationEvidence/types.ts +5 -0
  33. package/src/components/dock/TerminalPreferences.query.test.tsx +57 -0
  34. package/src/components/dock/TerminalPreferences.test.tsx +68 -0
  35. package/src/components/dock/TerminalPreferences.tsx +73 -0
  36. package/src/components/gitops/GitOpsView.tsx +1 -9
  37. package/src/components/helm/HelmDrawerFrame.tsx +101 -0
  38. package/src/components/helm/HelmDrawerRouting.test.tsx +86 -0
  39. package/src/components/helm/HelmReleaseDrawer.tsx +47 -98
  40. package/src/components/helm/HelmView.tsx +215 -71
  41. package/src/components/helm/NotCheckedBadge.test.tsx +62 -0
  42. package/src/components/helm/NotCheckedBadge.tsx +39 -0
  43. package/src/components/helm/ObservedHelmNotice.tsx +146 -0
  44. package/src/components/helm/ObservedHelmRelease.test.tsx +261 -0
  45. package/src/components/helm/ObservedHelmReleaseDrawer.test.tsx +80 -0
  46. package/src/components/helm/ObservedHelmReleaseDrawer.tsx +228 -0
  47. package/src/components/helm/OwnedResources.test.tsx +86 -0
  48. package/src/components/helm/OwnedResources.tsx +69 -10
  49. package/src/components/home/ClusterHealthCard.heading.test.tsx +72 -0
  50. package/src/components/home/ClusterHealthCard.restricted.test.tsx +76 -0
  51. package/src/components/home/ClusterHealthCard.test.ts +44 -1
  52. package/src/components/home/ClusterHealthCard.tsx +49 -14
  53. package/src/components/home/HelmSummary.tsx +38 -19
  54. package/src/components/home/HelmSummary.unread.test.ts +16 -0
  55. package/src/components/home/HomeAgentBlock.tsx +7 -0
  56. package/src/components/home/MCPSetupDialog.test.tsx +38 -12
  57. package/src/components/home/MCPSetupDialog.tsx +5 -2
  58. package/src/components/home/mcpToolCatalog.ts +45 -5
  59. package/src/components/issues/uncheckedSources.test.ts +2 -0
  60. package/src/components/issues/uncheckedSources.ts +3 -0
  61. package/src/components/resource/RightsizingStrip.test.ts +57 -0
  62. package/src/components/resource/RightsizingStrip.tsx +53 -4
  63. package/src/components/resources/ImageFilesystemModal.test.tsx +74 -6
  64. package/src/components/resources/ImageFilesystemModal.tsx +98 -6
  65. package/src/components/resources/PodFileUploadPanel.tsx +150 -0
  66. package/src/components/resources/PodFilesystemModal.tsx +246 -3
  67. package/src/components/resources/pod-file-upload.test.tsx +223 -0
  68. package/src/components/resources/pod-file-upload.ts +266 -0
  69. package/src/components/resources/renderers/HTTPRouteRenderer.test.tsx +50 -0
  70. package/src/components/resources/renderers/HTTPRouteRenderer.tsx +27 -0
  71. package/src/components/resources/renderers/PodRenderer.tsx +26 -1
  72. package/src/components/resources/renderers/SecretProviderClassRenderer.tsx +25 -0
  73. package/src/components/resources/renderers/ServiceRenderer.test.tsx +15 -2
  74. package/src/components/resources/renderers/ServiceRenderer.tsx +1 -1
  75. package/src/components/resources/renderers/ValidatingAdmissionPolicyRenderer.test.tsx +160 -0
  76. package/src/components/resources/renderers/ValidatingAdmissionPolicyRenderer.tsx +128 -0
  77. package/src/components/rightsizing/RightsizingScanView.tsx +16 -1
  78. package/src/components/rightsizing/model.test.ts +11 -0
  79. package/src/components/rightsizing/model.ts +3 -1
  80. package/src/components/rightsizing/presentation.test.ts +46 -0
  81. package/src/components/rightsizing/presentation.ts +17 -2
  82. package/src/components/traffic/TrafficView.tsx +27 -27
  83. package/src/components/traffic/trafficFilters.test.ts +18 -1
  84. package/src/components/traffic/trafficFilters.ts +30 -1
  85. package/src/components/ui/Omnibar.tsx +4 -1
  86. package/src/components/ui/RadarOmnibar.test.tsx +55 -2
  87. package/src/components/ui/RadarOmnibar.tsx +7 -1
  88. package/src/components/ui/SearchSyntaxHelp.test.tsx +9 -2
  89. package/src/components/ui/SearchSyntaxHelp.tsx +3 -2
  90. package/src/components/ui/UpdateNotification.test.tsx +23 -1
  91. package/src/components/ui/UpdateNotification.tsx +26 -2
  92. package/src/components/ui/omnibar-match.test.ts +7 -0
  93. package/src/components/ui/omnibar-match.ts +1 -0
  94. package/src/components/ui/searchCoverageNote.test.ts +17 -0
  95. package/src/components/ui/searchCoverageNote.ts +31 -7
  96. package/src/components/useContextSwitchFlow.tsx +9 -1
  97. package/src/components/whats-new/releaseNotes.ts +1 -1
  98. package/src/components/workload/NodeCertificateEvidence.test.tsx +51 -0
  99. package/src/components/workload/NodeCertificateEvidence.tsx +44 -0
  100. package/src/components/workload/WorkloadView.tsx +51 -11
  101. package/src/context/ConnectionContext.test.ts +1 -0
  102. package/src/context/ConnectionContext.tsx +2 -2
  103. package/src/contexts/CapabilitiesContext.tsx +2 -0
  104. package/src/hooks/useResolvedGitOpsOwner.test.ts +22 -0
  105. package/src/hooks/useResolvedGitOpsOwner.ts +6 -3
  106. package/src/integrations/resourceHosts.test.tsx +2 -2
  107. package/src/integrations/resourceHosts.tsx +9 -0
  108. package/src/utils/namespacePick.test.ts +87 -0
  109. package/src/utils/namespacePick.ts +88 -0
@@ -8,6 +8,7 @@ import { isTouchIntent } from '@skyhook-io/k8s-ui'
8
8
  const OPERATORS: { syntax: string; desc: string }[] = [
9
9
  { syntax: 'ns:prod', desc: 'filter by namespace' },
10
10
  { syntax: 'kind:Deployment', desc: 'filter by resource kind' },
11
+ { syntax: 'kind:Event', desc: 'search Events by name' },
11
12
  { syntax: 'label:app=api', desc: 'filter by label' },
12
13
  { syntax: 'image:nginx', desc: 'match container image' },
13
14
  { syntax: 'redis cache', desc: 'multiple terms — all must match' },
@@ -21,7 +22,7 @@ const OPERATORS: { syntax: string; desc: string }[] = [
21
22
  // that just opened the search box, so hover ignores a tap's side effects. A
22
23
  // click (a tap, or assistive-technology activation) toggles the card, except
23
24
  // right after a mouse hover opened it; a tap elsewhere closes it.
24
- export function SearchSyntaxHelp() {
25
+ export function SearchSyntaxHelp({ eventContentSearch = false }: { eventContentSearch?: boolean }) {
25
26
  const [open, setOpen] = useState(false)
26
27
  const btnRef = useRef<HTMLButtonElement>(null)
27
28
  const popRef = useRef<HTMLDivElement>(null)
@@ -95,7 +96,7 @@ export function SearchSyntaxHelp() {
95
96
  {OPERATORS.map((op) => (
96
97
  <div key={op.syntax} className="flex items-baseline gap-2">
97
98
  <code className="shrink-0 rounded bg-theme-elevated border border-theme-border-light px-1.5 py-0.5 text-xs text-theme-text-primary">{op.syntax}</code>
98
- <span className="text-xs text-theme-text-secondary">{op.desc}</span>
99
+ <span className="text-xs text-theme-text-secondary">{op.syntax === 'kind:Event' && eventContentSearch ? 'search Event reasons and messages' : op.desc}</span>
99
100
  </div>
100
101
  ))}
101
102
  </div>
@@ -3,6 +3,8 @@ import { renderToString } from 'react-dom/server'
3
3
  import { beforeEach, describe, expect, it, vi } from 'vitest'
4
4
 
5
5
  let deploymentMode = 'local'
6
+ let installMethod = 'direct'
7
+ let manualUpdate: 'appimage' | 'package' | 'download' | undefined
6
8
 
7
9
  vi.mock('../../api/client', () => ({
8
10
  useCapabilities: () => ({ data: { deployment: { mode: deploymentMode } } }),
@@ -11,7 +13,8 @@ vi.mock('../../api/client', () => ({
11
13
  currentVersion: '1.2.3',
12
14
  latestVersion: '1.3.0',
13
15
  updateAvailable: true,
14
- installMethod: 'direct',
16
+ installMethod,
17
+ manualUpdate,
15
18
  releaseUrl: 'https://github.com/skyhook-io/radar/releases/tag/v1.3.0',
16
19
  // Off, so the Product Hunt launch day doesn't take the corner whatever today is.
17
20
  productHuntLaunch: { enabled: false, url: '', start: '0001-01-01T00:00:00Z', end: '0001-01-01T00:00:00Z' },
@@ -37,6 +40,8 @@ function renderNotification() {
37
40
  describe('UpdateNotification', () => {
38
41
  beforeEach(() => {
39
42
  deploymentMode = 'local'
43
+ installMethod = 'direct'
44
+ manualUpdate = undefined
40
45
  })
41
46
 
42
47
  it('keeps the update popup for local installations', () => {
@@ -45,6 +50,23 @@ describe('UpdateNotification', () => {
45
50
  expect(html).toContain('1.3.0')
46
51
  })
47
52
 
53
+ it('offers the in-app update to desktop installs that can replace themselves', () => {
54
+ installMethod = 'desktop'
55
+ const html = renderNotification()
56
+ // The in-app update button plus the dismiss button.
57
+ expect(html.match(/<button/g)).toHaveLength(2)
58
+ expect(html).not.toContain('href="https://github.com/skyhook-io/radar/releases/tag/v1.3.0"')
59
+ })
60
+
61
+ it.each(['appimage', 'package', 'download'] as const)('links %s desktop installs to the release instead of updating in place', how => {
62
+ installMethod = 'desktop'
63
+ manualUpdate = how
64
+ const html = renderNotification()
65
+ expect(html).toContain('href="https://github.com/skyhook-io/radar/releases/tag/v1.3.0"')
66
+ // Only the dismiss button: no in-app update.
67
+ expect(html.match(/<button/g)).toHaveLength(1)
68
+ })
69
+
48
70
  it('suppresses the update popup for shared in-cluster viewers', () => {
49
71
  deploymentMode = 'in-cluster'
50
72
  expect(renderNotification()).toBe('')
@@ -52,7 +52,8 @@ export function UpdateNotification({ placement = 'floating' }: { placement?: 'fl
52
52
  const startUpdate = useStartDesktopUpdate()
53
53
  const applyUpdate = useApplyDesktopUpdate()
54
54
  const isDesktop = versionInfo?.installMethod === 'desktop'
55
- const { data: updateStatus } = useDesktopUpdateStatus(desktopUpdating || (inSettings && expanded && isDesktop))
55
+ const desktopSelfUpdate = isDesktop && !versionInfo?.manualUpdate
56
+ const { data: updateStatus } = useDesktopUpdateStatus(desktopUpdating || (inSettings && expanded && desktopSelfUpdate))
56
57
 
57
58
  useEffect(() => {
58
59
  if (!expanded) return
@@ -213,8 +214,25 @@ export function UpdateNotification({ placement = 'floating' }: { placement?: 'fl
213
214
  {!inSettings && <>You're on {versionInfo.currentVersion}.</>}
214
215
  </p>
215
216
 
217
+ {/* Desktop that cannot replace itself: how to update, and the download */}
218
+ {isDesktop && versionInfo.manualUpdate && versionInfo.releaseUrl && (
219
+ <>
220
+ <p className="text-xs text-theme-text-secondary mt-1">
221
+ {MANUAL_UPDATE_TEXT[versionInfo.manualUpdate]}
222
+ </p>
223
+ <a
224
+ href={versionInfo.releaseUrl}
225
+ target="_blank"
226
+ rel="noopener noreferrer"
227
+ className="inline-flex items-center gap-1 mt-2 text-xs font-medium text-accent-text hover:underline"
228
+ >
229
+ Download from GitHub →
230
+ </a>
231
+ </>
232
+ )}
233
+
216
234
  {/* Desktop: in-app update flow */}
217
- {isDesktop && (
235
+ {desktopSelfUpdate && (
218
236
  <DesktopUpdateControls
219
237
  state={effectiveState}
220
238
  progress={updateStatus?.progress}
@@ -308,6 +326,12 @@ export function UpdateNotification({ placement = 'floating' }: { placement?: 'fl
308
326
  )
309
327
  }
310
328
 
329
+ const MANUAL_UPDATE_TEXT: Record<NonNullable<VersionInfo['manualUpdate']>, string> = {
330
+ appimage: "This AppImage can't update itself. Download the new one and use it in place of this file.",
331
+ package: 'Download the new .deb or .rpm and install it with your package manager, such as apt or dnf.',
332
+ download: "Radar can't replace itself in this folder. Download the new version and copy it over this one, as an administrator if the folder needs it.",
333
+ }
334
+
311
335
  function CopyIcon({ copied, failed }: { copied: boolean; failed: boolean }) {
312
336
  if (copied) return <Check className="w-3.5 h-3.5 text-green-400 shrink-0" />
313
337
  if (failed) return <X className="w-3.5 h-3.5 text-red-400 shrink-0" />
@@ -4,6 +4,13 @@ import { contentMatchLabel, partialSearchNotices } from './omnibar-match'
4
4
  const site = (s: string) => ({ token: 't', site: s, score: 12 })
5
5
 
6
6
  describe('contentMatchLabel', () => {
7
+ it('names Event content without claiming Events have a spec', () => {
8
+ for (const path of ['reason', 'message', 'type', 'involvedObject.name', 'related.name']) {
9
+ expect(contentMatchLabel([site(`content:${path}`)])).toBe('in event')
10
+ }
11
+ expect(contentMatchLabel([site('content:reason'), site('content:message')])).toBe('in event')
12
+ expect(contentMatchLabel([site('content:reason'), site('name')])).toBe('')
13
+ })
7
14
  it('names a match inside Trivy findings', () => {
8
15
  expect(contentMatchLabel([site('content:report.vulnerabilities[3]')])).toBe('in findings')
9
16
  })
@@ -5,6 +5,7 @@ import type { SearchMatchedField } from '../../api/client'
5
5
  // reports keep their findings under `report`, not a spec.
6
6
  export function contentMatchLabel(matched: SearchMatchedField[] | undefined): string {
7
7
  if (!matched?.length || !matched.every((m) => m.site.startsWith('content:'))) return ''
8
+ if (matched.every((m) => /^content:(reason|message|type|involvedObject|related)(\.|$)/.test(m.site))) return 'in event'
8
9
  return matched.every((m) => m.site.startsWith('content:report.')) ? 'in findings' : 'in spec'
9
10
  }
10
11
 
@@ -7,6 +7,23 @@ const searchCoverageNote = (entries: SearchCoverageEntry[] | undefined, opts: Pa
7
7
  const entry = (kind: string, reason: string, group = '', count?: number): SearchCoverageEntry => ({ kind, group, reason, count })
8
8
 
9
9
  describe('searchCoverageNote', () => {
10
+ it('keeps collection limits visible beside an Event search action', () => {
11
+ const searchEvents = vi.fn()
12
+ const note = noteFor({ status: 'complete', narrowedBy: ['kind_collection'], gaps: [] }, { hits: [], query: 'CertificateExpirationWarning', searchEvents })
13
+ expect(note?.parts?.[0].text).toContain("doesn't watch every kind")
14
+ expect(note?.parts?.[1].text).toBe("Kubernetes Events aren't included in a broad search.")
15
+ expect(note?.parts?.[1].action).toMatchObject({ label: 'Search Events', keepOpen: true })
16
+ note?.parts?.[1].action?.onSelect()
17
+ expect(searchEvents).toHaveBeenCalledOnce()
18
+ })
19
+
20
+ it('does not offer Event search for unread scope, existing hits or older coverage', () => {
21
+ const opts = { hits: [], query: 'CertificateExpirationWarning', searchEvents: vi.fn() }
22
+ expect(searchCoverageNote([entry('*', 'kind_sync_pending')], opts)?.action).toBeUndefined()
23
+ expect(noteFor(undefined, opts)).toBeUndefined()
24
+ expect(noteFor({ status: 'complete', gaps: [] }, { ...opts, hits: [{ kind: 'Pod' }] })).toBeUndefined()
25
+ })
26
+
10
27
  it('explains an empty search narrowed by kind collection, without an action', () => {
11
28
  expect(noteFor({ status: 'complete', narrowedBy: ['kind_collection'], gaps: [] }, { hits: [] })).toEqual({
12
29
  text: "Radar doesn't watch every kind; search kind:<name> to include one.",
@@ -21,6 +21,9 @@ export interface SearchCoverageNoteOptions {
21
21
  hits?: { kind: string; group?: string }[]
22
22
  query?: string
23
23
  recheckKind?: (kind: string) => void
24
+ /** Opt into Event search without changing the current terms or namespace. */
25
+ searchEvents?: () => void
26
+ eventSearchNeedsUpgrade?: boolean
24
27
  /** Re-querying a still-loading search ran out of budget. */
25
28
  pendingExhausted?: boolean
26
29
  /** Returns how to open a kind's resource list, or undefined when the host can't. */
@@ -110,6 +113,14 @@ function failedKinds(entries: SearchCoverageEntry[], label: (e: SearchCoverageEn
110
113
  return { text: `${shown.join(', ')} and ${more} more ${more === 1 ? 'kind' : 'kinds'}`, one: false }
111
114
  }
112
115
 
116
+ function queryKinds(query: string): string[] {
117
+ const tokens = query.match(/(?:[^\s"]|"[^"]*(?:"|$))+/g) ?? []
118
+ return tokens.flatMap((token) => {
119
+ const match = /^(?:kind|k):(.+)$/i.exec(token.replaceAll('"', ''))
120
+ return match ? [match[1].toLowerCase()] : []
121
+ })
122
+ }
123
+
113
124
  // Radar's ⌘K note for one search: what happened to the kinds and namespaces
114
125
  // the query named, whether results are still loading, and which kinds failed
115
126
  // to read. Broad searches keep access exclusions quiet; namespace collection
@@ -121,12 +132,26 @@ export function searchCoverageNote(coverage: SearchCoverage | undefined, opts: S
121
132
  if (coverage?.gaps.length === 0) {
122
133
  // Collection limits come from how Radar is installed, and nothing else
123
134
  // in the omnibar shows them, so they are said with hits too.
124
- if (coverage.narrowedBy?.includes('namespace_collection')) {
125
- return { text: "Radar collects some kinds only in some namespaces; matches for them elsewhere won't show." }
126
- }
127
- if (coverage.narrowedBy?.includes('kind_collection') && !opts.hits?.length) {
128
- return { text: "Radar doesn't watch every kind; search kind:<name> to include one." }
135
+ const collection = coverage.narrowedBy?.includes('namespace_collection')
136
+ ? "Radar collects some kinds only in some namespaces; matches for them elsewhere won't show."
137
+ : coverage.narrowedBy?.includes('kind_collection') && !opts.hits?.length
138
+ ? "Radar doesn't watch every kind; search kind:<name> to include one."
139
+ : undefined
140
+ const kinds = queryKinds(opts.query ?? '')
141
+ const emptyBroadSearch = opts.hits?.length === 0 && kinds.length === 0
142
+ const needsUpgrade = opts.eventSearchNeedsUpgrade && (emptyBroadSearch || kinds.some((kind) => kind === 'event' || kind === 'events' || kind === 'ev'))
143
+ if (opts.query?.trim() && (needsUpgrade || (opts.searchEvents && emptyBroadSearch))) {
144
+ const eventNote: OmnibarNotePart = needsUpgrade ? {
145
+ text: 'Update the connected Radar server to search Event reasons and messages.',
146
+ } : {
147
+ text: "Kubernetes Events aren't included in a broad search.",
148
+ action: opts.searchEvents ? { label: 'Search Events', onSelect: opts.searchEvents, keepOpen: true } : undefined,
149
+ }
150
+ return collection
151
+ ? { text: [collection, eventNote.text, eventNote.action?.label].filter(Boolean).join(' '), parts: [{ text: collection }, eventNote] }
152
+ : eventNote
129
153
  }
154
+ if (collection) return { text: collection }
130
155
  }
131
156
  return undefined
132
157
  }
@@ -149,8 +174,7 @@ export function searchCoverageNote(coverage: SearchCoverage | undefined, opts: S
149
174
  if (failed.length) {
150
175
  const { text, one } = failedKinds(failed, (e) => label(e))
151
176
  const warning = `Couldn't read ${text}; matches of ${one ? 'that kind' : 'those kinds'} may be missing.`
152
- const tokens = (opts.query ?? '').match(/(?:[^\s"]|"[^"]*(?:"|$))+/g) ?? []
153
- const namedKind = tokens.some((token) => /^(kind|k):.+/i.test(token.replaceAll('"', '')))
177
+ const namedKind = queryKinds(opts.query ?? '').length > 0
154
178
  const retry = !namedKind && failed.find((e) => e.kind !== '*' && e.reason === 'read_error')
155
179
  const unnamedRetry = !namedKind && !retry && failed.some((e) => e.kind === '*' && e.count && e.reason === 'read_error')
156
180
  if (unnamedRetry) {
@@ -4,6 +4,7 @@ import { pluralize } from '@skyhook-io/k8s-ui'
4
4
  import { useSwitchContext, fetchSessionCounts, SwitchContextError, type SessionCounts } from '../api/client'
5
5
  import { useContextSwitch } from '../context/ContextSwitchContext'
6
6
  import { useToast } from './ui/Toast'
7
+ import { Tooltip } from './ui/Tooltip'
7
8
  import { useDock } from './dock'
8
9
  import type { ContextInfo, SelectedResource } from '../types'
9
10
  import { parseContextForSwitcher } from '../utils/context-name'
@@ -130,7 +131,10 @@ export function useContextSwitchFlow() {
130
131
  )}
131
132
  </ul>
132
133
  <p className="text-xs text-theme-text-tertiary">
133
- Switch to: <span className="text-theme-text-secondary">{parseContextForSwitcher(pending.context).clusterName}</span>
134
+ Switch to:{' '}
135
+ <Tooltip content={shortNameHides(pending.context) ? pending.context.name : ''}>
136
+ <span className="text-theme-text-secondary">{parseContextForSwitcher(pending.context).clusterName}</span>
137
+ </Tooltip>
134
138
  </p>
135
139
  </div>
136
140
  <div className="px-4 py-3 border-t border-theme-border flex justify-end gap-2">
@@ -162,3 +166,7 @@ export function useContextSwitchFlow() {
162
166
  confirmDialog,
163
167
  }
164
168
  }
169
+
170
+ function shortNameHides(context: ContextInfo) {
171
+ return parseContextForSwitcher(context).clusterName !== context.name
172
+ }
@@ -115,7 +115,7 @@ export const RELEASE_NOTES: ReleaseNotes[] = [
115
115
  'Limit what Radar can reach with rbac.namespaces, disableExec and --disable-auto-port-forward',
116
116
  'GitOps trees show operator-created workloads; drawers link webhooks, issuers and Secrets',
117
117
  'get_changes includes RBAC and Node edits; search finds resources by a pasted IP or ip:port',
118
- 'Issues link a missing Secret to its SealedSecret and report missing parent Gateways',
118
+ 'Issues link a missing Secret to its SealedSecret',
119
119
  ],
120
120
  },
121
121
  {
@@ -0,0 +1,51 @@
1
+ import { renderToStaticMarkup } from 'react-dom/server'
2
+ import { describe, expect, it } from 'vitest'
3
+ import { NodeCertificateContext, NodeCertificateDetails } from './NodeCertificateEvidence'
4
+ import type { NodeCertificateReport } from '../../api/client'
5
+
6
+ const report: NodeCertificateReport = {
7
+ uid: 'current-node', event_id: 'certificate-event', state: 'reported',
8
+ reason: 'CertificateExpirationWarning', message: 'Original node monitor warning',
9
+ last_reported_at: '2026-10-31T08:00:00Z', expires_at: '2027-02-05T10:00:00Z',
10
+ }
11
+
12
+ describe('Node certificate reports', () => {
13
+ it('keeps the original report available when no matching Issue is shown', () => {
14
+ const html = renderToStaticMarkup(<NodeCertificateContext evidence={report} hasIssue={false} onViewTimeline={() => {}} />)
15
+ expect(html).toContain('Node certificate warning reported')
16
+ expect(html).toContain('Last reported')
17
+ expect(html).toContain('Reported expiry')
18
+ expect(html).toContain(report.message)
19
+ expect(html).toContain('View timeline')
20
+ expect(html).not.toContain('API is down')
21
+ })
22
+ it('does not duplicate a fresh or unverified Issue or claim current health after an OK report', () => {
23
+ expect(renderToStaticMarkup(<NodeCertificateContext evidence={report} hasIssue onViewTimeline={() => {}} />)).toBe('')
24
+ expect(renderToStaticMarkup(<NodeCertificateContext evidence={{ ...report, state: 'unverified' }} hasIssue onViewTimeline={() => {}} />)).toBe('')
25
+ expect(renderToStaticMarkup(<NodeCertificateContext evidence={{ ...report, state: 'ok' }} hasIssue={false} onViewTimeline={() => {}} />)).toBe('')
26
+ expect(renderToStaticMarkup(<NodeCertificateContext evidence={{ ...report, state: 'unverified', reason: 'CertificateExpirationOK', history_incomplete: true }} hasIssue={false} onViewTimeline={() => {}} />)).toBe('')
27
+ const details = renderToStaticMarkup(<NodeCertificateDetails evidence={report} onViewTimeline={() => {}} includeOriginalReport={false} />)
28
+ expect(details).toContain('Reported expiry')
29
+ expect(details).not.toContain(report.message)
30
+ })
31
+ it('retains stale evidence with an explicit unverified state', () => {
32
+ const html = renderToStaticMarkup(<NodeCertificateContext evidence={{ ...report, state: 'unverified' }} hasIssue={false} onViewTimeline={() => {}} />)
33
+ expect(html).toContain('Node certificate status unverified')
34
+ expect(html).toContain('current certificate state is unverified')
35
+ expect(html).toContain(report.message)
36
+ expect(html).not.toContain('renewed')
37
+ expect(html).not.toContain('healthy')
38
+ const details = renderToStaticMarkup(<NodeCertificateDetails evidence={{ ...report, state: 'unverified' }} onViewTimeline={() => {}} includeOriginalReport={false} />)
39
+ expect(details).toContain('current certificate state is unverified')
40
+ expect(details).toContain('last retained report')
41
+ expect(details).not.toContain(report.message)
42
+ })
43
+ it('explains history and parsing gaps', () => {
44
+ const html = renderToStaticMarkup(<NodeCertificateDetails evidence={{ ...report, history_incomplete: true, validity_unknown: true }} onViewTimeline={() => {}} />)
45
+ expect(html).toContain('a later report may be missing')
46
+ expect(html).toContain('could not read the validity dates')
47
+ const context = renderToStaticMarkup(<NodeCertificateContext evidence={{ ...report, validity_unknown: true }} hasIssue={false} onViewTimeline={() => {}} />)
48
+ expect(context).toContain('Review the original monitor report')
49
+ expect(context).not.toContain('Review the reported validity dates')
50
+ })
51
+ })
@@ -0,0 +1,44 @@
1
+ import { Clock, Info } from 'lucide-react'
2
+ import { AlertBanner, CardSection, Disclosure, TimeValue } from '@skyhook-io/k8s-ui'
3
+ import type { NodeCertificateReport } from '../../api/client'
4
+
5
+ type EvidenceProps = { evidence: NodeCertificateReport; onViewTimeline: () => void; includeOriginalReport?: boolean }
6
+
7
+ export function NodeCertificateDetails({ evidence, onViewTimeline, includeOriginalReport = true }: EvidenceProps) {
8
+ return (
9
+ <CardSection icon={Clock} label="Certificate evidence">
10
+ <p className="text-sm text-theme-text-secondary">Last reported: <TimeValue timestamp={evidence.last_reported_at} />.</p>
11
+ {evidence.expires_at && <p className="text-sm text-theme-text-secondary">Reported expiry: <TimeValue timestamp={evidence.expires_at} />.</p>}
12
+ {evidence.not_before && <p className="text-sm text-theme-text-secondary">Reported valid from: <TimeValue timestamp={evidence.not_before} />.</p>}
13
+ {evidence.state === 'unverified' && <p className="text-sm text-theme-text-secondary">The current certificate state is unverified; this is the last retained report.</p>}
14
+ {evidence.history_incomplete && <p className="text-sm text-theme-text-secondary">Some history is unavailable; a later report may be missing.</p>}
15
+ {evidence.validity_unknown && <p className="text-sm text-theme-text-secondary">Radar could not read the validity dates from this report.</p>}
16
+ {includeOriginalReport && <Disclosure summary="Original report" summaryClassName="text-xs text-theme-text-secondary">
17
+ <pre className="mt-2 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded bg-theme-elevated p-3 text-xs text-theme-text-secondary">{evidence.message}</pre>
18
+ </Disclosure>}
19
+ <button type="button" onClick={onViewTimeline} className="self-start text-left text-sm font-medium text-accent-text hover:underline">View timeline</button>
20
+ </CardSection>
21
+ )
22
+ }
23
+
24
+ export function nodeCertificateContextVisible(evidence: NodeCertificateReport | undefined, hasIssue: boolean): boolean {
25
+ return Boolean(evidence && evidence.reason !== 'CertificateExpirationOK' && evidence.state !== 'ok' && !hasIssue)
26
+ }
27
+
28
+ export function NodeCertificateContext({ evidence, hasIssue, onViewTimeline }: { evidence?: NodeCertificateReport; hasIssue: boolean; onViewTimeline: () => void }) {
29
+ if (!evidence || !nodeCertificateContextVisible(evidence, hasIssue)) return null
30
+ const unverified = evidence.state === 'unverified'
31
+ return (
32
+ <AlertBanner
33
+ variant="info"
34
+ icon={Info}
35
+ title={unverified ? 'Node certificate status unverified' : 'Node certificate warning reported'}
36
+ message={unverified ? 'The earlier warning is retained, but the current certificate state is unverified.' : evidence.validity_unknown ? "Review the original monitor report and the distribution's certificate guidance." : "Review the reported validity dates and the distribution's certificate guidance."}
37
+ className="mb-0"
38
+ >
39
+ <div className="mt-3">
40
+ <NodeCertificateDetails evidence={evidence} onViewTimeline={onViewTimeline} />
41
+ </div>
42
+ </AlertBanner>
43
+ )
44
+ }
@@ -25,6 +25,7 @@ import {
25
25
  isDiagnoseKind,
26
26
  isRolloutKind,
27
27
  canSetWorkloadImages,
28
+ canPauseDeployment,
28
29
  isCoreBatchJob,
29
30
  type SetImageOwnership,
30
31
  SET_IMAGE_WRITES,
@@ -38,6 +39,7 @@ import type { ServicePortRenderProps } from '@skyhook-io/k8s-ui/components/resou
38
39
  import { isJobSetV1Alpha2 } from '@skyhook-io/k8s-ui/components/resources/resource-utils-jobset-lws'
39
40
  import type { SelectedResource, ResourceRef, Relationships, ResourceWithRelationships } from '../../types'
40
41
  import { CronJobSchedulingContext, CronJobSchedulingDetails } from './CronJobSchedulingEvidence'
42
+ import { NodeCertificateContext, NodeCertificateDetails, nodeCertificateContextVisible } from './NodeCertificateEvidence'
41
43
  import { useHistoryPaging } from './historyPaging'
42
44
  import { findInheritedGitOpsLookupRef, useResolvedGitOpsOwner } from '../../hooks/useResolvedGitOpsOwner'
43
45
  import { useGitOpsWriteGuard } from '../../hooks/useGitOpsWriteGuard'
@@ -64,10 +66,13 @@ import {
64
66
  useSuspendCronJob,
65
67
  useResumeCronJob,
66
68
  useRestartWorkload,
69
+ usePauseDeployment,
70
+ useResumeDeployment,
67
71
  fetchWorkloadImages,
68
72
  fetchResourceWithRelationships,
69
73
  useSetWorkloadImages,
70
74
  useWorkloadRevisions,
75
+ useRefreshRevisionsOnNewRollout,
71
76
  useRollbackWorkload,
72
77
  useRolloutAction,
73
78
  useRolloutCapabilities,
@@ -326,6 +331,8 @@ function useActionsBarProps(
326
331
 
327
332
  const deleteMutation = useDeleteResource()
328
333
  const restartWorkloadMutation = useRestartWorkload()
334
+ const pauseDeploymentMutation = usePauseDeployment()
335
+ const resumeDeploymentMutation = useResumeDeployment()
329
336
  const setWorkloadImagesMutation = useSetWorkloadImages()
330
337
  const rollbackMutation = useRollbackWorkload()
331
338
  // Only the revision dialog drives this one, and it explains a failed promote in place
@@ -348,6 +355,9 @@ function useActionsBarProps(
348
355
  const canSetImages = isRolloutShape
349
356
  ? imageUpdatesSupported && isRollout && !rolloutCapabilitiesPending && rolloutCapabilities?.setImage === true
350
357
  : !workloadWritesPending && canSetWorkloadImages({ name: kind, group }, workloadWrites, imageUpdatesSupported)
358
+ const { support: deploymentPauseSupport } = useRadarFeature('deploymentPause')
359
+ const canPauseDeployments = !workloadWritesPending &&
360
+ canPauseDeployment({ name: kind, group }, workloadWrites, deploymentPauseSupport === 'supported')
351
361
  const loadImages = useCallback(
352
362
  (params: { kind: string; namespace: string; name: string }) =>
353
363
  queryClient.fetchQuery({
@@ -434,6 +444,16 @@ function useActionsBarProps(
434
444
  restartWorkloadMutation.mutate(params)
435
445
  : undefined,
436
446
  isRestarting: restartWorkloadMutation.isPending,
447
+ onPauseDeployment: canPauseDeployments
448
+ ? (params: Parameters<typeof pauseDeploymentMutation.mutate>[0]) =>
449
+ pauseDeploymentMutation.mutate(params)
450
+ : undefined,
451
+ onResumeDeployment: canPauseDeployments
452
+ ? (params: Parameters<typeof resumeDeploymentMutation.mutate>[0]) =>
453
+ resumeDeploymentMutation.mutate(params)
454
+ : undefined,
455
+ isPausingDeployment: pauseDeploymentMutation.isPending,
456
+ isResumingDeployment: resumeDeploymentMutation.isPending,
437
457
  onLoadImages: canSetImages ? loadImages : undefined,
438
458
  onSetImages: canSetImages
439
459
  ? (params: Parameters<typeof setWorkloadImagesMutation.mutateAsync>[0]) =>
@@ -592,6 +612,12 @@ export function WorkloadView({
592
612
  } = useResourceWithRelationships<any>(apiKind, namespace, name, rest.group)
593
613
  const resource = resourceResponse?.resource
594
614
  const relationships = resourceResponse?.relationships
615
+ useRefreshRevisionsOnNewRollout(
616
+ apiKind.toLowerCase(),
617
+ namespace,
618
+ name,
619
+ resource ? resource.metadata?.annotations?.['deployment.kubernetes.io/revision'] ?? '' : undefined,
620
+ )
595
621
  const resourceGroup = useMemo(
596
622
  () => (resource?.apiVersion ? apiVersionToGroup(resource.apiVersion) : undefined),
597
623
  [resource?.apiVersion],
@@ -654,6 +680,7 @@ export function WorkloadView({
654
680
  [podWorkloadOwner, podOwnerAppsQuery.data?.applications],
655
681
  )
656
682
  const certificateInfo = resourceResponse?.certificateInfo
683
+ const certificateSigningRequest = resourceResponse?.certificateSigningRequest
657
684
  const hpaDiagnosis = resourceResponse?.hpaDiagnosis
658
685
  const activeImageTargetOwnership = useMemo(
659
686
  () =>
@@ -845,20 +872,27 @@ export function WorkloadView({
845
872
  // the renderer banners. The backend canonicalizes a plural kind via discovery,
846
873
  // so using the normalized API kind resolves direct links and app navigation alike.
847
874
  const isCronJob = apiKind === 'cronjobs' && (!effectiveGroup || effectiveGroup === 'batch')
875
+ const isCoreNode = apiKind === 'nodes' && !effectiveGroup
848
876
  const { support: coverageSupport } = useRadarFeature('resourceIssueCoverage')
849
- const useCronJobCoverage = isCronJob && coverageSupport === 'supported'
877
+ const useReportCoverage = (isCronJob || isCoreNode) && coverageSupport === 'supported'
850
878
  const issueObservation = resource ? JSON.stringify([resource.metadata?.uid, resource.metadata?.resourceVersion]) : undefined
851
879
  const ordinaryIssues = useResourceIssues(apiKind, rest.group, namespace, name,
852
- rest.active !== false && !useCronJobCoverage && !isNotFoundError(resourceError), issueObservation)
853
- const cronJobIssues = useSubjectIssues(useCronJobCoverage ? { kind: 'CronJob', group: 'batch', namespace, name, uid: resource?.metadata?.uid } : null, useCronJobCoverage && Boolean(resource))
854
- const liveIssues = useCronJobCoverage ? cronJobIssues.data?.issues : ordinaryIssues.data
855
- const issuesPending = useCronJobCoverage ? cronJobIssues.isPending : ordinaryIssues.isPending
856
- const schedulingEvidence = cronJobIssues.data?.scheduling_report?.uid === resource?.metadata?.uid ? cronJobIssues.data?.scheduling_report : undefined
857
- const [schedulingTimelineFocus, setSchedulingTimelineFocus] = useState<{ uid: string; id: string }>()
880
+ rest.active !== false && !useReportCoverage && !isNotFoundError(resourceError), issueObservation)
881
+ const subjectIssues = useSubjectIssues(useReportCoverage ? { kind: isCoreNode ? 'Node' : 'CronJob', group: isCoreNode ? '' : 'batch', namespace, name, uid: resource?.metadata?.uid } : null, useReportCoverage && Boolean(resource))
882
+ const liveIssues = useReportCoverage ? subjectIssues.data?.issues : ordinaryIssues.data
883
+ const issuesPending = useReportCoverage ? subjectIssues.isPending : ordinaryIssues.isPending
884
+ const schedulingEvidence = isCronJob && subjectIssues.data?.scheduling_report?.uid === resource?.metadata?.uid ? subjectIssues.data?.scheduling_report : undefined
885
+ const certificateEvidence = isCoreNode && subjectIssues.data?.node_certificate_report?.uid === resource?.metadata?.uid ? subjectIssues.data?.node_certificate_report : undefined
886
+ const hasCertificateIssue = Boolean(liveIssues?.some(issue => issue.kind === 'Node' && issue.reason === 'NodeCertificateExpiry'))
887
+ const [reportTimelineFocus, setReportTimelineFocus] = useState<{ uid: string; id: string }>()
858
888
  const viewSchedulingReport = useCallback(() => {
859
- setSchedulingTimelineFocus(schedulingEvidence?.event_id ? { uid: schedulingEvidence.uid, id: schedulingEvidence.event_id } : undefined)
889
+ setReportTimelineFocus(schedulingEvidence?.event_id ? { uid: schedulingEvidence.uid, id: schedulingEvidence.event_id } : undefined)
860
890
  handleTabChange('timeline')
861
891
  }, [schedulingEvidence, handleTabChange])
892
+ const viewCertificateReport = useCallback(() => {
893
+ setReportTimelineFocus(certificateEvidence?.event_id ? { uid: certificateEvidence.uid, id: certificateEvidence.event_id } : undefined)
894
+ handleTabChange('timeline')
895
+ }, [certificateEvidence, handleTabChange])
862
896
  const { data: auditFindings } = useResourceAudit(apiKind, namespace, name, effectiveGroup)
863
897
  const hasOperationalIssues = Boolean(liveIssues?.length)
864
898
  const openIssueResource = issueResourceOpener(rest.onNavigateToResource)
@@ -1187,6 +1221,7 @@ export function WorkloadView({
1187
1221
  ownershipContext={ownershipContext}
1188
1222
  onOpenApplication={handleOpenApplication}
1189
1223
  certificateInfo={certificateInfo}
1224
+ certificateSigningRequest={certificateSigningRequest}
1190
1225
  hpaDiagnosis={hpaDiagnosis}
1191
1226
  workloadPods={supportsWorkloadPods ? workloadPodsQuery.data?.pods : undefined}
1192
1227
  onEvaluateCapacity={
@@ -1207,7 +1242,7 @@ export function WorkloadView({
1207
1242
  refetch={refetchResourceAndRuns}
1208
1243
  // Timeline
1209
1244
  allEvents={allEvents}
1210
- timelineFocusEvent={schedulingTimelineFocus?.uid === resource?.metadata?.uid ? schedulingTimelineFocus : undefined}
1245
+ timelineFocusEvent={reportTimelineFocus?.uid === resource?.metadata?.uid ? reportTimelineFocus : undefined}
1211
1246
  historyTruncated={!historyFallback && historyTruncated}
1212
1247
  onLoadOlderHistory={historyFallback ? undefined : loadOlderHistory}
1213
1248
  loadingOlderHistory={!historyFallback && loadingOlderHistory}
@@ -1355,16 +1390,21 @@ export function WorkloadView({
1355
1390
  renderOverviewLead={() => (
1356
1391
  <div className="flex flex-col gap-4">
1357
1392
  <CronJobSchedulingContext evidence={schedulingEvidence} onViewTimeline={viewSchedulingReport} />
1393
+ <NodeCertificateContext evidence={certificateEvidence} hasIssue={hasCertificateIssue} onViewTimeline={viewCertificateReport} />
1358
1394
  <ResourceIssuesSection
1359
1395
  issues={liveIssues}
1360
- renderDetailSection={schedulingEvidence?.state === 'reported' ? ({ issue }) => issue.kind === 'CronJob' && issue.reason === schedulingEvidence.reason ? <CronJobSchedulingDetails evidence={schedulingEvidence} onViewTimeline={viewSchedulingReport} /> : null : undefined}
1396
+ renderDetailSection={({ issue }) => {
1397
+ if (schedulingEvidence?.state === 'reported' && issue.kind === 'CronJob' && issue.reason === schedulingEvidence.reason) return <CronJobSchedulingDetails evidence={schedulingEvidence} onViewTimeline={viewSchedulingReport} />
1398
+ if (certificateEvidence && issue.kind === 'Node' && issue.reason === 'NodeCertificateExpiry') return <NodeCertificateDetails evidence={certificateEvidence} onViewTimeline={viewCertificateReport} includeOriginalReport={false} />
1399
+ return null
1400
+ }}
1361
1401
  compact={!expanded}
1362
1402
  subjectResource={{ kind: apiKind, namespace, name, group: rest.group }}
1363
1403
  onResourceClick={openIssueResource}
1364
1404
  />
1365
1405
  </div>
1366
1406
  )}
1367
- hasOverviewLead={hasOperationalIssues || Boolean(schedulingEvidence && schedulingEvidence.state !== 'reported')}
1407
+ hasOverviewLead={hasOperationalIssues || Boolean(schedulingEvidence && schedulingEvidence.state !== 'reported') || nodeCertificateContextVisible(certificateEvidence, hasCertificateIssue)}
1368
1408
  hasOperationalIssues={hasOperationalIssues}
1369
1409
  operationalIssuesPending={issuesPending}
1370
1410
  // A manager answer's chip links only managers the server found; a
@@ -43,6 +43,7 @@ describe('shouldAutoRetryConnection', () => {
43
43
  it('leaves configuration and RBAC errors for the user to resolve', () => {
44
44
  expect(shouldAutoRetryConnection('config')).toBe(false)
45
45
  expect(shouldAutoRetryConnection('rbac')).toBe(false)
46
+ expect(shouldAutoRetryConnection('settings')).toBe(false)
46
47
  })
47
48
  })
48
49
 
@@ -79,8 +79,8 @@ export function shouldAutoRetryConnection(errorType?: string): boolean {
79
79
  // Auth-shaped failures are excluded: the server runs its own backoff
80
80
  // reconnect loop for those, and each browser retry would invoke the exec
81
81
  // credential plugin again. Manual "Retry Connection" stays available for
82
- // an immediate check.
83
- return errorType !== 'config' && errorType !== 'rbac' && !errorType?.startsWith('auth')
82
+ // an immediate check. A settings error can't clear until Radar restarts.
83
+ return errorType !== 'config' && errorType !== 'settings' && errorType !== 'rbac' && !errorType?.startsWith('auth')
84
84
  }
85
85
 
86
86
  export function shouldApplyPolledConnection(
@@ -44,6 +44,8 @@ const restrictedCapabilities: Capabilities = {
44
44
  },
45
45
  mcpEnabled: false,
46
46
  mcpExecTools: false,
47
+ mcpHttpTools: false,
48
+ mcpHelmTools: false,
47
49
  deployment: { mode: 'local' },
48
50
  }
49
51
 
@@ -0,0 +1,22 @@
1
+ import { describe, expect, it } from 'vitest'
2
+ import { describeGitOpsOwnerSource } from './useResolvedGitOpsOwner'
3
+
4
+ const owner = { tool: 'fluxcd', kind: 'kustomizations', namespace: 'flux-system', name: 'apps' } as const
5
+ const nameKey = 'kustomize.toolkit.fluxcd.io/name'
6
+ const nsKey = 'kustomize.toolkit.fluxcd.io/namespace'
7
+
8
+ describe('GitOps owner evidence', () => {
9
+ it('shows only the paired labels that identify the resolved manager', () => {
10
+ expect(describeGitOpsOwnerSource(owner, { metadata: { labels: { [nameKey]: 'apps', [nsKey]: 'flux-system' } } })).toBe(`${nameKey}=apps, ${nsKey}=flux-system`)
11
+ })
12
+ it.each([
13
+ { [nameKey]: 'flux-system', [nsKey]: 'flux-system' },
14
+ { [nameKey]: 'apps', [nsKey]: 'other' },
15
+ { [nameKey]: 'apps' },
16
+ ])('does not cite stale or incomplete origin labels: %j', labels => {
17
+ expect(describeGitOpsOwnerSource(owner, { metadata: { labels } })).toBeNull()
18
+ })
19
+ it('does not cite an Argo annotation for a Flux manager', () => {
20
+ expect(describeGitOpsOwnerSource(owner, { metadata: { annotations: { 'argocd.argoproj.io/tracking-id': 'old:apps/Deployment:prod/web' } } })).toBeNull()
21
+ })
22
+ })
@@ -214,7 +214,7 @@ function isNativeHelmManager(ref: ResourceRef): boolean {
214
214
  return ref.kind === 'HelmRelease' && ref.group !== 'helm.toolkit.fluxcd.io'
215
215
  }
216
216
 
217
- function describeGitOpsOwnerSource(owner: GitOpsOwnerRef | null, resource: any): string | null {
217
+ export function describeGitOpsOwnerSource(owner: GitOpsOwnerRef | null, resource: any): string | null {
218
218
  if (!owner || !resource) return null
219
219
  const labels = resource.metadata?.labels ?? {}
220
220
  const annotations = resource.metadata?.annotations ?? {}
@@ -223,9 +223,12 @@ function describeGitOpsOwnerSource(owner: GitOpsOwnerRef | null, resource: any):
223
223
  const nameKey = owner.kind === 'helmreleases' ? 'helm.toolkit.fluxcd.io/name' : 'kustomize.toolkit.fluxcd.io/name'
224
224
  const nsKey =
225
225
  owner.kind === 'helmreleases' ? 'helm.toolkit.fluxcd.io/namespace' : 'kustomize.toolkit.fluxcd.io/namespace'
226
- if (labels[nameKey] || labels[nsKey]) {
227
- return `${nameKey}=${labels[nameKey] ?? ''}, ${nsKey}=${labels[nsKey] ?? ''}`
226
+ // Cite the origin labels only when they name the manager shown: labels a
227
+ // controller copied from an ancestor's metadata name a different one.
228
+ if (labels[nameKey] === owner.name && labels[nsKey] === owner.namespace) {
229
+ return `${nameKey}=${labels[nameKey]}, ${nsKey}=${labels[nsKey]}`
228
230
  }
231
+ return null
229
232
  }
230
233
 
231
234
  const trackingID = annotations['argocd.argoproj.io/tracking-id']