-
Notifications
You must be signed in to change notification settings - Fork 17
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
[nodejs] Generated code is broken for grafana crd #92
Comments
@mattolenik - could you take a look? |
Hey @viveklak @mattolenik |
Ran into the issue as well while generating code for nodejs/typescript from the grafana-operator: Sample output: Invalid type names generated export interface GrafanaSpecConfigExternal_image_storage.azure_blob {
account_key?: string;
account_name?: string;
container_name?: string;
} Invalid property names generated: /**
* GrafanaConfig is the configuration for grafana
*/
export interface GrafanaSpecConfig {
alerting?: outputs.integreatly.v1alpha1.GrafanaSpecConfigAlerting;
analytics?: outputs.integreatly.v1alpha1.GrafanaSpecConfigAnalytics;
auth?: outputs.integreatly.v1alpha1.GrafanaSpecConfigAuth;
auth.anonymous?: outputs.integreatly.v1alpha1.GrafanaSpecConfigAuthAnonymous;
auth.azuread?: outputs.integreatly.v1alpha1.GrafanaSpecConfigAuthAzuread;
// ...
} I think the property names chosen by grafana-operator may not follow recommendations (i.e. kubernetes prefers using camel-case for yaml properties), but it still is valid yaml nonetheless. I'd like to generalize the problem. crd2pulumi should ensure that properties and types generated from a CRD definiton |
Added to epic https://github.com/pulumi/home/issues/3431 |
Dupe of #15 |
What happened?
When running a grafana-operator crd the generated code is broken.
I think the issue is the crd yaml is using dots which don't convert well to TS and should use instead a '_' char or something else that is supported in TS classes/interfaces names.
Steps to reproduce
download the crd file https://github.com/bitnami/charts/blob/master/bitnami/grafana-operator/crds/grafanas.integreatly.org.yaml
run:
Namespace 'grafanas/types/input".integreatly.v1alpha1' has no exported member 'XYZ'
The text was updated successfully, but these errors were encountered: