Skip to content
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

feature: add EKS create cluster #2631

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Conversation

Elessar1802
Copy link
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@github-actions github-actions bot added the PR:Issue-verification-failed PR:Issue-verification-failed label Apr 7, 2025
@Elessar1802 Elessar1802 changed the base branch from develop to main April 7, 2025 05:07
@@ -400,7 +401,9 @@ export const ClusterEnvironmentDrawer = ({
<Drawer position="right" width="800px" onEscape={hideClusterDrawer} onClose={hideClusterDrawer}>
<div className="h-100 bg__primary flexbox-col" onClick={stopPropagation}>
<div className="flexbox dc__align-items-center dc__content-space dc__border-bottom bg__primary py-12 px-20">
<h3 className="m-0 fs-16 fw-6 lh-1-43">{id ? 'Edit Environment' : 'Add Environment'}</h3>
<h3 className="m-0 fs-16 fw-6 lh-1-43">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add truncation

@@ -83,7 +83,7 @@ export const URLS = {
GLOBAL_CONFIG_GITOPS: '/global-config/gitops',
GLOBAL_CONFIG_DOCKER: '/global-config/docker',
GLOBAL_CONFIG_CLUSTER: '/global-config/cluster-env',
GLOBAL_CONFIG_CREATE_CLUSTER: '/global-config/cluster-env/create/cluster',
GLOBAL_CONFIG_CREATE_CLUSTER: '/global-config/cluster-env/create/cluster/:type',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -77,6 +79,40 @@ export const getResourceData = async ({
return parseNodeList(response)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls verify silver surfer once

const { result } = await getNamespaceListMin(clusterId)
const [{ environments }] = result

const response = await getK8sResourceList(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its common in else block and here, can common out.

@@ -77,6 +79,40 @@ export const getResourceData = async ({
return parseNodeList(response)
}

if (selectedResource.gvk.Kind.toLowerCase() === Nodes.Namespace.toLowerCase()) {
const { result } = await getNamespaceListMin(clusterId)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should send abortController as well

@@ -382,6 +386,14 @@ const BaseResourceListContent = ({
}
}

const getAddEnvironmentClickHandler = (namespace: string) => () => {
const environmentFormData = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There must be a type like: AddEnvironmentFormPrefilledInfoType

export const SIDEBAR_CONFIG: SidebarConfigType = {
[CreateClusterTypeEnum.CONNECT_CLUSTER]: {
title: 'Connect cluster',
iconName: 'ic-ci-linked' as IconName,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can sync as to why we had to use as.


return (
<NavLink
className={`dc__transparent flex left dc__gap-8 py-6 px-8 br-4 ${isSelected ? 'bcb-1' : 'dc__hover-n50'}`}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing key

onEscape={handleRedirectToClusterList}
onClose={handleRedirectToClusterList}
>
<dialog
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not use dialog here, should be catered in Drawer component later

onClick={stopPropagation}
>
<header className="px-20 py-12 lh-24 flexbox dc__content-space dc__align-items-center dc__border-bottom">
<span className="fs-16 fw-6 dc__first-letter-capitalize">New Cluster</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Can be a h tag

Elessar1802 and others added 19 commits April 7, 2025 22:10
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR:Issue-verification-failed PR:Issue-verification-failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants