Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nikita-bhatia
Copy link
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

codecov-commenter commented Mar 16, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.03 🎉

Comparison is base (d8c64b7) 8.06% compared to head (86173ac) 8.10%.

❗ Current head 86173ac differs from pull request most recent head d79c665. Consider uploading reports for the commit d79c665 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #136      +/-   ##
=========================================
+ Coverage    8.06%   8.10%   +0.03%     
=========================================
  Files          18      18              
  Lines        4686    4664      -22     
=========================================
  Hits          378     378              
+ Misses       4286    4264      -22     
  Partials       22      22              
Impacted Files Coverage Δ
vsphere/vsphere.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
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?

@@ -15,9 +16,9 @@ const (
// Params is the parameters to use for the Store object
type Params struct {
// Kv is the bootstrap kvdb instance
Kv kvdb.Kvdb
Kv kvdb.Kvdb
Copy link
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?

@@ -97,6 +98,7 @@ func GetStoreWithParams(
name string,
lockTryDuration time.Duration,
lockHoldTimeout time.Duration,
nameSpace string,
Copy link
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
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
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