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

Disable Kubernetes Dashboard by default #3011

Merged

Conversation

vbhavsar
Copy link
Contributor

@vbhavsar vbhavsar commented Feb 7, 2019

Kubernetes Dashboard has been deprecated and should not be enabled by default.

Fixes #2547.

@vbhavsar
Copy link
Contributor Author

vbhavsar commented Feb 7, 2019

cc @ndmckinley

@@ -1597,6 +1597,12 @@ func flattenClusterAddonsConfig(c *containerBeta.AddonsConfig) []map[string]inte
"disabled": c.KubernetesDashboard.Disabled,
},
}
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately this is backwards - flatteners go from api objects to terraform objects, but expanders go from terraform objects to api objects. You'll need to make a similar change in the expander. Any reason you didn't choose to set the default in the schema object instead?

@nat-henderson
Copy link
Contributor

That would be interesting! I'll run that through the generation system and run the tests on it.

@nat-henderson
Copy link
Contributor

Ah, right - that doesn't compile, k8s doesn't have the Enabled field on their dashboard object.

Vishal Bhavsar added 2 commits February 27, 2019 18:31
Kubernetes Dashboard has been deprecated and should not be enabled by default.
@vbhavsar
Copy link
Contributor Author

@ndmckinley Sorry, I didn't intend for this change to be reviewed yet. I did notice that k8s didn't have Enabled. I can make a pull request to k8s if you think it is a worthy change and likely to be accepted.

An alternate is to set Disabled to false by default.

@nat-henderson
Copy link
Contributor

Hi,

That might work! I think that setting it to false by default has a chance of working depending on how the underlying api calls wind up working. Are you comfortable implementing and testing that?

I'm confident k8s won't accept that PR - their client code is autogenerated.

@vbhavsar
Copy link
Contributor Author

An alternate is to set Disabled to false by default.

s/false/true/ but I think you know what I meant. :)

Are you comfortable implementing and testing that?

I will give it a shot.

@vbhavsar vbhavsar force-pushed the vishal/disable-k8s-dashboard-by-default branch from 212f310 to 25b7729 Compare February 28, 2019 21:06
@danawillow
Copy link
Contributor

Hi @vbhavsar, sorry for the delay! I'll be taking over this review while Nathan is out.

Have you tested this change? Just looking at the code, I think it'll only work successfully if the user specifies an empty kubernetes_dashboard block.

Copy link
Contributor

@danawillow danawillow left a comment

Choose a reason for hiding this comment

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

The code side of this isn't actually going to have any immediate effect due to an existing bug where putting an empty block in here crashes Terraform, but it doesn't hurt, and the docs update is good and should be included (since not providing the block at all does disable it by default on the api side).

@vbhavsar
Copy link
Contributor Author

vbhavsar commented Jun 27, 2019

Hi @danawillow. I should have posted a comment here when I tried and failed to implement your suggestion.

I'm happy to know that the documentation is useful at least. :)

Thanks for merging!

Let me know if there is anything I need to do with this pull request.

@danawillow danawillow merged commit 3c347f8 into hashicorp:master Jun 27, 2019
@ghost
Copy link

ghost commented Jul 28, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_container_cluster - kubernetes_dashboard should be disabled by default
3 participants