Skip to content

Commit

Permalink
Address CR
Browse files Browse the repository at this point in the history
  • Loading branch information
kimlisa authored and github-actions committed Nov 1, 2024
1 parent 0a8e9ad commit 0b9f1c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export function KubeNamespaceSelector({
return (
<Box width="100%" mb={-3}>
<StyledSelect
label={`Namespaces:`}
label={`Namespaces`}
inputId={kubeClusterItem.id}
width="100%"
placeholder="Start typing a namespace and press enter"
Expand Down
12 changes: 5 additions & 7 deletions web/packages/shared/components/AccessRequests/NewRequest/kube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ export function isKubeClusterWithNamespaces(
}

/**
* Parses error messsage (in an expected format) to see if
* in the message it's a type of request.kubernetes_resources
* related error, then check if namespace or kube_cluster is mentioned
* in the "allowed kinds" portion of the error message.
* Parses error message (in an expected format returned from the backend) to see if
* the message is a type of request.kubernetes_resources related error:
* https://github.com/gravitational/teleport/blob/master/lib/services/access_request.go#L2050
*
* The web UI currently only supports selecting namespaces or kube_cluster
* for kube related resources, anything else we have to help direct
* user to another tool that does support it.
* If error matches, it then checks if namespace or kube_cluster is mentioned
* in the "allowed kinds" portion of the error message.
*/
export function checkSupportForKubeResources(requestRoleAttempt: Attempt) {
let requestKubeResourceSupported = true;
Expand Down

0 comments on commit 0b9f1c8

Please sign in to comment.