Skip to content

Unable to pass in custom values for values.yaml #204

@padas2

Description

@padas2

Hi,

First of all, thank you for writing this library.
This reduced a lot of my work.

However, I am stuck at a point and need some help.
I have a helm chart which has the structure of typical helm chart.
A Chart.yaml, a value.yaml, a templates directory which has all the templates for launching the K8 components etc. etc.

I am able to launch this helm chart (when all the required values are pre-populated) using the Java Sdk without any problem.
However, when I try to pass in values at runtime, the chart gets launched but values are not substituted, resulting in an improper deployment where the image is not even pulled.

Following is the code I am using.

final Map<String, String> yaml = new LinkedHashMap<>()
yaml.put("imageName", "<Name-of-image>")
final String yamlString = new Yaml().dump(yaml);

final InstallReleaseRequest.Builder installReleaseRequestBuilder = InstallReleaseRequest.newBuilder();
installReleaseRequestBuilder.setName('sleeping-panda')
installReleaseRequestBuilder.getValuesBuilder().setRaw(yamlString)

ChartOuterClass.Chart.Builder chartBuilder = null;
Path validChartPath = Paths.get('<Absolute-path-to-helm-chart-location-in-local-workspace>')
chartBuilder = new DirectoryChartLoader().load(validChartPath)

final Future<hapi.services.tiller.Tiller.InstallReleaseResponse> releaseFuture = chartManager.install(installReleaseRequestBuilder, chartBuilder)
final ReleaseOuterClass.Release release = releaseFuture.get().getRelease();

I observed that in one of the previous issues, you have mentioned to refer a link which pointed to a Kubernetes Slack channel.

But, for some reason, I am unable to login to that slack channel.
Hence requesting your assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions