Skip to content

Removing hardcoded Namespace for HBNFS#471

Merged
harshitap26 merged 8 commits into
mainfrom
usr/harshitap26/hbnfs-namespace
Apr 25, 2025
Merged

Removing hardcoded Namespace for HBNFS#471
harshitap26 merged 8 commits into
mainfrom
usr/harshitap26/hbnfs-namespace

Conversation

@harshitap26

@harshitap26 harshitap26 commented Apr 23, 2025

Copy link
Copy Markdown
Contributor

Description

PR to remove the hardcoded Namespace name.

  • Check for the Environment variable for the Namespace name.
  • If not present, read the following file for the namespace associated with the service account /var/run/secrets/kubernetes.io/serviceaccount/namespace

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1742

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Deployed the driver in a non "Powerstore" namespace. Driver installation was successful and was also able to provision the volume successfully.
  • Unit tests are executing successfully.

@harshitap26 harshitap26 marked this pull request as ready for review April 24, 2025 07:38
kumarp20
kumarp20 previously approved these changes Apr 24, 2025
@harshitap26 harshitap26 requested a review from kumarp20 April 24, 2025 11:27
@github-actions

Copy link
Copy Markdown
Contributor

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/csi-powerstore/pkg/common 0.00% (ø)
github.com/dell/csi-powerstore/pkg/provider 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/csi-powerstore/pkg/common/envvars.go 0.00% (ø) 0 0 0
github.com/dell/csi-powerstore/pkg/provider/provider.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/dell/csi-powerstore/pkg/provider/provider_test.go

@harshitap26 harshitap26 merged commit 03ae7f5 into main Apr 25, 2025
@harshitap26 harshitap26 deleted the usr/harshitap26/hbnfs-namespace branch April 25, 2025 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants