gardener / machine-controller-manager-provider-gcp

Gardener machine controller manager provider for GCP
Apache License 2.0
3 stars 27 forks source link

Better error message on ServiceAccountJSON decode failure #67

Closed AhmedMozaly closed 1 year ago

AhmedMozaly commented 1 year ago

What this PR does / why we need it: I spent more than an hour trying to troubleshoot invalid character '\n' in string literal when creating new VMs, At the end it was extra \n in the secret value

Thought it's better to guide the developer to the root cause of the error by enhancing the error message

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Release note:

Enhance error message when decoding serviceAccountJSON fails.
gardener-robot commented 1 year ago

@AhmedMozaly Thank you for your contribution.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

gardener-robot-ci-3 commented 1 year ago

Thank you @AhmedMozaly for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below.

AhmedMozaly commented 1 year ago

@himanshu-kun I've a side question, posting here as I can't find other place I've managed to install MCM into a k8s cluster, Could create machines and can see it created in the GCP console.

But it's always in "Pending" status when I run kubectl get machine I know this should be fixed by adding machine initialization script to the k8s secret that the MachineClass is referencing, But can't find an example initialization script to set.

Is there an example for what I should set in the k8s secret to allow the machine status to move from "Pending" to "Running"?

himanshu-kun commented 1 year ago

hello @AhmedMozaly we currently don't have an example initialization script which you can refer to. But I think its a major roadblock for anyone trying to get his hands dirty with MCM. So we'll add a script in coming days. will create an issue for the same to track

himanshu-kun commented 1 year ago

tracking issue -> https://github.com/gardener/machine-controller-manager/issues/768

AhmedMozaly commented 1 year ago

tracking issue -> gardener/machine-controller-manager#768

@himanshu-kun Thanks for the response, I've added a comment on the issue let's kindly continue discussion there