Skip to content

Commit

Permalink
Add python test
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Jun 19, 2019
1 parent 15d12df commit 1b8a3b8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/examples/python/helm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,18 @@
# limitations under the License.
from pulumi_kubernetes.helm.v2 import Chart, ChartOpts

Chart("nginx-ingress", ChartOpts("stable/nginx-ingress"))

def make_private(obj):
if obj["kind"] == "Service" and obj["apiVersion"] == "v1":
if "spec" in obj and "type" in obj["spec"] and obj["spec"]["type"] == "LoadBalancer":
obj["spec"]["type"] = "ClusterIP"


Chart("nginx-lego", ChartOpts(
"stable/nginx-lego", values={"nginx": None, "default": None, "lego": None}, transformations=[make_private]))

# Deploy a duplicate chart with a different resource prefix to verify that multiple instances of the Chart
# can be managed in the same stack.
Chart("nginx-lego", ChartOpts(
"stable/nginx-lego", values={"nginx": None, "default": None, "lego": None}, transformations=[make_private],
resource_prefix="dup"))

0 comments on commit 1b8a3b8

Please sign in to comment.