-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat(storage-classes): export all user created storage classes #172
Conversation
6c4b512
to
6226ca5
Compare
6296355
to
fee97c2
Compare
fee97c2
to
04a4a72
Compare
bd83814
to
db4cb9e
Compare
@lukehoban @pgavlin PTAL |
db4cb9e
to
16715d8
Compare
16715d8
to
702eb96
Compare
Feedback has been addressed. PTAL @lukehoban |
// 'defaultName' is used per suggestion in https://git.io/fjVYi due to | ||
// https://github.com/pulumi/pulumi/issues/2433 | ||
const name = m.name || "defaultName"; | ||
if (!name || name === "defaultName") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic here looks very odd. We’re inside an if m.name
, then we default a value in (which can never happen). Then we check if it’s still undefined which doubly can’t ever happen.
It feels like this is not accomplishing what you intend, or at least is an awkward way to accomplish it if it is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
702eb96
to
1dff2c0
Compare
Feedback has been addressed, and code has been simplified. PTAL @lukehoban |
1dff2c0
to
3990570
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cluster2.core.storageClasses["mygp2"].apply(sc => { | ||
sc.metadata.name.apply(n => { | ||
if (n) { | ||
console.log(n); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious - what is the goal of these console.log
s? They aren't verified are they?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's simply to use for output of the generated storage class names. Figured printing them to the console worked well for an example. It wasn't meant as a verification other than the name is not undefined
.
StorageClasses
names that can be used, for example, to pass into Helm charts.