console icon indicating copy to clipboard operation
console copied to clipboard

RFE-7965: add basic auth support for helm repositories

Open martinszuc opened this issue 2 months ago โ€ข 14 comments

related: https://issues.redhat.com/browse/HELM-585 fixes: https://issues.redhat.com/browse/RFE-7965

martinszuc avatar Oct 21 '25 16:10 martinszuc

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

openshift-ci[bot] avatar Oct 21 '25 16:10 openshift-ci[bot]

@martinszuc: This pull request references RFE-7965 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the feature request to target the "4.21.0" version, but no target version was set.

In response to this:

related: https://issues.redhat.com/browse/HELM-584 fixes: https://issues.redhat.com/browse/RFE-7965

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Oct 21 '25 16:10 openshift-ci-robot

/ok-to-test

baijum avatar Oct 28 '25 09:10 baijum

there is an idea for feature about checking whether the basic auth secret was setup correct and contains correct values (username, password) ticket: https://issues.redhat.com/browse/HELM-586

martinszuc avatar Oct 28 '25 10:10 martinszuc

@martinszuc: This pull request references RFE-7965 which is a valid jira issue.

In response to this:

related: https://issues.redhat.com/browse/HELM-585 fixes: https://issues.redhat.com/browse/RFE-7965

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Nov 20 '25 12:11 openshift-ci-robot

Walkthrough

This PR adds basic authentication support to Helm Chart Repository configuration. Changes include new type definitions for basicAuthConfig, form component updates to accept and render a namespace-scoped Secret field, validation requiring HTTPS with basic auth, utility updates for conditional config inclusion based on scope, and comprehensive test coverage.

Changes

Cohort / File(s) Summary
Type Definitions
frontend/packages/helm-plugin/src/types/helm-types.ts
Added optional basicAuthConfig property to HelmChartRepositoryType.connectionConfig (with name field) and HelmChartRepositoryFormData (as string).
Form Components
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryForm.tsx,
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/CreateHelmChartRepositoryFormEditor.tsx
Extended component props with namespace: string. Added conditional ResourceDropdownField for basicAuthConfig Secret selection when scope is ProjectHelmChartRepository.
Form Utilities
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-create-utils.ts,
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/helmchartrepository-validation-utils.ts
Updated convertToHelmChartRepository to accept optional existingRepo parameter and conditionally include basicAuthConfig based on scope. Added Yup validation requiring HTTPS when basicAuthConfig is present.
Localization
frontend/packages/helm-plugin/locales/en/helm-plugin.json
Added two locale keys: "Basic authentication" and "Basic authentication requires HTTPS".
Tests
frontend/packages/helm-plugin/src/components/forms/HelmChartRepository/__tests__/helmchartrepository-*.ts
Added test coverage for basicAuthConfig scope-based behavior (ProjectHelmChartRepository vs. HelmChartRepository), round-trip conversion, and sample data with basicAuthConfig.

Estimated code review effort

๐ŸŽฏ 3 (Moderate) | โฑ๏ธ ~25 minutes

  • Conditional logic for basicAuthConfig inclusion: Review the interaction between scope and existingRepo.kind in determining whether basicAuthConfig is included in the resource spec (helmchartrepository-create-utils.ts)
  • HTTPS validation requirement: Verify the Yup validation rule correctly enforces HTTPS when basic authentication is configured (helmchartrepository-validation-utils.ts)
  • Scope-based field visibility: Confirm the ResourceDropdownField rendering logic properly checks both formData.scope and existingRepo.kind for ProjectHelmChartRepository (CreateHelmChartRepositoryFormEditor.tsx)
  • Test completeness: Verify test cases cover all scope combinations and round-trip form-to-resource conversions
โœจ Finishing touches
  • [ ] ๐Ÿ“ Generate docstrings
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

[!TIP]

๐Ÿ“ Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests โ€” including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. ๐Ÿ“ Description โ€” Summarize the main change in 50โ€“60 words, explaining what was done.
  2. ๐Ÿ““ References โ€” List relevant issues, discussions, documentation, or related PRs.
  3. ๐Ÿ“ฆ Dependencies & Requirements โ€” Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. ๐Ÿ“Š Contributor Summary โ€” Include a Markdown table showing contributions: | Contributor | Lines Added | Lines Removed | Files Changed |
  5. โœ”๏ธ Additional Notes โ€” Add any extra reviewer context. Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 20 '25 13:11 coderabbitai[bot]

/retest

@coderabbitai review

webbnh avatar Nov 20 '25 20:11 webbnh

@webbnh: I'll review the changes in this pull request.

โœ… Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot] avatar Nov 20 '25 20:11 coderabbitai[bot]

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: martinszuc, webbnh Once this PR has been reviewed and has the lgtm label, please assign jhadvig for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Nov 20 '25 20:11 openshift-ci[bot]

/retest

martinszuc avatar Nov 27 '25 13:11 martinszuc

/retest-required

Leo6Leo avatar Nov 27 '25 17:11 Leo6Leo

/retest-required

martinszuc avatar Nov 27 '25 19:11 martinszuc

/retest-required

Leo6Leo avatar Nov 28 '25 01:11 Leo6Leo

@martinszuc: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Nov 28 '25 06:11 openshift-ci[bot]