Deploy one helm chart 2 times on k8s with conditions

Hello team,

Could someone provide examples of deploying the same app (nginx) twice in K8s with different versions using conditional statements?

For example, we have a chart (nginx1) used to deploy image tag 1.0.1. We want to keep the chart values as they are and add another service with name as nginx2 of a new image 1.0.2 to be deployed with the existing chart instead of creating 2 charts.

The expectation is to keep the chart as is, inject two additional values (name and image tag) to be altered, and deploy two services: nginx1 (1.0.1) and nginx2 (1.0.2).

It might help to describe what you want to do in a bit more concrete of a manner. What’s a use case here for what you’re trying to do? Helm is just using Golang style templates, and I expect that you want to change the values file and get different outcomes. But what are those outcomes? An example would help.

@rob_kodekloud updated the question :slight_smile: