From 156d706dd1ef19dd09818ab5ebd82fc9bd4189a8 Mon Sep 17 00:00:00 2001 From: Vic Iglesias Date: Tue, 1 Nov 2016 16:08:20 -0700 Subject: [PATCH 1/4] Use internal port for health check --- pkg/chartutil/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 74556a788..49f6b7b3e 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -114,11 +114,11 @@ spec: livenessProbe: httpGet: path: / - port: 80 + port: {{ .Values.service.internalPort }} readinessProbe: httpGet: path: / - port: 80 + port: {{ .Values.service.internalPort }} resources: {{ toYaml .Values.resources | indent 12 }} ` From 8527f2f96c1f3ba27ced1a4879b7846ca769f935 Mon Sep 17 00:00:00 2001 From: Vic Iglesias Date: Tue, 1 Nov 2016 16:09:15 -0700 Subject: [PATCH 2/4] Use chart name for container name --- pkg/chartutil/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 49f6b7b3e..7cfd438e0 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -106,7 +106,7 @@ spec: app: {{ template "fullname" . }} spec: containers: - - name: nginx + - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: From 5af08fa5b5aa3574ae2dc38823efb526b58d6f59 Mon Sep 17 00:00:00 2001 From: Vic Iglesias Date: Tue, 1 Nov 2016 16:10:58 -0700 Subject: [PATCH 3/4] Fix labels in NOTES.txt --- pkg/chartutil/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 7cfd438e0..6ca38aafc 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -151,7 +151,7 @@ const defaultNotes = `1. Get the application URL by running these commands: export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') echo http://$SERVICE_IP:{{ .Values.Master.ServicePort }} {{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "component={{ template "fullname" . }}-master" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}") echo http://127.0.0.1:{{ .Values.service.externalPort }} kubectl port-forward $POD_NAME {{ .Values.service.externalPort }}:{{ .Values.service.externalPort }} {{- end }} From 417928276086c5dcef5ffb490c82bf69822d7bb6 Mon Sep 17 00:00:00 2001 From: Vic Iglesias Date: Tue, 1 Nov 2016 16:14:45 -0700 Subject: [PATCH 4/4] Dont use privileged port in port-forward of default chart --- pkg/chartutil/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 6ca38aafc..0fb97eb99 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -152,8 +152,8 @@ const defaultNotes = `1. Get the application URL by running these commands: echo http://$SERVICE_IP:{{ .Values.Master.ServicePort }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}") - echo http://127.0.0.1:{{ .Values.service.externalPort }} - kubectl port-forward $POD_NAME {{ .Values.service.externalPort }}:{{ .Values.service.externalPort }} + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.externalPort }} {{- end }} `