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

feat(storage-classes): export all user created storage classes #172

Merged
merged 1 commit into from
Jul 18, 2019

Conversation

metral
Copy link
Contributor

@metral metral commented Jun 19, 2019

@metral metral force-pushed the metral/export-all-sc branch 2 times, most recently from bd83814 to db4cb9e Compare June 20, 2019 02:23
@metral
Copy link
Contributor Author

metral commented Jun 20, 2019

@lukehoban @pgavlin PTAL

nodejs/eks/cluster.ts Outdated Show resolved Hide resolved
nodejs/eks/examples/examples_test.go Outdated Show resolved Hide resolved
nodejs/eks/examples/storage-classes/utils.ts Outdated Show resolved Hide resolved
nodejs/eks/utils.ts Outdated Show resolved Hide resolved
@metral
Copy link
Contributor Author

metral commented Jun 21, 2019

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") {
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

nodejs/eks/cluster.ts Outdated Show resolved Hide resolved
@metral
Copy link
Contributor Author

metral commented Jul 16, 2019

Feedback has been addressed, and code has been simplified. PTAL @lukehoban

Copy link
Member

@lukehoban lukehoban left a 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);
Copy link
Member

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.logs? They aren't verified are they?

Copy link
Contributor Author

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.

@metral metral merged commit e037f66 into master Jul 18, 2019
@pulumi-bot pulumi-bot deleted the metral/export-all-sc branch July 18, 2019 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants