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 #149

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

Conversation

nikita-bhatia
Copy link
Contributor

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

Changes done :

Version of sched-ops is changed to latest commit hash of portworx/sched-ops#320. Because of that, other versions were also required to be updated for compatibility.

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

@@ -72,11 +72,12 @@ type k8sStore struct {

// NewK8sStore returns a Store implementation which uses
// k8s configmaps to store data.
func NewK8sStore(clusterID string) (Store, configmap.ConfigMap, error) {
func NewK8sStore(clusterID, ns string) (Store, configmap.ConfigMap, error) {
Copy link
Contributor

@nrevanna nrevanna Jul 10, 2023

Choose a reason for hiding this comment

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

nit: Can we call this pxNs?
Can we modify all references to namespace to indicate that it's PX's namespace that we are passing?

@@ -90,6 +91,7 @@ func newK8sStoreWithParams(
name string,
lockTryDuration time.Duration,
lockTimeout time.Duration,
ns string,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: ns -> pxNs

@@ -99,6 +101,7 @@ func newK8sStoreWithParams(
lockAttempts,
0,
0,
ns,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: ns -> pxNS

@@ -61,7 +61,7 @@ type VirtualDisk struct {
}

// NewClient creates a new vsphere cloudops instance
func NewClient(cfg *VSphereConfig, storeParams *store.Params) (cloudops.Ops, error) {
func NewClient(cfg *VSphereConfig, storeParams *store.Params, namespace string) (cloudops.Ops, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: namespace -> pxNamespace

@nrevanna nrevanna requested a review from a team July 11, 2023 17:36
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.

2 participants