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

Pascal-cased Helm values do not work #2213

Open
rassie opened this issue Oct 7, 2024 · 1 comment
Open

Pascal-cased Helm values do not work #2213

rassie opened this issue Oct 7, 2024 · 1 comment
Labels
bug Something isn't working needs-triage Priority and effort undetermined yet

Comments

@rassie
Copy link

rassie commented Oct 7, 2024

Description of the bug:

When a chart is using Pascal-cased values keys, cdk8s generates a camel-cased property which does not work when applied to the chart.

Reproduction Steps:

  • Import helm:https://SonarSource.github.io/helm-chart-sonarqube/[email protected]+3598
  • Compare YAML output of two following chart declarations. You'll notice that OpenShift options described in the Helm chart do not activate when cdk8s-generated type declaration is used.

Non-working:

        new Sonarqube(this, "sonarqube", {
            values: {
                replicaCount: SonarqubeReplicaCount.VALUE_1,
                openShift: {
                    additionalValues: {
                        enabled: true,
                    },
                },
            },
        });

Working:

        new Sonarqube(this, "sonarqube", {
            values: {
                replicaCount: SonarqubeReplicaCount.VALUE_1,
                additionalValues: {
                    OpenShift: {
                        enabled: true,
                    },
                },
            },
        });

NB: I've not tested this extensively, so that root cause can be different, including my own stupidity.


This is 🐛 Bug Report

@rassie rassie added bug Something isn't working needs-triage Priority and effort undetermined yet labels Oct 7, 2024
@bdoyle0182
Copy link

seems valid issue to me after taking a quick glance at the chart generated import in typescript. If the generated schema value variable names don't map identically you're going to have to specify them in additionalValues manually. If doing a helm import, it probably doesn't make sense to do any variable name mutation to a case type; or store a mapping of the variable name to the actual helm key string to keep things pretty and use that mapping on generation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Priority and effort undetermined yet
Projects
None yet
Development

No branches or pull requests

2 participants