Skip to content

Commit 32c32a6

Browse files
fix: Only show please update resource specification message when spec… (cherry-pick #25066 for 3.3) (#25894)
Signed-off-by: Josh Soref <jsoref@gmail.com> Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
1 parent 675f8cf commit 32c32a6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

ui/src/app/applications/components/application-node-info/application-node-info.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,15 @@ export const ApplicationNodeInfo = (props: {
275275
)}
276276
{`${props.node.name}`}
277277
<br />
278-
{props?.controlled?.state?.normalizedLiveState?.apiVersion && (
279-
<span>
280-
Please update your resource specification to use the latest Kubernetes API resources supported by the target cluster. The
281-
recommended syntax is{' '}
282-
{`${props.controlled.state.normalizedLiveState.apiVersion}/${props?.controlled.state.normalizedLiveState?.kind}:${props.node.name}`}
283-
</span>
284-
)}
278+
{props?.controlled?.state?.normalizedLiveState?.apiVersion &&
279+
`${props?.controlled?.state?.targetState?.apiVersion}/${props?.controlled?.state?.targetState?.kind}:${props.node.name}` !==
280+
`${props.controlled.state.normalizedLiveState.apiVersion}/${props?.controlled.state.normalizedLiveState?.kind}:${props.node.name}` && (
281+
<span>
282+
Please update your resource specification to use the latest Kubernetes API resources supported by the target cluster. The
283+
recommended syntax is{' '}
284+
{`${props.controlled.state.normalizedLiveState.apiVersion}/${props?.controlled.state.normalizedLiveState?.kind}:${props.node.name}`}
285+
</span>
286+
)}
285287
</div>
286288
)}
287289
</React.Fragment>

0 commit comments

Comments
 (0)