Skip to content

Commit

Permalink
Verify no changes from v2 -> v3
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Aug 26, 2020
1 parent f8c595b commit 404b029
Show file tree
Hide file tree
Showing 36 changed files with 1,744 additions and 460 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2019, Pulumi Corporation.
# Copyright 2016-2020, Pulumi Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,10 +13,10 @@
# limitations under the License.
from pulumi_kubernetes.helm.v2 import Chart, LocalChartOpts

values = {"unbound": {"image": {"pullPolicy": "Always"}}}
values = {"service": {"type": "ClusterIP"}}

Chart("unbound", LocalChartOpts("unbound", values=values))
Chart("nginx", LocalChartOpts(path="nginx", values=values))

# 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("unbound", LocalChartOpts("unbound", resource_prefix="dup", values=values))
Chart("nginx", LocalChartOpts(path="nginx", resource_prefix="dup", values=values))
File renamed without changes.
21 changes: 21 additions & 0 deletions tests/sdk/python/helm-local/step1/nginx/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
annotations:
category: Infrastructure
apiVersion: v1
appVersion: 1.19.1
description: Chart for the nginx server
engine: gotpl
home: http://www.nginx.org
icon: https://bitnami.com/assets/stacks/nginx/img/nginx-stack-220x234.png
keywords:
- nginx
- http
- web
- www
- reverse proxy
maintainers:
- email: containers@bitnami.com
name: Bitnami
name: nginx
sources:
- https://github.com/bitnami/bitnami-docker-nginx
version: 6.0.5
252 changes: 252 additions & 0 deletions tests/sdk/python/helm-local/step1/nginx/README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions tests/sdk/python/helm-local/step1/nginx/ci/ct-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service:
type: ClusterIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Test values file for generating all of the yaml and check that
# the rendering is correct

serverBlock: |-
server {
listen 0.0.0.0:8080;
root /app;
location / {
index index.html index.php;
}
location ~ \.php$ {
fastcgi_pass phpfpm-server:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
ingress:
enabled: true
tls: []

metrics:
enabled: true
## Kubeval doesn't recognise ServiceMonitor as a valid K8s object
# serviceMonitor:
# enabled: true
39 changes: 39 additions & 0 deletions tests/sdk/python/helm-local/step1/nginx/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Get the NGINX URL:

{{- if .Values.ingress.enabled }}

You should be able to access your new NGINX installation through:

{{- if .Values.ingress.hostname }}
- http://{{ .Values.ingress.hostname }}
{{- end }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
- http://{{ $host.name }}{{ . }}
{{- end }}
{{- end }}

{{- else if contains "LoadBalancer" .Values.service.type }}
{{- $port:=.Values.service.port | toString }}

NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "nginx.fullname" . }}'

export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "nginx.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo "NGINX URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"

{{- else if contains "ClusterIP" .Values.service.type }}

echo "NGINX URL: http://127.0.0.1:8080/"
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "nginx.fullname" . }} 8080:{{ .Values.service.port }}

{{- else if contains "NodePort" .Values.service.type }}

export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "nginx.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo "NGINX URL: http://$NODE_IP:$NODE_PORT/"

{{- end }}

{{- include "nginx.validateValues" . }}
{{- include "nginx.checkRollingTags" . }}
Loading

0 comments on commit 404b029

Please sign in to comment.