diff --git a/frontend/packages/helm-plugin/console-extensions.json b/frontend/packages/helm-plugin/console-extensions.json index 6936205188b..8611f7e46d1 100644 --- a/frontend/packages/helm-plugin/console-extensions.json +++ b/frontend/packages/helm-plugin/console-extensions.json @@ -166,7 +166,7 @@ "groupId": "developer-catalog", "href": "/catalog/ns/:namespace?catalogType=HelmChart", "label": "%helm-plugin~Helm Chart%", - "description": "%helm-plugin~Browse the catalog to discover and install Helm Charts%", + "description": "%helm-plugin~Browse the catalog to discover and install Helm Chart(s)%", "icon": { "$codeRef": "helmIcons.helmCatalogIconSVG" } }, "flags": { @@ -194,9 +194,9 @@ "type": "console.catalog/item-type", "properties": { "type": "HelmChart", - "title": "%helm-plugin~Helm Charts%", + "title": "%helm-plugin~Helm Chart(s)%", "catalogDescription": { "$codeRef": "getHelmCatalogTypeDescription" }, - "typeDescription": "%helm-plugin~**Helm Charts** are packages for deploying an Application or components of a larger Application.%", + "typeDescription": "%helm-plugin~**Helm Chart(s)** are packages for deploying an Application or components of a larger Application.%", "filters": [ { "label": "%helm-plugin~Chart Repositories%", @@ -217,7 +217,7 @@ "properties": { "catalogId": "dev-catalog", "type": "HelmChart", - "title": "%helm-plugin~Helm Charts%", + "title": "%helm-plugin~Helm Chart(s)%", "provider": { "$codeRef": "helmChartProvider" } }, "flags": { diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature b/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature index e0e88b8d6ce..833fee5ded9 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm-release.feature @@ -1,27 +1,27 @@ @helm @smoke -Feature: Helm Release +Feature: Helm release As a user, I want to perform actions on the helm release @pre-condition Scenario: Create or Select the project namespace - Given user is at the Helm Release tab in admin perspective + Given user is at the Helm release tab in admin perspective And user has created or selected namespace "aut-ci-helm" Scenario: Open the Helm tab on the navigation bar when helm charts are absent: HR-05-TC01 Given user is at administrator perspective - When user clicks on the Helm Release tab in admin perspective - Then user is able to see the message "No Helm Releases found" + When user clicks on the Helm release tab in admin perspective + Then user is able to see the message "No Helm releases found" And user will get the link to install helm charts from software catalog - Scenario: Create Helm Release page details: HR-05-TC02 + Scenario: Create Helm release page details: HR-05-TC02 Given user is at Software Catalog page - When user selects Helm Charts type from Software Catalog page + When user selects Helm Chart(s) type from Software Catalog page And user searches and selects "Nodejs" card from catalog page And user clicks on the Create button on side bar - Then Create Helm Release page is displayed + Then Create Helm release page is displayed And release name displays as "nodejs" And form view radio button is selected by default And yaml view radio button is enabled @@ -30,7 +30,7 @@ Feature: Helm Release Scenario: Install Helm Chart from +Add Page using Form View: HR-06-TC04 Given user is at Software Catalog page - When user selects Helm Charts type from Software Catalog page + When user selects Helm Chart(s) type from Software Catalog page And user searches and selects "Nodejs" card from catalog page And user clicks on the Create button on side bar And user enters Release Name as "nodejs-release" @@ -40,7 +40,7 @@ Feature: Helm Release Scenario: Helm release status verification: HR-01-TC04 - Given user is at the Helm Release tab in admin perspective + Given user is at the Helm release tab in admin perspective And user is able to see "nodejs-release" in helm page in admin view And user is able to see the status and status icon of "nodejs-release" under helm releases tab And user is able to see the "PendingInstall", "PendingUpgrade" and "PendingRollback" options under filter bar @@ -53,33 +53,33 @@ Feature: Helm Release Scenario: Context menu options of helm release: HR-01-TC01 Given user is at the Topology page When user right clicks on the helm release "nodejs-release" to open the context menu - Then user is able to see the context menu with actions Upgrade and Delete Helm Release + Then user is able to see the context menu with actions Upgrade and Delete Helm release Scenario: Open the Helm tab on the navigation bar when helm charts are present: HR-05-TC05 - Given user is at the Helm Release tab in admin perspective + Given user is at the Helm release tab in admin perspective Then user will see the helm charts listed - Scenario: Filter out deployed Helm Charts: HR-05-TC06 - Given user is at the Helm Release tab in admin perspective + Scenario: Filter out deployed Helm Chart(s): HR-05-TC06 + Given user is at the Helm release tab in admin perspective When user clicks on the filter drop down - And user selects checkbox for the "Deployed" Helm charts - Then the checkbox for the "Deployed" Helm chart is checked + And user selects checkbox for the "Deployed" Helm Charts + Then the checkbox for the "Deployed" Helm Chart is checked And helm charts with status "Deployed" are listed Scenario: Helm release details page: HR-05-TC13 - Given user is at the Helm Release tab in admin perspective + Given user is at the Helm release tab in admin perspective When user clicks on the helm release name "nodejs-release" Then user will see the Details page opened And user will see the Resources tab And user will see the Revision History tab And user will see the Release Notes tab - And user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm Release + And user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm release - Scenario: Perform Upgrade action on Helm Release through Context Menu: HR-08-TC04 + Scenario: Perform Upgrade action on Helm release through Context Menu: HR-08-TC04 Given user is at the Topology page When user right clicks on the helm release "nodejs-release" to open the context menu And user clicks on the "Upgrade" action @@ -91,7 +91,7 @@ Feature: Helm Release Scenario: Actions menu on Helm page after helm chart upgrade: HR-08-TC01 Given user is on the Helm page with helm release "nodejs-release" When user clicks on the Kebab menu - Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release + Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm release Scenario: Perform the helm chart upgrade for already upgraded helm chart : HR-08-TC02 @@ -100,10 +100,10 @@ Feature: Helm Release And user clicks on the "Upgrade" action And user upgrades the chart Version And user clicks on the upgrade button - Then user will be redirected to Helm Releases page under Helm tab + Then user will be redirected to Helm releases page under Helm tab - Scenario: Perform Rollback action on Helm Release through Context Menu: HR-08-TC03 + Scenario: Perform Rollback action on Helm release through Context Menu: HR-08-TC03 Given user is at the Topology page And user is on the topology sidebar of the helm release "nodejs-release" When user clicks on the Actions drop down menu @@ -113,10 +113,10 @@ Feature: Helm Release Then user will be redirected to Topology page - Scenario: Delete Helm Release through Context Menu: HR-01-TC03 + Scenario: Delete Helm release through Context Menu: HR-01-TC03 Given user is at the Topology page When user right clicks on the helm release "nodejs-release" to open the context menu - And user clicks on the "Delete Helm Release" action + And user clicks on the "Delete Helm release" action And user enters the release name "nodejs-release" And user clicks on the Delete button Then user will be redirected to Topology page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature index eb6b73ae7ce..6db8886c6be 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release-after-upgrade.feature @@ -1,5 +1,5 @@ @helm @smoke -Feature: Verify the Actions on Helm Release after upgrade +Feature: Verify the Actions on Helm release after upgrade As a user, I want to perform the actions on the helm releases in topology page Background: @@ -7,7 +7,7 @@ Feature: Verify the Actions on Helm Release after upgrade @pre-condition - Scenario: Perform Upgrade action on Helm Release through Context Menu: HR-08-TC04 + Scenario: Perform Upgrade action on Helm release through Context Menu: HR-08-TC04 Given user has installed helm chart "Nodejs" with helm release name "nodejs-release-1" And user is at the Topology page When user right clicks on the helm release "nodejs-release-1" to open the context menu @@ -19,7 +19,7 @@ Feature: Verify the Actions on Helm Release after upgrade Scenario: Actions menu on Helm page after helm chart upgrade: HR-08-TC01 Given user is on the Helm page with helm release "nodejs-release-1" When user clicks on the Kebab menu - Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release + Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm release Scenario: Perform the helm chart upgrade for already upgraded helm chart : HR-08-TC02 @@ -27,10 +27,10 @@ Feature: Verify the Actions on Helm Release after upgrade When user clicks on the Kebab menu And user clicks on the "Upgrade" action And user clicks on the upgrade button - Then user will be redirected to Helm Releases page + Then user will be redirected to Helm releases page - Scenario: Perform Rollback action on Helm Release through Context Menu: HR-08-TC03 + Scenario: Perform Rollback action on Helm release through Context Menu: HR-08-TC03 Given user is at the Topology page And user is on the topology sidebar of the helm release "nodejs-release-1" When user clicks on the Actions drop down menu diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature index 517465d6826..87f8bd7d546 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/actions-on-helm-release.feature @@ -1,5 +1,5 @@ @helm @smoke -Feature: Perform Actions on Helm Releases +Feature: Perform Actions on Helm releases As a user, I want to perform the actions on the helm releases in topology page Background: @@ -21,19 +21,19 @@ Feature: Perform Actions on Helm Releases Scenario: Context menu options of helm release: HR-01-TC01 Given user is at the Topology page When user right clicks on the helm release "nodejs-release-2" to open the context menu - Then user is able to see the context menu with actions Upgrade and Delete Helm Release + Then user is able to see the context menu with actions Upgrade and Delete Helm release Scenario: Actions menu on Helm page: HR-01-TC02 Given user is on the Helm page with helm release "nodejs-release-2" When user clicks on the Kebab menu - Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release + Then user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm release - Scenario: Delete Helm Release through Context Menu: HR-01-TC03 + Scenario: Delete Helm release through Context Menu: HR-01-TC03 Given user is at the Topology page When user right clicks on the helm release "nodejs-release-2" to open the context menu - And user clicks on the "Delete Helm Release" action + And user clicks on the "Delete Helm release" action And user enters the release name "nodejs-release-2" And user clicks on the Delete button Then user will be redirected to Topology page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature index dd5e5991604..a60bbe95e5d 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-compatibility.feature @@ -11,7 +11,7 @@ Feature: Helm Chart Scenario: Compatible helm charts: HR-02-TC01 Given user is at Add page When user clicks on the Helm Chart card on the Add page - Then user redirects to Helm Charts page + Then user redirects to Helm Chart(s) page And user is able to see helm charts @@ -26,6 +26,6 @@ Feature: Helm Chart @regression @manual Scenario: Check the chart versions in the chart version dropdown if they are compatible with the cluster: HR-02-TC03 - Given user is at the Create Helm Release page + Given user is at the Create Helm release page When user clicks on the Chart Version dropdown menu Then user will see the chart versions which are compatible with the kubeversion of the cluster diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-feature-flag.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-feature-flag.feature index bc1dada398b..18712f66a76 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-feature-flag.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-feature-flag.feature @@ -17,7 +17,7 @@ Feature: Feature flag for Helm And user clicks on Save Then user is not able to see the Helm tab in the navigation menu And user can not see Helm Chart card in Add page - And user can not see Helm Charts filter in the Software Catalog page + And user can not see Helm Chart(s) filter in the Software Catalog page @regression @manual @@ -30,4 +30,4 @@ Feature: Feature flag for Helm And user clicks on Save Then user is able to see the Helm tab in the navigation menu And user can see Helm Chart card in Add page - And user can see Helm Charts filter in the Software Catalog page + And user can see Helm Chart(s) filter in the Software Catalog page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature index 4c06477b7e9..74eeea7e4fb 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-installation-view.feature @@ -20,7 +20,7 @@ Feature: Helm Chart Installation View @manual Scenario: Switch from YAML to Form view: HR-04-TC02 - Given user is at the Create Helm Release page + Given user is at the Create Helm release page When user selects the YAML view And user does some changes in the yaml for helm chart And user selects the Form view @@ -41,7 +41,7 @@ Feature: Helm Chart Installation View Then user will see Release Name, Replica count as "nodejs-release-3", "3" respectively @regression - Scenario: When Helm Release is not configurable: HR-04-TC04 + Scenario: When Helm release is not configurable: HR-04-TC04 Given user is at Add page When user selects "Helm Chart" card from add page And user searches and selects "Httpd Imagestreams" card from catalog page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature index 53a2cdaf511..00fc2c41e64 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-navigation.feature @@ -1,6 +1,6 @@ @helm Feature: Navigations on Helm Chart - As a user, I want to navigate to different pages related to Helm Charts + As a user, I want to navigate to different pages related to Helm Chart(s) Background: Given user has created or selected namespace "aut-helm" @@ -11,17 +11,17 @@ Feature: Navigations on Helm Chart Scenario: Open the Helm tab on the navigation bar when helm charts are absent: HR-05-TC01 When user clicks on the Helm tab in dev perspective Then user will be redirected to Helm releases page - And user is able to see the message "No Helm Releases found" + And user is able to see the message "No Helm releases found" And user will get the link to install helm charts from software catalog @smoke - Scenario: Create Helm Release page details: HR-05-TC02 + Scenario: Create Helm release page details: HR-05-TC02 Given user is at Add page When user selects "Helm Chart" card from add page And user searches and selects "Nodejs" card from catalog page And user clicks on the Create button on side bar - Then Create Helm Release page is displayed + Then Create Helm release page is displayed And release name displays as "nodejs" And form view radio button is selected by default And yaml view radio button is enabled @@ -30,7 +30,7 @@ Feature: Navigations on Helm Chart @smoke Scenario: Yaml view editor for Install Helm Chart page: HR-05-TC03 - Given user is at Create Helm Release page + Given user is at Create Helm release page When user selects YAML view Then user is able to see YAML editor @@ -55,29 +55,29 @@ Feature: Navigations on Helm Chart @regression - Scenario: Filter out deployed Helm Charts: HR-05-TC06 + Scenario: Filter out deployed Helm Chart(s): HR-05-TC06 Given user is at the Helm page When user clicks on the filter drop down - And user selects checkbox for the "Deployed" Helm charts - Then the checkbox for the "Deployed" Helm chart is checked + And user selects checkbox for the "Deployed" Helm Charts + Then the checkbox for the "Deployed" Helm Chart is checked And helm charts with status "Deployed" are listed @regression @manual - Scenario: Filter out failed Helm Charts: HR-05-TC07 + Scenario: Filter out failed Helm Chart(s): HR-05-TC07 Given user is at the Helm page When user clicks on the filter drop down - And user selects checkbox for the "Failed" Helm charts - Then the checkbox for the "Failed" Helm chart is checked + And user selects checkbox for the "Failed" Helm Charts + Then the checkbox for the "Failed" Helm Chart is checked And helm charts with status "Failed" are listed @regression @manual - Scenario: Filter out other Helm charts: HR-05-TC08 + Scenario: Filter out other Helm Charts: HR-05-TC08 Given user is at the Helm page When user clicks on the filter drop down - And user selects checkbox for the "Other" Helm charts - Then the checkbox for the "Other" Helm chart is checked + And user selects checkbox for the "Other" Helm Charts + Then the checkbox for the "Other" Helm Chart is checked And helm charts with status "Other" are listed @@ -85,15 +85,15 @@ Feature: Navigations on Helm Chart Scenario: Select all filters: HR-05-TC09 Given user is at the Helm page When user clicks on the filter drop down - And user selects checkbox for the "All" Helm charts - Then the checkbox for the "All" Helm chart is checked + And user selects checkbox for the "All" Helm Charts + Then the checkbox for the "All" Helm Chart is checked @regression Scenario: Clear all filters: HR-05-TC10 Given user is at the Helm page When user clicks on the filter drop down - And user selects checkbox for the "All" Helm charts + And user selects checkbox for the "All" Helm Charts And user clicks on the clear all filters button Then "All" filters selected will get removed @@ -113,4 +113,4 @@ Feature: Navigations on Helm Chart And user will see the Resources tab And user will see the Revision History tab And user will see the Release Notes tab - And user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm Release + And user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm release diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature index 81babda9d9f..68e94730fc6 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/helm-page-tabs.feature @@ -12,10 +12,10 @@ Feature: Add repositories tab in Helm navigation item Scenario: Helm Page on developer perspective: HR-09-TC01 Given user is at developer perspective When user clicks on the Helm tab in dev perspective - Then user is able to see Helm Releases and Repositories Tabs - And user is able to see the message "No Helm Releases found" - And user is able to see the link "Browse the catalog to discover available Helm Charts" - And user is able to see the Create drop down menu with Helm Release and Repository options + Then user is able to see Helm releases and Repositories Tabs + And user is able to see the message "No Helm releases found" + And user is able to see the link "Browse the catalog to discover available Helm Chart(s)" + And user is able to see the Create drop down menu with Helm release and Repository options @regression @@ -29,7 +29,7 @@ Feature: Add repositories tab in Helm navigation item @regression - Scenario: Click on Create Helm Release: HR-09-TC03 + Scenario: Click on Create Helm release: HR-09-TC03 Given user is at the Helm page When user clicks on Helm release in create action menu And user searches and selects "Nodejs" card from catalog page diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature index a44c46b1477..576e1f2da13 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/install-helm-chart.feature @@ -1,5 +1,5 @@ @helm -Feature: Install the Helm Release +Feature: Install the Helm release As a user, I want to install the helm release @@ -15,13 +15,13 @@ Feature: Install the Helm Release @smoke @manual - Scenario: Software Catalog Page when Helm Charts checkbox is selected: HR-06-TC02 + Scenario: Software Catalog Page when Helm Chart(s) checkbox is selected: HR-06-TC02 Given user is at Add page And user has added multiple helm charts repositories When user selects "Helm Chart" card from add page - Then user will get redirected to Helm Charts page + Then user will get redirected to Helm Chart(s) page And user will see the list of Chart Repositories - And user will see the cards of Helm Charts + And user will see the cards of Helm Chart(s) And user will see Filter by Keyword field And user will see A-Z, Z-A sort by dropdown diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature index 9bda9bf0c25..215fff3c72b 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/install-url-chart.feature @@ -1,6 +1,6 @@ @helm Feature: Install Helm Chart from URL - As a user, I want to install a Helm chart from an OCI or HTTP URL + As a user, I want to install a Helm Chart from an OCI or HTTP URL Background: diff --git a/frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature b/frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature index 047a13e20c7..2b6e7c1443b 100644 --- a/frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature +++ b/frontend/packages/helm-plugin/integration-tests/features/helm/topology-helm-release.feature @@ -14,7 +14,7 @@ Feature: Actions on Helm release in topology page @regression - Scenario: Deployment link on the sidebar for the Helm Release: HR-07-TC02 + Scenario: Deployment link on the sidebar for the Helm release: HR-07-TC02 Given user is at the Topology page And user is on the topology sidebar of the helm release "nodejs-release" When user switches to the "Resources" tab @@ -23,7 +23,7 @@ Feature: Actions on Helm release in topology page @regression - Scenario: Build Configs link on the sidebar for the Helm Release: HR-07-TC03 + Scenario: Build Configs link on the sidebar for the Helm release: HR-07-TC03 Given user is at the Topology page And user is on the topology sidebar of the helm release "nodejs-release" When user switches to the "Resources" tab @@ -32,7 +32,7 @@ Feature: Actions on Helm release in topology page @regression - Scenario: Services link on the sidebar for the Helm Release: HR-07-TC04 + Scenario: Services link on the sidebar for the Helm release: HR-07-TC04 Given user is at the Topology page And user is on the topology sidebar of the helm release "nodejs-release" When user switches to the "Resources" tab @@ -41,7 +41,7 @@ Feature: Actions on Helm release in topology page @regression - Scenario: Image Streams link on the sidebar for the Helm Release: HR-07-TC05 + Scenario: Image Streams link on the sidebar for the Helm release: HR-07-TC05 Given user is at the Topology page And user is on the topology sidebar of the helm release "nodejs-release" When user switches to the "Resources" tab @@ -50,7 +50,7 @@ Feature: Actions on Helm release in topology page @regression - Scenario: Routes link on the sidebar for the Helm Release: HR-07-TC06 + Scenario: Routes link on the sidebar for the Helm release: HR-07-TC06 Given user is at the Topology page And user is on the topology sidebar of the helm release "nodejs-release" When user switches to the "Resources" tab diff --git a/frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts b/frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts index 44ea5e5c110..6382ef0cd61 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/constants/static-text/helm-text.ts @@ -1,3 +1,3 @@ export const messages = { - noHelmReleasesFound: 'No Helm Releases found', + noHelmReleasesFound: 'No Helm releases found', }; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts index ba1555a3848..e796227f3fa 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-details-page.ts @@ -5,7 +5,7 @@ import { helmPO } from '@console/dev-console/integration-tests/support/pageObjec const actions = [helmActions.upgrade, helmActions.rollback, helmActions.deleteHelmRelease]; export const helmDetailsPage = { - verifyTitle: () => cy.byTestSectionHeading('Helm Release details').should('be.visible'), + verifyTitle: () => cy.byTestSectionHeading('Helm release details').should('be.visible'), verifyHelmReleaseStatus: () => cy.get('[data-test="status-text"]').should('be.visible'), verifyResourcesTab: () => cy.get(helmPO.resourcesTab).should('be.visible'), verifyReleaseNotesTab: () => cy.get(helmPO.revisionHistoryTab).should('be.visible'), @@ -23,12 +23,12 @@ export const helmDetailsPage = { cy.get('dl dt').contains(fieldName).next('dd').should('contain.text', fieldValue); }, uninstallHelmRelease: () => { - cy.byLegacyTestID('modal-title').should('contain.text', 'Delete Helm Release?'); + cy.byLegacyTestID('modal-title').should('contain.text', 'Delete Helm release?'); cy.byTestID('confirm-action').click({ force: true }); modal.shouldBeClosed(); }, enterReleaseNameInUninstallPopup: (releaseName: string = 'nodejs-release') => { - modal.modalTitleShouldContain('Delete Helm Release?'); + modal.modalTitleShouldContain('Delete Helm release?'); cy.byTestID('resource-name').should('have.text', releaseName); cy.get(helmPO.uninstallHelmRelease.releaseName).type(releaseName); }, @@ -48,7 +48,7 @@ export const helmDetailsPage = { clickHelmActionButton: () => cy.byTestID('console-select-menu-toggle').click(), verifyActionsInCreateMenu: () => { cy.byTestID('console-select-item').contains('Repository').should('exist'); - cy.byTestID('console-select-item').contains('Helm Release').should('exist'); + cy.byTestID('console-select-item').contains('Helm release').should('exist'); }, clickCreateMenu: (createMenuOption: string) => { cy.byTestID('console-select-menu-toggle').click(); @@ -59,7 +59,7 @@ export const helmDetailsPage = { cy.byTestID(`chartRepositoryTitle-${repoName}`).click(), clickCreateHelmRelease: () => { cy.byTestID('console-select-menu-toggle').click(); - cy.byTestID('console-select-item').contains('Helm Release').click(); + cy.byTestID('console-select-item').contains('Helm release').click(); }, clickCreateRepository: () => { cy.byTestID('console-select-menu-toggle').click(); diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts index 7d940ef8066..3d0ff83f6c5 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/helm-page.ts @@ -7,7 +7,7 @@ export const helmPage = { verifyInstallHelmLink: () => cy .get('a') - .contains('Browse the catalog to discover available Helm Charts') + .contains('Browse the catalog to discover available Helm Chart(s)') .should('be.visible'), search: (name: string) => { cy.get(helmPO.filters).within(() => cy.get('.pf-v6-c-menu-toggle').first().click()); @@ -163,7 +163,7 @@ export const helmPage = { case helmActions.rollback: cy.get(helmPO.helmActions.rollBack).click(); break; - case 'Delete Helm Release': + case 'Delete Helm release': case helmActions.deleteHelmRelease: cy.get(helmPO.helmActions.deleteHelmRelease).click(); break; diff --git a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts index 161c89791b5..d817c16ffdb 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/pages/helm/upgrade-helm-release-page.ts @@ -2,7 +2,7 @@ import { warningModal } from '@console/cypress-integration-tests/views/warning-m import { helmPO } from '@console/dev-console/integration-tests/support/pageObjects/helm-po'; export const upgradeHelmRelease = { - verifyTitle: () => cy.get('h1').contains('Upgrade Helm Release').should('be.visible'), + verifyTitle: () => cy.get('h1').contains('Upgrade Helm release').should('be.visible'), updateReplicaCount: (replicaCount: string = '2') => cy.get(helmPO.upgradeHelmRelease.replicaCount).clear().type(replicaCount), upgradeChartVersion: () => { diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts index cc33120124d..d18c17cc83d 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/common/common.ts @@ -92,7 +92,7 @@ Given('user is at Software Catalog page', () => { catalogPage.verifyTitle(); }); -When('user selects Helm Charts type from Software Catalog page', () => { +When('user selects Helm Chart(s) type from Software Catalog page', () => { catalogPage.selectCatalogType(catalogTypes.HelmCharts); // Wait for catalog cards to be filtered and displayed catalogPage.isCardsDisplayed(); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts index cd4f0bca2ae..8b247c24ff2 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-compatibility.ts @@ -5,7 +5,7 @@ import { pageTitle } from '@console/dev-console/integration-tests/support/consta import { catalogPO } from '@console/dev-console/integration-tests/support/pageObjects'; import { addPage } from '@console/dev-console/integration-tests/support/pages/add-flow/add-page'; -Given('user is at the Create Helm Release page', () => { +Given('user is at the Create Helm release page', () => { addPage.selectCardFromOptions(addOptions.HelmChart); }); @@ -13,7 +13,7 @@ When('user clicks on the Helm Chart card on the Add page', () => { addPage.selectCardFromOptions(addOptions.HelmChart); }); -When('user redirects to Helm Charts page', () => { +When('user redirects to Helm Chart(s) page', () => { detailsPage.titleShouldContain(pageTitle.HelmCharts); }); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts index 591ea417b7b..e8aae6b4a79 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-navigation.ts @@ -64,7 +64,7 @@ When('user searches and selects {string} card from catalog page', (cardName: str catalogPage.selectHelmChartCard(cardName); }); -Then('Create Helm Release page is displayed', () => { +Then('Create Helm release page is displayed', () => { cy.get('[data-test="form-title"]').should('have.text', pageTitle.CreateHelmRelease); }); @@ -72,7 +72,7 @@ Then('release name displays as {string}', (name: string) => { cy.get(catalogPO.installHelmChart.releaseName).should('have.value', name); }); -Given('user is at Create Helm Release page', () => { +Given('user is at Create Helm release page', () => { navigateTo(devNavigationMenu.Add); addPage.selectCardFromOptions(addOptions.HelmChart); catalogPage.search('Nodejs'); @@ -99,12 +99,12 @@ Given('user is at the Helm page', () => { cy.clickNavLink(navPaths.helm); }); -Given('user is at the Helm Release tab in admin perspective', () => { +Given('user is at the Helm release tab in admin perspective', () => { cy.clickNavLink(navPaths.helm); - cy.byLegacyTestID('horizontal-link-Helm Releases').should('exist').click({ force: true }); + cy.byLegacyTestID('horizontal-link-Helm releases').should('exist').click({ force: true }); }); -When('user selects checkbox for the Deployed Helm charts', (workloadName: string) => { +When('user selects checkbox for the Deployed Helm Charts', (workloadName: string) => { topologyPage.verifyWorkloadInTopologyPage(workloadName); }); @@ -138,7 +138,7 @@ Then('user will see the Release Notes tab', () => { }); Then( - 'user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm Release', + 'user will see the Actions drop down menu with options Upgrade, Rollback, and Delete Helm release', () => { helmDetailsPage.verifyActionsDropdown(); helmDetailsPage.clickActionMenu(); @@ -155,11 +155,11 @@ When('user clicks on the filter drop down', () => { cy.get(helmPO.filterDropdown).click(); }); -When('user selects checkbox for the {string} Helm charts', (status: string) => { +When('user selects checkbox for the {string} Helm Charts', (status: string) => { helmPage.selectHelmFilter(status); }); -When('the checkbox for the {string} Helm chart is checked', (status: string) => { +When('the checkbox for the {string} Helm Chart is checked', (status: string) => { helmPage.verifyHelmFilterSelected(status); }); @@ -213,8 +213,8 @@ Then('user is redirected to Repositories tab', () => { helmDetailsPage.selectedHelmTab('Repositories'); }); -Then('user is able to see Helm Releases and Repositories Tabs', () => { - helmDetailsPage.checkHelmTab('Helm Releases'); +Then('user is able to see Helm releases and Repositories Tabs', () => { + helmDetailsPage.checkHelmTab('Helm releases'); helmDetailsPage.checkHelmTab('Repositories'); }); @@ -223,7 +223,7 @@ When('user clicks on Repositories tab', () => { }); Then( - 'user is able to see the Create drop down menu with Helm Release and Repository options', + 'user is able to see the Create drop down menu with Helm release and Repository options', () => { helmDetailsPage.verifyHelmActionsDropdown(); helmDetailsPage.clickHelmActionButton(); diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts index b191e750f06..e34c911d3f2 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm-release.ts @@ -26,7 +26,7 @@ When( ); Then( - 'user is able to see the context menu with actions Upgrade, Rollback and Uninstall Helm Release', + 'user is able to see the context menu with actions Upgrade, Rollback and Uninstall Helm release', () => { cy.get('ul[role="menu"]').should('be.visible'); cy.get(helmPO.helmActions.upgrade).should('be.visible'); @@ -35,10 +35,10 @@ Then( }, ); -Then('user is able to see the context menu with actions Upgrade and Delete Helm Release', () => { +Then('user is able to see the context menu with actions Upgrade and Delete Helm release', () => { cy.get('div.odc-topology-context-menu').should('be.visible'); cy.byTestActionID('Upgrade').should('be.visible'); - cy.byTestActionID('Delete Helm Release').should('be.visible'); + cy.byTestActionID('Delete Helm release').should('be.visible'); }); Given('user is on the topology sidebar of the helm release {string}', (helmReleaseName: string) => { @@ -51,7 +51,7 @@ When('user clicks on the Actions drop down menu', () => { }); Then( - 'user is able to see the actions dropdown menu with actions Upgrade, Rollback and Uninstall Helm Release', + 'user is able to see the actions dropdown menu with actions Upgrade, Rollback and Uninstall Helm release', () => { topologySidePane.verifyActions( helmActions.upgrade, @@ -62,9 +62,9 @@ Then( ); Then( - 'user is able to see the actions dropdown menu with actions Upgrade and Uninstall Helm Release', + 'user is able to see the actions dropdown menu with actions Upgrade and Uninstall Helm release', () => { - const actions = ['Upgrade', 'Uninstall Helm Release']; + const actions = ['Upgrade', 'Uninstall Helm release']; cy.byLegacyTestID('action-items') .children() .each(($ele) => { @@ -82,12 +82,12 @@ Given('user is able to see {string} in helm page in admin view', (helmRelease: s helmPage.search(helmRelease); }); -When('user clicks on the Helm Release tab in admin perspective', () => { +When('user clicks on the Helm release tab in admin perspective', () => { cy.clickNavLink(navPaths.helm); - cy.byLegacyTestID('horizontal-link-Helm Releases').should('exist').click({ force: true }); + cy.byLegacyTestID('horizontal-link-Helm releases').should('exist').click({ force: true }); }); -Then('user will be redirected to Helm Releases page under Helm tab', () => { +Then('user will be redirected to Helm releases page under Helm tab', () => { cy.get('[data-test-id="helm-nav"]').should('be.visible'); }); @@ -96,7 +96,7 @@ When('user clicks on the Kebab menu', () => { }); Then( - 'user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm Release', + 'user is able to see kebab menu with actions Upgrade, Rollback and Delete Helm release', () => { topologySidePane.verifyActions( helmActions.upgrade, diff --git a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm.ts b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm.ts index 095ae827385..d7ba78d65b4 100644 --- a/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm.ts +++ b/frontend/packages/helm-plugin/integration-tests/support/step-definitions/helm/helm.ts @@ -60,7 +60,7 @@ Then('user has added multiple helm charts repositories', () => { navigateTo(devNavigationMenu.Add); }); -Then('user will get redirected to Helm Charts page', () => { +Then('user will get redirected to Helm Chart(s) page', () => { detailsPage.titleShouldContain(pageTitle.HelmCharts); }); @@ -68,7 +68,7 @@ Then('user will see the list of Chart Repositories', () => { catalogPage.verifyChartListAvailable(); }); -Then('user will see the cards of Helm Charts', () => { +Then('user will see the cards of Helm Chart(s)', () => { catalogPage.verifyHelmChartCardsAvailable(); }); diff --git a/frontend/packages/helm-plugin/locales/en/helm-plugin.json b/frontend/packages/helm-plugin/locales/en/helm-plugin.json index 47c4069d156..7867c367b82 100644 --- a/frontend/packages/helm-plugin/locales/en/helm-plugin.json +++ b/frontend/packages/helm-plugin/locales/en/helm-plugin.json @@ -5,15 +5,15 @@ "ProjectHelmChartRepositories": "ProjectHelmChartRepositories", "Helm Chart repositories": "Helm Chart repositories", "Helm Chart": "Helm Chart", - "Browse the catalog to discover and install Helm Charts": "Browse the catalog to discover and install Helm Charts", + "Browse the catalog to discover and install Helm Chart(s)": "Browse the catalog to discover and install Helm Chart(s)", "Add a Helm Chart Repository to extend the Developer Catalog": "Add a Helm Chart Repository to extend the Developer Catalog", - "Helm Charts": "Helm Charts", - "**Helm Charts** are packages for deploying an Application or components of a larger Application.": "**Helm Charts** are packages for deploying an Application or components of a larger Application.", + "Helm Chart(s)": "Helm Chart(s)", + "**Helm Chart(s)** are packages for deploying an Application or components of a larger Application.": "**Helm Chart(s)** are packages for deploying an Application or components of a larger Application.", "Chart Repositories": "Chart Repositories", "Source": "Source", "Helm": "Helm", "Release notes": "Release notes", - "Delete Helm Release": "Delete Helm Release", + "Delete Helm release": "Delete Helm release", "Delete": "Delete", "Upgrade": "Upgrade", "Rollback": "Rollback", @@ -36,12 +36,12 @@ "Community": "Community", "Partner": "Partner", "Red Hat": "Red Hat", - "Helm Releases": "Helm Releases", - "Helm Release details": "Helm Release details", + "Helm releases": "Helm releases", + "Helm release details": "Helm release details", "Resources": "Resources", "Revision history": "Revision history", - "Unable to load Helm Release history": "Unable to load Helm Release history", - "Helm Release history": "Helm Release history", + "Unable to load Helm release history": "Unable to load Helm release history", + "Helm release history": "Helm release history", "of": "of", "Items per page": "Items per page", "per page": "per page", @@ -106,44 +106,49 @@ "Proceed": "Proceed", "Select the version to upgrade to.": "Select the version to upgrade to.", "No versions available": "No versions available", - "Helm Release": "Helm Release", "For more information on the chart, refer to this <2>README": "For more information on the chart, refer to this <2>README", - "Helm Chart cannot be installed": "Helm Chart cannot be installed", - "The Helm Chart is currently unavailable. {{chartError}}": "The Helm Chart is currently unavailable. {{chartError}}", - "Release name": "Release name", - "A unique name for the Helm Release.": "A unique name for the Helm Release.", - "Helm release is not configurable since the Helm Chart doesn't define any values.": "Helm release is not configurable since the Helm Chart doesn't define any values.", + "Secret for basic authentication": "Secret for basic authentication", + "Select a secret": "Select a secret", + "Create Secret": "Create Secret", + "Secret with \"username\" and \"password\" keys for OCI/HTTP(S) authentication.": "Secret with \"username\" and \"password\" keys for OCI/HTTP(S) authentication.", + "Secret \"{{secretName}}\" was not found in this namespace. Select an existing secret or create a new one.": "Secret \"{{secretName}}\" was not found in this namespace. Select an existing secret or create a new one.", "Errors in the form data.": "Errors in the form data.", "Invalid Form Schema - {{errorText}}": "Invalid Form Schema - {{errorText}}", "Invalid YAML - {{errorText}}": "Invalid YAML - {{errorText}}", "Select the version to rollback <1>{{releaseName}} to, from the table below:": "Select the version to rollback <1>{{releaseName}} to, from the table below:", "Select": "Select", "Must be a valid OCI URL or a valid HTTP/HTTPS tar file; for example - oci://registry.example.com/chart, https://example.com/chart-1.0.0.tgz.": "Must be a valid OCI URL or a valid HTTP/HTTPS tar file; for example - oci://registry.example.com/chart, https://example.com/chart-1.0.0.tgz.", + "Failed to create Secret.": "Failed to create Secret.", + "Create authentication Secret": "Create authentication Secret", + "Optional username for OCI/HTTP(S) authentication.": "Optional username for OCI/HTTP(S) authentication.", + "Password or token for OCI/HTTP(S) authentication.": "Password or token for OCI/HTTP(S) authentication.", "Invalid chart URL format.": "Invalid chart URL format.", - "Install Helm chart from URL": "Install Helm chart from URL", - "To install a Helm chart, enter the chart URL - Open Container Initiative (OCI) URL or HTTP/HTTPS tar file and version.": "To install a Helm chart, enter the chart URL - Open Container Initiative (OCI) URL or HTTP/HTTPS tar file and version.", + "Install Helm Chart from URL": "Install Helm Chart from URL", + "Enter an OCI registry URL or an HTTP/HTTPS .tar file link and version to install the chart.": "Enter an OCI registry URL or an HTTP/HTTPS .tar file link and version to install the chart.", "Chart URL": "Chart URL", - "The OCI URL or HTTP/HTTPS tar file for the Helm chart; for example - oci://registry.example.com/charts/mychart or https://example.com/chart-1.0.0.tgz.": "The OCI URL or HTTP/HTTPS tar file for the Helm chart; for example - oci://registry.example.com/charts/mychart or https://example.com/chart-1.0.0.tgz.", + "OCI or HTTP/HTTPS .tar file for the Helm Chart; for example, oci://registry.example.com/charts/mychart or https://example.com/chart-1.0.0.tgz.": "OCI or HTTP/HTTPS .tar file for the Helm Chart; for example, oci://registry.example.com/charts/mychart or https://example.com/chart-1.0.0.tgz.", + "Release name": "Release name", "Unique name for Helm release.": "Unique name for Helm release.", "The version of chart to install.": "The version of chart to install.", "Secret for Basic authentication": "Secret for Basic authentication", - "Select a secret": "Select a secret", - "A secret with \"username\" and \"password\" keys for OCI/HTTP(S) authentication": "A secret with \"username\" and \"password\" keys for OCI/HTTP(S) authentication", "Next": "Next", - "Install Helm chart from Helm registry.": "Install Helm chart from Helm registry.", + "Install Helm Chart from Helm registry.": "Install Helm Chart from Helm registry.", "Helm release": "Helm release", - "Complete the form to create a Helm release. The Helm chart authors might have provided some default values.": "Complete the form to create a Helm release. The Helm chart authors might have provided some default values.", + "Complete the form to create a Helm release. The Helm Chart authors might have provided some default values.": "Complete the form to create a Helm release. The Helm Chart authors might have provided some default values.", "Configure Helm release": "Configure Helm release", + "Helm Chart cannot be installed": "Helm Chart cannot be installed", + "The Helm Chart is currently unavailable. {{chartError}}": "The Helm Chart is currently unavailable. {{chartError}}", "Version": "Version", "None": "None", + "Helm release is not configurable since the Helm Chart doesn't define any values.": "Helm release is not configurable since the Helm Chart doesn't define any values.", "Install": "Install", "Back": "Back", "Namespace": "Namespace", - "Unable to load Helm Releases": "Unable to load Helm Releases", + "Unable to load Helm releases": "Unable to load Helm releases", "Filter by status": "Filter by status", - "No Helm Releases found": "No Helm Releases found", - "Browse the catalog to discover available Helm Charts": "Browse the catalog to discover available Helm Charts", - "Helm chart URL": "Helm chart URL", + "No Helm releases found": "No Helm releases found", + "Browse the catalog to discover available Helm Chart(s)": "Browse the catalog to discover available Helm Chart(s)", + "Helm Chart URL": "Helm Chart URL", "Repositories": "Repositories", "Select a Project to view its details<1>.": "Select a Project to view its details<1>.", "All Namespaces": "All Namespaces", @@ -157,11 +162,11 @@ "Unable to find resource for {{helmLabel}}": "Unable to find resource for {{helmLabel}}", " / App Version {{appVersion}}": " / App Version {{appVersion}}", " (Provided by {{chartRepoName}})": " (Provided by {{chartRepoName}})", - "Create Helm Release": "Create Helm Release", - "The Helm Release can be created by completing the form. Default values may be provided by the Helm chart authors.": "The Helm Release can be created by completing the form. Default values may be provided by the Helm chart authors.", - "The Helm Release can be created by manually entering YAML or JSON definitions.": "The Helm Release can be created by manually entering YAML or JSON definitions.", - "Upgrade Helm Release": "Upgrade Helm Release", + "Create Helm release": "Create Helm release", + "The Helm release can be created by completing the form. Default values may be provided by the Helm Chart authors.": "The Helm release can be created by completing the form. Default values may be provided by the Helm Chart authors.", + "The Helm release can be created by manually entering YAML or JSON definitions.": "The Helm release can be created by manually entering YAML or JSON definitions.", + "Upgrade Helm release": "Upgrade Helm release", "Upgrade by selecting a new chart version or manually changing the form values.": "Upgrade by selecting a new chart version or manually changing the form values.", "Upgrade by selecting a new chart version or manually changing YAML.": "Upgrade by selecting a new chart version or manually changing YAML.", - "Rollback Helm Release": "Rollback Helm Release" + "Rollback Helm release": "Rollback Helm release" } \ No newline at end of file diff --git a/frontend/packages/helm-plugin/src/actions/add-resources.tsx b/frontend/packages/helm-plugin/src/actions/add-resources.tsx index 000382270b0..c64b94656d5 100644 --- a/frontend/packages/helm-plugin/src/actions/add-resources.tsx +++ b/frontend/packages/helm-plugin/src/actions/add-resources.tsx @@ -8,7 +8,7 @@ export const AddHelmChartAction = ( accessReviewDisabled?: boolean, ): Action => ({ id: 'helm', - label: i18next.t('helm-plugin~Helm Charts'), + label: i18next.t('helm-plugin~Helm Chart(s)'), icon: helmCatalogIconSVG, cta: { href: `/catalog/ns/${namespace}?catalogType=HelmChart`, diff --git a/frontend/packages/helm-plugin/src/actions/creators.ts b/frontend/packages/helm-plugin/src/actions/creators.ts index 03f7aee908d..99c602727a2 100644 --- a/frontend/packages/helm-plugin/src/actions/creators.ts +++ b/frontend/packages/helm-plugin/src/actions/creators.ts @@ -24,11 +24,11 @@ export const useHelmDeleteAction = (scope: HelmActionsScope, t: TFunction): Acti return { id: 'delete-helm', - label: t('helm-plugin~Delete Helm Release'), + label: t('helm-plugin~Delete Helm release'), cta: () => { launchModal(LazyDeleteResourceModalOverlay, { resourceName: releaseName, - resourceType: 'Helm Release', + resourceType: 'Helm release', actionLabel: t('helm-plugin~Delete'), redirect, onSubmit: () => { diff --git a/frontend/packages/helm-plugin/src/catalog/utils/catalog-utils.tsx b/frontend/packages/helm-plugin/src/catalog/utils/catalog-utils.tsx index 0f52a7b2e0b..68ccd2c8a51 100644 --- a/frontend/packages/helm-plugin/src/catalog/utils/catalog-utils.tsx +++ b/frontend/packages/helm-plugin/src/catalog/utils/catalog-utils.tsx @@ -170,7 +170,7 @@ export const normalizeHelmCharts = ( supportUrl, }; - // group Helm chart with same name and different version together + // group Helm Chart with same name and different version together const existingChartIndex = normalizedCharts.findIndex((currentChart) => { return ( (currentChart.attributes?.name === name && diff --git a/frontend/packages/helm-plugin/src/components/__tests__/helm-release-mock-data.ts b/frontend/packages/helm-plugin/src/components/__tests__/helm-release-mock-data.ts index bd97a62af82..2acd3e8a8c9 100644 --- a/frontend/packages/helm-plugin/src/components/__tests__/helm-release-mock-data.ts +++ b/frontend/packages/helm-plugin/src/components/__tests__/helm-release-mock-data.ts @@ -79,7 +79,7 @@ export const mockHelmReleases: HelmRelease[] = [ metadata: { name: 'nodejs-ex-k', version: '0.1.0', - description: 'A Helm chart for Kubernetes', + description: 'A Helm Chart for Kubernetes', apiVersion: 'v2', appVersion: '1.16.0', type: 'application', @@ -109,7 +109,7 @@ export const mockHelmReleases: HelmRelease[] = [ metadata: { name: 'nodejs-ex-k', version: '0.1.0', - description: 'A Helm chart for Kubernetes', + description: 'A Helm Chart for Kubernetes', apiVersion: 'v2', appVersion: '1.16.0', type: 'application', @@ -139,7 +139,7 @@ export const mockHelmReleases: HelmRelease[] = [ metadata: { name: 'nodejs-ex-k', version: '0.1.0', - description: 'A Helm chart for Kubernetes', + description: 'A Helm Chart for Kubernetes', apiVersion: 'v2', appVersion: '1.16.0', type: 'application', diff --git a/frontend/packages/helm-plugin/src/components/details-page/HelmReleaseDetails.tsx b/frontend/packages/helm-plugin/src/components/details-page/HelmReleaseDetails.tsx index 8d90cf49a7f..75460100028 100755 --- a/frontend/packages/helm-plugin/src/components/details-page/HelmReleaseDetails.tsx +++ b/frontend/packages/helm-plugin/src/components/details-page/HelmReleaseDetails.tsx @@ -109,10 +109,10 @@ export const LoadedHelmReleaseDetails: FC = ({ customData={helmRelease.data} breadcrumbsFor={() => [ { - name: t('Helm Releases'), + name: t('Helm releases'), path: `/helm/ns/${namespace}`, }, - { name: t('Helm Release details'), path: `${location.pathname}` }, + { name: t('Helm release details'), path: `${location.pathname}` }, ]} title={title} kind={SecretReference} diff --git a/frontend/packages/helm-plugin/src/components/details-page/history/HelmReleaseHistory.tsx b/frontend/packages/helm-plugin/src/components/details-page/history/HelmReleaseHistory.tsx index ad6a547390f..e6b5217a0e5 100644 --- a/frontend/packages/helm-plugin/src/components/details-page/history/HelmReleaseHistory.tsx +++ b/frontend/packages/helm-plugin/src/components/details-page/history/HelmReleaseHistory.tsx @@ -46,7 +46,7 @@ const HelmReleaseHistory: FC = ({ .catch((err) => { if (!destroyed) { setRevisionsLoaded(true); - setLoadError(err.message || t('Unable to load Helm Release history')); + setLoadError(err.message || t('Unable to load Helm release history')); } }); return () => { @@ -76,7 +76,7 @@ const HelmReleaseHistory: FC = ({ ); if (loadError) { - return ; + return ; } return ( diff --git a/frontend/packages/helm-plugin/src/components/details-page/overview/HelmReleaseOverview.tsx b/frontend/packages/helm-plugin/src/components/details-page/overview/HelmReleaseOverview.tsx index 365fe26bf99..1eb17f64ca8 100644 --- a/frontend/packages/helm-plugin/src/components/details-page/overview/HelmReleaseOverview.tsx +++ b/frontend/packages/helm-plugin/src/components/details-page/overview/HelmReleaseOverview.tsx @@ -17,7 +17,7 @@ const HelmReleaseOverview: FC = ({ obj, customData }) const { t } = useTranslation('helm-plugin'); return ( - + diff --git a/frontend/packages/helm-plugin/src/components/details-page/overview/__tests__/HelmReleaseOverview.spec.tsx b/frontend/packages/helm-plugin/src/components/details-page/overview/__tests__/HelmReleaseOverview.spec.tsx index 37b4d47bf98..01407a2fab3 100644 --- a/frontend/packages/helm-plugin/src/components/details-page/overview/__tests__/HelmReleaseOverview.spec.tsx +++ b/frontend/packages/helm-plugin/src/components/details-page/overview/__tests__/HelmReleaseOverview.spec.tsx @@ -34,7 +34,7 @@ describe('HelmReleaseOverview', () => { it('should render the Section Heading for the Overview page', () => { spyUseAccessReview.mockReturnValue([true]); renderWithProviders(); - expect(screen.getByText('Helm Release details')).toBeInTheDocument(); + expect(screen.getByText('Helm release details')).toBeInTheDocument(); }); it('should render the ResourceSummary component', () => { diff --git a/frontend/packages/helm-plugin/src/components/forms/__tests__/HelmInstallUpgradeForm.spec.tsx b/frontend/packages/helm-plugin/src/components/forms/__tests__/HelmInstallUpgradeForm.spec.tsx index 1a89b199344..9f177dd3977 100644 --- a/frontend/packages/helm-plugin/src/components/forms/__tests__/HelmInstallUpgradeForm.spec.tsx +++ b/frontend/packages/helm-plugin/src/components/forms/__tests__/HelmInstallUpgradeForm.spec.tsx @@ -94,7 +94,7 @@ const formValues: HelmInstallUpgradeFormData = { const helmConfig = { type: HelmActionType.Create, - title: 'Create Helm Release', + title: 'Create Helm release', subTitle: { form: 'Mock form help text', yaml: 'Mock yaml help text', @@ -125,7 +125,7 @@ describe('HelmInstallUpgradeForm', () => { mockUseEditorType.mockReturnValue([EditorType.Form, jest.fn(), true]); mockUseField.mockReturnValue([{ value: EditorType.Form }, {}]); renderWithProviders(); - expect(screen.getByText(/Create Helm Release/)).toBeTruthy(); + expect(screen.getByText(/Create Helm release/)).toBeTruthy(); }); it('should render FormHeader with correct title for the form', () => { diff --git a/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradeForm.tsx b/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradeForm.tsx index 50d40c31ee4..d4e149363d4 100644 --- a/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradeForm.tsx +++ b/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradeForm.tsx @@ -1,7 +1,8 @@ import type { ReactNode, FC } from 'react'; -import { useMemo } from 'react'; +import { useMemo, useState } from 'react'; import { TextInputTypes, Grid, GridItem, Button, Alert } from '@patternfly/react-core'; import type { FormikProps } from 'formik'; +import * as fuzzy from 'fuzzysearch'; import type { JSONSchema7 } from 'json-schema'; import * as _ from 'lodash'; import { Trans, useTranslation } from 'react-i18next'; @@ -14,11 +15,14 @@ import { FormHeader } from '@console/shared/src/components/form-utils/FormHeader import { CodeEditorField } from '@console/shared/src/components/formik-fields/CodeEditorField'; import { DynamicFormField } from '@console/shared/src/components/formik-fields/DynamicFormField'; import { InputField } from '@console/shared/src/components/formik-fields/InputField'; +import { ResourceDropdownField } from '@console/shared/src/components/formik-fields/ResourceDropdownField'; import { SyncedEditorField } from '@console/shared/src/components/formik-fields/SyncedEditorField'; import type { EditorType } from '@console/shared/src/components/synced-editor/editor-toggle'; import type { HelmChart, HelmActionConfigType } from '../../../types/helm-types'; import { HelmActionType } from '../../../types/helm-types'; import { helmActionString } from '../../../utils/helm-utils'; +import { useHelmCreateBasicAuthSecretModal } from '../url-chart/HelmCreateBasicAuthSecretModal'; +import { useSecretResources } from '../url-chart/useSecretResources'; import HelmChartVersionDropdown from './HelmChartVersionDropdown'; import { useHelmReadmeModalLauncher } from './HelmReadmeModal'; @@ -35,6 +39,7 @@ export type HelmInstallUpgradeFormData = { formData: any; formSchema: JSONSchema7; editorType: EditorType; + basicAuthSecretName?: string; }; interface HelmInstallUpgradeFormProps { @@ -68,11 +73,59 @@ const HelmInstallUpgradeForm: FC< chartIndexEntry, annotatedName, providerName, + setFieldValue, }) => { - const { t } = useTranslation('helm-plugin'); - const { chartName, chartVersion, chartReadme, formData, formSchema, editorType } = values; + const { t } = useTranslation(); + const launchHelmCreateBasicAuthSecretModal = useHelmCreateBasicAuthSecretModal(); + const [isCreateSecretModalOpen, setIsCreateSecretModalOpen] = useState(false); + + const CREATE_SECRET_KEY = 'create-secret'; + + const handleSecretSave = (name: string) => { + setFieldValue('basicAuthSecretName', name); + }; + + const handleSecretChange = (key: string) => { + if (key === CREATE_SECRET_KEY && !isCreateSecretModalOpen) { + // ResourceDropdownField writes the selected key to form state after this callback. + // Defer restoring the previous secret so "create-secret" is not persisted. + window.setTimeout( + () => setFieldValue('basicAuthSecretName', values.basicAuthSecretName || ''), + 0, + ); + setIsCreateSecretModalOpen(true); + launchHelmCreateBasicAuthSecretModal({ + namespace, + save: (name) => { + handleSecretSave(name); + setIsCreateSecretModalOpen(false); + }, + onClose: () => setIsCreateSecretModalOpen(false), + }); + } + }; + const { + chartName, + chartVersion, + chartReadme, + formData, + formSchema, + editorType, + basicAuthSecretName, + } = values; const { type: helmAction, title, subTitle } = helmActionConfig; const helmReadmeModalLauncher = useHelmReadmeModalLauncher({ readme: chartReadme }); + const showAuthSecret = helmAction === HelmActionType.Upgrade && !!basicAuthSecretName; + const secretResources = useSecretResources(namespace); + const autocompleteFilter = (strText: string, item: any): boolean => + fuzzy(strText, item?.props?.name); + const secretMissing = useMemo(() => { + if (!showAuthSecret || !secretResources[0]?.loaded) { + return false; + } + const secrets = secretResources[0]?.data ?? []; + return !secrets.some((s) => s?.metadata?.name === basicAuthSecretName); + }, [showAuthSecret, secretResources, basicAuthSecretName]); const isSubmitDisabled = (helmAction === HelmActionType.Upgrade && !dirty) || isSubmitting || @@ -95,7 +148,7 @@ const HelmInstallUpgradeForm: FC< const yamlEditor = chartHasValues && ( + {showAuthSecret && ( + + + {basicAuthSecretName && secretMissing && ( + + )} + + )} {!chartError && diff --git a/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradePage.tsx b/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradePage.tsx index 378e17679a0..a2d583fef4f 100644 --- a/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradePage.tsx +++ b/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmInstallUpgradePage.tsx @@ -65,6 +65,7 @@ const HelmInstallUpgradePage: FC = () => { const [initialYamlData, setInitialYamlData] = useState(''); const [initialFormData, setInitialFormData] = useState(); const [initialFormSchema, setInitialFormSchema] = useState(); + const [initialBasicAuthSecretName, setInitialBasicAuthSecretName] = useState(''); const helmAction: HelmActionType = initialChartURL ? HelmActionType.Create : HelmActionType.Upgrade; @@ -101,6 +102,9 @@ const HelmInstallUpgradePage: FC = () => { const valuesYAML = releaseValues || chartValues; const valuesJSON = (res?.config || chart?.values) ?? {}; const valuesSchema = chart?.schema && JSON.parse(atob(chart?.schema)); + const basicAuthSecretName = + chart?.metadata?.annotations?.['helm.openshift.io/auth-secret'] ?? ''; + setInitialBasicAuthSecretName(basicAuthSecretName); setInitialYamlData(valuesYAML); setInitialFormData(valuesJSON); setInitialFormSchema(valuesSchema); @@ -133,6 +137,7 @@ const HelmInstallUpgradePage: FC = () => { formData: initialFormData, formSchema: initialFormSchema, editorType: initialFormSchema ? EditorType.Form : EditorType.YAML, + basicAuthSecretName: initialBasicAuthSecretName, }; const handleSubmit = (values, actions) => { @@ -143,6 +148,7 @@ const HelmInstallUpgradePage: FC = () => { yamlData, formData, editorType, + basicAuthSecretName, }: HelmInstallUpgradeFormData = values; let valuesObj; @@ -182,6 +188,7 @@ const HelmInstallUpgradePage: FC = () => { ...(chartURL ? { chart_url: chartURL } : {}), // eslint-disable-line @typescript-eslint/naming-convention ...(indexEntry ? { indexEntry } : { indexEntry: chartIndexEntry }), ...(valuesObj ? { values: valuesObj } : {}), + ...(basicAuthSecretName ? { basic_auth_secret_name: basicAuthSecretName } : {}), // eslint-disable-line @typescript-eslint/naming-convention }; return config diff --git a/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmCreateBasicAuthSecretModal.tsx b/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmCreateBasicAuthSecretModal.tsx new file mode 100644 index 00000000000..15dde0787e3 --- /dev/null +++ b/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmCreateBasicAuthSecretModal.tsx @@ -0,0 +1,187 @@ +import { useCallback, useState } from 'react'; +import type { FormEvent } from 'react'; +import { + Button, + ButtonVariant, + Form, + FormGroup, + FormHelperText, + HelperText, + HelperTextItem, + Modal, + ModalBody, + ModalHeader, + ModalVariant, + TextInput, +} from '@patternfly/react-core'; +import { useTranslation } from 'react-i18next'; +import type { OverlayComponent } from '@console/dynamic-plugin-sdk/src/app/modal-support/OverlayProvider'; +import { useOverlay } from '@console/dynamic-plugin-sdk/src/app/modal-support/useOverlay'; +import { SecretModel } from '@console/internal/models'; +import { k8sCreate } from '@console/internal/module/k8s'; +import { ModalFooterWithAlerts } from '@console/shared/src/components/modals/ModalFooterWithAlerts'; + +export interface HelmCreateBasicAuthSecretModalProps { + namespace: string; + save?: (name: string) => void; + onClose?: () => void; +} + +const HelmCreateBasicAuthSecretModal: OverlayComponent = ({ + closeOverlay, + namespace, + save, + onClose, +}) => { + const { t } = useTranslation(); + const [secretName, setSecretName] = useState(''); + const [username, setUsername] = useState(''); + const [password, setPassword] = useState(''); + const [inProgress, setInProgress] = useState(false); + const [errorMessage, setErrorMessage] = useState(); + + const isCreateDisabled = !secretName.trim() || !password; + + const closeModal = () => { + if (inProgress) { + return; + } + if (document.activeElement instanceof HTMLElement) { + document.activeElement.blur(); + } + onClose?.(); + closeOverlay(); + }; + + const handleCreate = async () => { + if (isCreateDisabled || inProgress) { + return; + } + + setInProgress(true); + setErrorMessage(undefined); + + try { + await k8sCreate(SecretModel, { + apiVersion: 'v1', + kind: 'Secret', + metadata: { + name: secretName.trim(), + namespace, + }, + type: 'kubernetes.io/basic-auth', + stringData: { + ...(username ? { username } : {}), + password, + }, + }); + const createdSecretName = secretName.trim(); + closeModal(); + // Keep form update separate so a parent callback failure cannot block modal close. + save?.(createdSecretName); + } catch (err) { + const message = + err instanceof Error ? err.message : t('helm-plugin~Failed to create Secret.'); + setErrorMessage(message); + } finally { + setInProgress(false); + } + }; + + const onSubmit = async (e: FormEvent) => { + e.preventDefault(); + await handleCreate(); + }; + + return ( + + + +
+ + setSecretName(value)} + isRequired + /> + + + {t('public~Unique name of the Secret.')} + + + + + + setUsername(value)} + /> + + + + {t('helm-plugin~Optional username for OCI/HTTP(S) authentication.')} + + + + + + + setPassword(value)} + isRequired + /> + + + + {t('helm-plugin~Password or token for OCI/HTTP(S) authentication.')} + + + + +
+
+ + + + +
+ ); +}; + +export type HelmCreateBasicAuthSecretModalLauncher = ( + props?: HelmCreateBasicAuthSecretModalProps, +) => void; + +export const useHelmCreateBasicAuthSecretModal = (): HelmCreateBasicAuthSecretModalLauncher => { + const launcher = useOverlay(); + return useCallback((props) => launcher(HelmCreateBasicAuthSecretModal, props), [launcher]); +}; diff --git a/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx b/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx index ec31445c752..67bb6e487ae 100644 --- a/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx +++ b/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartForm.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import { useEffect } from 'react'; +import { useEffect, useState } from 'react'; import { TextInputTypes, Grid, GridItem } from '@patternfly/react-core'; import type { FormikProps } from 'formik'; import * as fuzzy from 'fuzzysearch'; @@ -11,6 +11,7 @@ import { FormFooter } from '@console/shared/src/components/form-utils/FormFooter import { FormHeader } from '@console/shared/src/components/form-utils/FormHeader'; import { InputField } from '@console/shared/src/components/formik-fields/InputField'; import { ResourceDropdownField } from '@console/shared/src/components/formik-fields/ResourceDropdownField'; +import { useHelmCreateBasicAuthSecretModal } from './HelmCreateBasicAuthSecretModal'; import type { HelmURLChartFormData } from './types'; import { useSecretResources } from './useSecretResources'; @@ -32,6 +33,34 @@ const HelmURLChartForm: FC & HelmURLChartFormP setFieldError, }) => { const { t } = useTranslation('helm-plugin'); + const launchHelmCreateBasicAuthSecretModal = useHelmCreateBasicAuthSecretModal(); + const [isCreateSecretModalOpen, setIsCreateSecretModalOpen] = useState(false); + + const CREATE_SECRET_KEY = 'create-secret'; + + const handleSecretSave = (name: string) => { + setFieldValue('basicAuthSecretName', name); + }; + + const handleSecretChange = (key: string) => { + if (key === CREATE_SECRET_KEY && !isCreateSecretModalOpen) { + // ResourceDropdownField writes the selected key to form state after this callback. + // Defer restoring the previous secret so "create-secret" is not persisted. + window.setTimeout( + () => setFieldValue('basicAuthSecretName', values.basicAuthSecretName || ''), + 0, + ); + setIsCreateSecretModalOpen(true); + launchHelmCreateBasicAuthSecretModal({ + namespace, + save: (name) => { + handleSecretSave(name); + setIsCreateSecretModalOpen(false); + }, + onClose: () => setIsCreateSecretModalOpen(false), + }); + } + }; const autocompleteFilter = (strText: string, item: any): boolean => fuzzy(strText, item?.props?.name); @@ -86,9 +115,9 @@ const HelmURLChartForm: FC & HelmURLChartFormP > @@ -100,7 +129,7 @@ const HelmURLChartForm: FC & HelmURLChartFormP name="chartURL" label={t('Chart URL')} helpText={t( - 'The OCI URL or HTTP/HTTPS tar file for the Helm chart; for example - oci://registry.example.com/charts/mychart or https://example.com/chart-1.0.0.tgz.', + 'OCI or HTTP/HTTPS .tar file for the Helm Chart; for example, oci://registry.example.com/charts/mychart or https://example.com/chart-1.0.0.tgz.', )} placeholder="oci://registry.example.com/charts/mychart or https://example.com/chart-1.0.0.tgz" required @@ -138,8 +167,15 @@ const HelmURLChartForm: FC & HelmURLChartFormP placeholder={t('Select a secret')} showBadge autocompleteFilter={autocompleteFilter} + actionItems={[ + { + actionTitle: t('Create Secret'), + actionKey: CREATE_SECRET_KEY, + }, + ]} + onChange={handleSecretChange} helpText={t( - 'A secret with "username" and "password" keys for OCI/HTTP(S) authentication', + 'Secret with "username" and "password" keys for OCI/HTTP(S) authentication.', )} /> diff --git a/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartInstallPage.tsx b/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartInstallPage.tsx index 6383bf1cca9..f1367bd4847 100644 --- a/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartInstallPage.tsx +++ b/frontend/packages/helm-plugin/src/components/forms/url-chart/HelmURLChartInstallPage.tsx @@ -229,7 +229,7 @@ const HelmURLChartInstallPage: FunctionComponent = () => { const chartMetaDescription = chartData ? : null; - const pageTitle = t('Install Helm chart from Helm registry.'); + const pageTitle = t('Install Helm Chart from Helm registry.'); return ( & HelmURLInstal {chartHasValues && ( <> {t( - 'Complete the form to create a Helm release. The Helm chart authors might have provided some default values.', + 'Complete the form to create a Helm release. The Helm Chart authors might have provided some default values.', )}{' '}   @@ -158,7 +158,7 @@ const HelmURLInstallForm: FC & HelmURLInstal autocompleteFilter={autocompleteFilter} disabled helpText={t( - 'A secret with "username" and "password" keys for OCI/HTTP(S) authentication', + 'Secret with "username" and "password" keys for OCI/HTTP(S) authentication.', )} /> diff --git a/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx b/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx index b392887c9f4..2f04681314d 100644 --- a/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx +++ b/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx @@ -192,7 +192,7 @@ const HelmReleaseList: FC<{ mock?: boolean }> = ({ mock }) => { .catch((err) => { if (!destroyed) { setReleasesLoaded(true); - setLoadError(err.message || t('Unable to load Helm Releases')); + setLoadError(err.message || t('Unable to load Helm releases')); } }); } @@ -253,14 +253,14 @@ const HelmReleaseList: FC<{ mock?: boolean }> = ({ mock }) => { {t('No Helm Releases found')}} + titleText={<>{t('No Helm releases found')}} variant={EmptyStateVariant.full} > {isHelmEnabled ? ( - {t('Browse the catalog to discover available Helm Charts')} + {t('Browse the catalog to discover available Helm Chart(s)')} ) : null} @@ -271,14 +271,14 @@ const HelmReleaseList: FC<{ mock?: boolean }> = ({ mock }) => { return ( <> - {t('Helm Releases')} + {t('Helm releases')} }> {!mock && hasNoReleases ? ( emptyState() ) : ( - label={t('Helm Releases')} + label={t('Helm releases')} data={releases} loaded={isLoaded} loadError={secretsLoadError || loadError} diff --git a/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListPage.tsx b/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListPage.tsx index 121fb45c2bd..b87ead77de1 100644 --- a/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListPage.tsx +++ b/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListPage.tsx @@ -7,7 +7,7 @@ const HelmReleaseListPage: FC<{ mock?: boolean }> = ({ mock }) => { const { t } = useTranslation('helm-plugin'); return (
- +
); diff --git a/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListRow.tsx b/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListRow.tsx index bb13c5d7c9f..a334c533200 100644 --- a/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListRow.tsx +++ b/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseListRow.tsx @@ -39,7 +39,7 @@ export const getDataViewRows: GetDataViewRows [tableColumnInfo[0].id]: { cell: ( <> - + = ({ mock, const menuActions: MenuActions = { helmRelease: { - label: isHelmVisible ? t('Helm Release') : undefined, + label: isHelmVisible ? t('Helm release') : undefined, onSelection: () => `/catalog/ns/${namespace || 'default'}?catalogType=HelmChart`, }, projectHelmChartRepository: { @@ -69,7 +69,7 @@ const HelmPage: FC<{ mock?: boolean; namespace: string | undefined }> = ({ mock, }, helmChartInstallation: { label: - projectHelmChartCreateAccess || helmChartCreateAccess ? t('Helm chart URL') : undefined, + projectHelmChartCreateAccess || helmChartCreateAccess ? t('Helm Chart URL') : undefined, onSelection: () => `/helm/ns/${namespace || 'default'}/url-chart`, }, }; @@ -77,8 +77,8 @@ const HelmPage: FC<{ mock?: boolean; namespace: string | undefined }> = ({ mock, const pages: Page[] = [ { href: '', - // t('helm-plugin~Helm Releases') - nameKey: 'helm-plugin~Helm Releases', + // t('helm-plugin~Helm releases') + nameKey: 'helm-plugin~Helm releases', component: HelmReleaseList, pageData: { mock, diff --git a/frontend/packages/helm-plugin/src/models/helm.ts b/frontend/packages/helm-plugin/src/models/helm.ts index 41ab082bf93..b93c745da26 100644 --- a/frontend/packages/helm-plugin/src/models/helm.ts +++ b/frontend/packages/helm-plugin/src/models/helm.ts @@ -33,8 +33,8 @@ export const HelmReleaseModel: K8sModel = { kind: 'HelmRelease', id: 'helmrelease', plural: 'helmreleases', - label: 'Helm Release', - labelPlural: 'Helm Releases', + label: 'Helm release', + labelPlural: 'Helm releases', abbr: 'HR', namespaced: true, crd: true, diff --git a/frontend/packages/helm-plugin/src/topology/helmFilters.ts b/frontend/packages/helm-plugin/src/topology/helmFilters.ts index a9e8e8c67eb..d38e246df5d 100644 --- a/frontend/packages/helm-plugin/src/topology/helmFilters.ts +++ b/frontend/packages/helm-plugin/src/topology/helmFilters.ts @@ -11,8 +11,8 @@ export const getTopologyFilters = () => { { type: TopologyDisplayFilterType.expand, id: EXPAND_HELM_RELEASE_FILTER, - // t('helm-plugin~Helm Releases') - labelKey: 'helm-plugin~Helm Releases', + // t('helm-plugin~Helm releases') + labelKey: 'helm-plugin~Helm releases', priority: 300, value: true, }, diff --git a/frontend/packages/helm-plugin/src/utils/__tests__/helm-utils.spec.ts b/frontend/packages/helm-plugin/src/utils/__tests__/helm-utils.spec.ts index c057ae1ba0c..075fdca4d34 100644 --- a/frontend/packages/helm-plugin/src/utils/__tests__/helm-utils.spec.ts +++ b/frontend/packages/helm-plugin/src/utils/__tests__/helm-utils.spec.ts @@ -30,7 +30,7 @@ import { mergeHelmValuesOnChartVersionChange, } from '../helm-utils'; -describe('Helm Releases Utils', () => { +describe('Helm releases Utils', () => { it('should return deployed or failed status for a helm release', () => { const release = mockHelmReleases[0]; expect(releaseStatusReducer(release)).toEqual(HelmReleaseStatus.Deployed); diff --git a/frontend/packages/helm-plugin/src/utils/helm-utils.ts b/frontend/packages/helm-plugin/src/utils/helm-utils.ts index 9a6013748e9..449ad9030f6 100644 --- a/frontend/packages/helm-plugin/src/utils/helm-utils.ts +++ b/frontend/packages/helm-plugin/src/utils/helm-utils.ts @@ -225,13 +225,13 @@ export const getHelmActionConfig = ( case HelmActionType.Create: return { type: HelmActionType.Create, - title: t('helm-plugin~Create Helm Release'), + title: t('helm-plugin~Create Helm release'), subTitle: { form: t( - 'helm-plugin~The Helm Release can be created by completing the form. Default values may be provided by the Helm chart authors.', + 'helm-plugin~The Helm release can be created by completing the form. Default values may be provided by the Helm Chart authors.', ), yaml: t( - 'helm-plugin~The Helm Release can be created by manually entering YAML or JSON definitions.', + 'helm-plugin~The Helm release can be created by manually entering YAML or JSON definitions.', ), }, helmReleaseApi: `/api/helm/chart?url=${encodeURIComponent( @@ -243,7 +243,7 @@ export const getHelmActionConfig = ( case HelmActionType.Upgrade: return { type: HelmActionType.Upgrade, - title: t('helm-plugin~Upgrade Helm Release'), + title: t('helm-plugin~Upgrade Helm release'), subTitle: { form: t( 'helm-plugin~Upgrade by selecting a new chart version or manually changing the form values.', @@ -260,7 +260,7 @@ export const getHelmActionConfig = ( case HelmActionType.Rollback: return { type: HelmActionType.Rollback, - title: t('helm-plugin~Rollback Helm Release'), + title: t('helm-plugin~Rollback Helm release'), subTitle: ``, helmReleaseApi: `/api/helm/release/history?ns=${namespace}&name=${releaseName}`, fetch: coFetchJSON.patch, diff --git a/frontend/public/locales/en/public.json b/frontend/public/locales/en/public.json index cda9796ca35..3df98c1d045 100644 --- a/frontend/public/locales/en/public.json +++ b/frontend/public/locales/en/public.json @@ -1774,5 +1774,14 @@ "{{count}} hour_one": "{{count}} hour", "{{count}} hour_other": "{{count}} hours", "{{count}} minute_one": "{{count}} minute", - "{{count}} minute_other": "{{count}} minutes" + "{{count}} minute_other": "{{count}} minutes", + "Helm release": "Helm release", + "Helm Chart cannot be installed": "Helm Chart cannot be installed", + "The Helm Chart is currently unavailable. {{chartError}}": "The Helm Chart is currently unavailable. {{chartError}}", + "Release name": "Release name", + "A unique name for the Helm release.": "A unique name for the Helm release.", + "Helm release is not configurable since the Helm Chart doesn't define any values.": "Helm release is not configurable since the Helm Chart doesn't define any values.", + "Unique name of the Secret.": "Unique name of the Secret.", + "Secret username": "Secret username", + "Secret password or token": "Secret password or token" } \ No newline at end of file diff --git a/pkg/helm/actions/get_chart.go b/pkg/helm/actions/get_chart.go index 7ae03cd7422..bbf34d8774f 100644 --- a/pkg/helm/actions/get_chart.go +++ b/pkg/helm/actions/get_chart.go @@ -3,6 +3,7 @@ package actions import ( "fmt" "os" + "strings" "github.com/openshift/api/helm/v1beta1" "helm.sh/helm/v3/pkg/action" @@ -83,6 +84,9 @@ func GetChartFromURL(url string, conf *action.Configuration, namespace string, c } chartLocation, err := cmd.ChartPathOptions.LocateChart(url, settings) if err != nil { + if basicAuthSecretName == "" && (strings.Contains(err.Error(), "401") || strings.Contains(err.Error(), "unauthorized")) { + return nil, fmt.Errorf("error getting chart from URL: %w; registry requires authentication - select a Secret with \"username\" and \"password\" keys for basic authentication", err) + } return nil, fmt.Errorf("error getting chart from URL: %v", err) } return loader.Load(chartLocation) diff --git a/pkg/helm/actions/install_chart.go b/pkg/helm/actions/install_chart.go index ed8472fa5f1..1b45b144467 100644 --- a/pkg/helm/actions/install_chart.go +++ b/pkg/helm/actions/install_chart.go @@ -346,6 +346,9 @@ func InstallChartFromURL(ns, name, url string, vals map[string]interface{}, conf cp, err := cmd.ChartPathOptions.LocateChart(url, settings) if err != nil { + if basicAuthSecretName == "" && (strings.Contains(err.Error(), "401") || strings.Contains(err.Error(), "unauthorized")) { + return nil, fmt.Errorf("error locating chart: %w; registry requires authentication - select a Secret with \"username\" and \"password\" keys for basic authentication", err) + } return nil, fmt.Errorf("error locating chart: %v", err) } ch, err := loader.Load(cp) diff --git a/pkg/helm/actions/upgrade_release.go b/pkg/helm/actions/upgrade_release.go index dd961ca5918..810c47bd8ae 100644 --- a/pkg/helm/actions/upgrade_release.go +++ b/pkg/helm/actions/upgrade_release.go @@ -143,6 +143,7 @@ func UpgradeReleaseAsync( coreClient corev1client.CoreV1Interface, fileCleanUp bool, indexEntry string, + basicAuthSecretName string, ) (*kv1.Secret, error) { client := action.NewUpgrade(conf) client.Namespace = releaseNamespace @@ -165,7 +166,9 @@ func UpgradeReleaseAsync( if chart_url, ok := rel.Chart.Metadata.Annotations["chart_url"]; chartUrl == "" && ok { chartUrl = chart_url } - if authSecret, ok := rel.Chart.Metadata.Annotations[helmAuthSecretAnnotation]; ok { + if basicAuthSecretName != "" { + auth_secret = basicAuthSecretName + } else if authSecret, ok := rel.Chart.Metadata.Annotations[helmAuthSecretAnnotation]; ok { auth_secret = authSecret } } @@ -218,6 +221,9 @@ func UpgradeReleaseAsync( client.ChartPathOptions.Version = chartInfo.Version cp, err = client.ChartPathOptions.LocateChart(chartLocation, settings) if err != nil { + if auth_secret == "" && (strings.Contains(err.Error(), "401") || strings.Contains(err.Error(), "unauthorized")) { + return nil, fmt.Errorf("failed to upgrade helm release: %w; registry requires authentication - select a Secret with \"username\" and \"password\" keys for basic authentication", err) + } return nil, err } ch, err = loader.Load(cp) diff --git a/pkg/helm/actions/upgrade_release_test.go b/pkg/helm/actions/upgrade_release_test.go index 38009807592..53a5e813bac 100644 --- a/pkg/helm/actions/upgrade_release_test.go +++ b/pkg/helm/actions/upgrade_release_test.go @@ -506,7 +506,7 @@ func TestUpgradeReleaseWithoutDependenciesAsync(t *testing.T) { var rel *v1.Secret var err error go func() { - rel, err = UpgradeReleaseAsync(tt.namespace, tt.releaseName, tt.chartPath, nil, actionConfig, client, coreClient, false, tt.indexEntry) + rel, err = UpgradeReleaseAsync(tt.namespace, tt.releaseName, tt.chartPath, nil, actionConfig, client, coreClient, false, tt.indexEntry, "") if tt.requireErr { fmt.Println("Error", err) require.Error(t, err) @@ -602,7 +602,7 @@ func TestUpgradeReleaseWithDependenciesAsync(t *testing.T) { store.Create(&r) go func() { - rel, err = UpgradeReleaseAsync(tt.releaseNamespace, tt.releaseName, tt.chartPath, tt.values, actionConfig, client, coreClient, true, tt.indexEntry) + rel, err = UpgradeReleaseAsync(tt.releaseNamespace, tt.releaseName, tt.chartPath, tt.values, actionConfig, client, coreClient, true, tt.indexEntry, "") require.NoError(t, err) require.Equal(t, fmt.Sprintf("sh.helm.release.v1.%v.v2", tt.releaseName), rel.ObjectMeta.Name) }() @@ -694,7 +694,7 @@ func TestUpgradeReleaseWithCustomValuesAsync(t *testing.T) { var rel *v1.Secret var err error go func() { - rel, err = UpgradeReleaseAsync(tt.releaseNamespace, tt.releaseName, tt.chartPath, tt.values, actionConfig, client, coreClient, true, tt.indexEntry) + rel, err = UpgradeReleaseAsync(tt.releaseNamespace, tt.releaseName, tt.chartPath, tt.values, actionConfig, client, coreClient, true, tt.indexEntry, "") require.NoError(t, err) require.Equal(t, fmt.Sprintf("sh.helm.release.v1.%v.v2", tt.releaseName), rel.ObjectMeta.Name) }() diff --git a/pkg/helm/handlers/handler_test.go b/pkg/helm/handlers/handler_test.go index 27b9d5e0def..6fc5b4405e9 100644 --- a/pkg/helm/handlers/handler_test.go +++ b/pkg/helm/handlers/handler_test.go @@ -135,8 +135,8 @@ func fakeUpgradeRelease(name, ns string, t *testing.T, fakeRelease *release.Rele } } -func fakeUpgradeReleaseAsync(name, ns string, t *testing.T, fakeSecret *kv1.Secret, err error) func(ns, name, url string, vals map[string]interface{}, conf *action.Configuration, client dynamic.Interface, coreClient corev1client.CoreV1Interface, fileCleanUp bool, indexEntry string) (*kv1.Secret, error) { - return func(namespace, n, url string, vals map[string]interface{}, conf *action.Configuration, client dynamic.Interface, coreClient corev1client.CoreV1Interface, fileCleanUp bool, indexEntry string) (*kv1.Secret, error) { +func fakeUpgradeReleaseAsync(name, ns string, t *testing.T, fakeSecret *kv1.Secret, err error) func(ns, name, url string, vals map[string]interface{}, conf *action.Configuration, client dynamic.Interface, coreClient corev1client.CoreV1Interface, fileCleanUp bool, indexEntry string, basicAuthSecretName string) (*kv1.Secret, error) { + return func(namespace, n, url string, vals map[string]interface{}, conf *action.Configuration, client dynamic.Interface, coreClient corev1client.CoreV1Interface, fileCleanUp bool, indexEntry string, basicAuthSecretName string) (*kv1.Secret, error) { if namespace != ns { t.Errorf("Namespace mismatch expected %s received %s", ns, namespace) } diff --git a/pkg/helm/handlers/handlers.go b/pkg/helm/handlers/handlers.go index 1fe109b735e..4810cd22c84 100644 --- a/pkg/helm/handlers/handlers.go +++ b/pkg/helm/handlers/handlers.go @@ -66,7 +66,7 @@ type helmHandlers struct { installChart func(string, string, string, map[string]interface{}, *action.Configuration, dynamic.Interface, corev1client.CoreV1Interface, bool, string) (*release.Release, error) installChartFromURL func(string, string, string, map[string]interface{}, *action.Configuration, corev1client.CoreV1Interface, string, string) (*kv1.Secret, error) listReleases func(*action.Configuration, bool) ([]*release.Release, error) - upgradeReleaseAsync func(string, string, string, map[string]interface{}, *action.Configuration, dynamic.Interface, corev1client.CoreV1Interface, bool, string) (*kv1.Secret, error) + upgradeReleaseAsync func(string, string, string, map[string]interface{}, *action.Configuration, dynamic.Interface, corev1client.CoreV1Interface, bool, string, string) (*kv1.Secret, error) upgradeRelease func(string, string, string, map[string]interface{}, *action.Configuration, dynamic.Interface, corev1client.CoreV1Interface, bool, string) (*release.Release, error) uninstallRelease func(string, *action.Configuration) (*release.UninstallReleaseResponse, error) uninstallReleaseAsync func(string, string, string, *action.Configuration, corev1client.CoreV1Interface) error @@ -308,7 +308,7 @@ func (h *helmHandlers) HandleUpgradeReleaseAsync(user *auth.User, w http.Respons serverutils.SendResponse(w, http.StatusBadGateway, serverutils.ApiError{Err: err.Error()}) return } - resp, err := h.upgradeReleaseAsync(req.Namespace, req.Name, req.ChartUrl, req.Values, conf, handlerClients.DynamicClient, handlerClients.CoreClient, false, req.IndexEntry) + resp, err := h.upgradeReleaseAsync(req.Namespace, req.Name, req.ChartUrl, req.Values, conf, handlerClients.DynamicClient, handlerClients.CoreClient, false, req.IndexEntry, req.BasicAuthSecretName) if err != nil { if err.Error() == actions.ErrReleaseRevisionNotFound.Error() { serverutils.SendResponse(w, http.StatusNotFound, serverutils.ApiError{Err: fmt.Sprintf("Failed to rollback helm releases: %v", err)})