Skip to content

PWX-21520 : Add custom namespace during configmap creation #136

Open
nikita-bhatia wants to merge 2 commits intomasterfrom
namespace
Open

PWX-21520 : Add custom namespace during configmap creation #136
nikita-bhatia wants to merge 2 commits intomasterfrom
namespace

Conversation

@nikita-bhatia
Copy link
Copy Markdown
Contributor

@nikita-bhatia nikita-bhatia commented Mar 16, 2023

https://portworx.atlassian.net/browse/PWX-21520

Changes done :

Version of sched-ops is changed to latest commit hash to master. Because of that, other versions were also required to be updated and compatibility with Go 1.17 was not there anymore.

P.S : Need to update cloudops version in "porx" go.mod after this PR is merged.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 16, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 8.06%. Comparing base (d8c64b7) to head (d79c665).
⚠️ Report is 49 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #136      +/-   ##
=========================================
- Coverage    8.06%   8.06%   -0.01%     
=========================================
  Files          18      18              
  Lines        4686    4688       +2     
=========================================
  Hits          378     378              
- Misses       4286    4288       +2     
  Partials       22      22              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nikita-bhatia nikita-bhatia requested a review from nrevanna March 30, 2023 12:09
Copy link
Copy Markdown
Contributor

@nrevanna nrevanna left a comment

Choose a reason for hiding this comment

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

If you implement my comment, it'll be a 2 line patch. Why do we need to vendor so many files?

type Params struct {
// Kv is the bootstrap kvdb instance
Kv kvdb.Kvdb
Kv kvdb.Kvdb
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: The older formatting looked correct. Could you please keep it aligned like the previous version?

name string,
lockTryDuration time.Duration,
lockHoldTimeout time.Duration,
nameSpace string,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I feel it's not required to pass in namespace as parameter in all these functions.
Why not just call ns := os.Getenv("PX_NAMESPACE") in newK8sStoreWithParams and pass that to configmap.New().

Copy link
Copy Markdown
Contributor

@nrevanna nrevanna left a comment

Choose a reason for hiding this comment

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

Actually, why don't we take a step back. Why not call ns := os.Getenv("PX_NAMESPACE") from sched-ops itself. That way we don't need to pass in the namespace as a parameter to configmap.New?

@nrevanna
Copy link
Copy Markdown
Contributor

Had an offline discussion. We want to avoid PX_NAMESPACE usage in all our open-source repos. Nikita will work on removing that from cloud-ops also.
Thanks Piyush.

@nikita-bhatia nikita-bhatia changed the title PWX-21520 : Add custom namespace during configmap creation #305 PWX-21520 : Add custom namespace during configmap creation Jul 3, 2023
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.

4 participants