-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add improvements for the EKS Discover UI. #38609
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
*/ | ||
|
||
import React, { useState, useCallback } from 'react'; | ||
import { Box, ButtonSecondary, ButtonText, Text, Toggle } from 'design'; | ||
import { Box, ButtonSecondary, ButtonText, Link, Text, Toggle } from 'design'; | ||
import styled from 'styled-components'; | ||
import { FetchStatus } from 'design/DataTable/types'; | ||
import { Danger } from 'design/Alert'; | ||
|
@@ -218,7 +218,12 @@ export function EnrollEksCluster(props: AgentStepProps) { | |
emitErrorEvent( | ||
'unknown error: no results came back from enrolling the EKS cluster.' | ||
); | ||
} else if (result.error) { | ||
} else if ( | ||
result.error && | ||
!result.error.message.includes( | ||
'teleport-kube-agent is already installed' | ||
) | ||
) { | ||
setEnrollmentState({ | ||
status: 'error', | ||
error: `Cluster enrollment error: ${result.error}`, | ||
|
@@ -293,6 +298,17 @@ export function EnrollEksCluster(props: AgentStepProps) { | |
{fetchClustersAttempt.status === 'failed' && !hasIamPermError && ( | ||
<Danger mt={3}>{fetchClustersAttempt.statusText}</Danger> | ||
)} | ||
<Text mt={4} mb={-3}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the purpose of the negative value here? are we doing it to try and not affect the positioning of something else? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. its a nit at this point so feel free to ignore, but it'd probably make more sense to reduce the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense, changed the margins 👍 |
||
<b>Note:</b> EKS enrollment will work only with clusters that have | ||
access entries authentication mode enabled, see{' '} | ||
<Link | ||
href="https://docs.aws.amazon.com/eks/latest/userguide/access-entries.html#authentication-modes" | ||
target="_blank" | ||
color="text.main" | ||
> | ||
documentation. | ||
</Link> | ||
</Text> | ||
<Text mt={4}> | ||
Select the AWS Region you would like to see EKS clusters for: | ||
</Text> | ||
|
@@ -346,7 +362,7 @@ export function EnrollEksCluster(props: AgentStepProps) { | |
}} | ||
pl={0} | ||
> | ||
Or click here to see instructions for manual enrollment | ||
Or do manual enrollment | ||
AntonAM marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</ButtonText> | ||
</Box> | ||
</StyledBox> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this have any specific error code we could check for instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking for error code as Michael suggested is ideal, but if we're going to check for a substring in an error message, we should make sure to leave a note where the error message in defined in the backend saying that it needs to be kept in sync with this. This way if someone changes the error message, this won't break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, it's not an AWS error, just our internal message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a comment 👍