From de5321e35b5127a12a2697f36bb3183eea63ea2f Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Wed, 2 Sep 2020 18:03:37 +0100 Subject: [PATCH 1/6] Helm Chart Updates - Add NOTES template - Add maintainers and keywords to chart.yaml --- deploy/kubernetes/console/Chart.yaml | 13 +++++++++++-- deploy/kubernetes/console/templates/NOTES.txt | 8 ++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 deploy/kubernetes/console/templates/NOTES.txt diff --git a/deploy/kubernetes/console/Chart.yaml b/deploy/kubernetes/console/Chart.yaml index 22538c426e..73d0a66b23 100644 --- a/deploy/kubernetes/console/Chart.yaml +++ b/deploy/kubernetes/console/Chart.yaml @@ -1,8 +1,17 @@ apiVersion: v1 -description: A Helm chart for deploying Stratos UI Console +description: A Helm chart for deploying Stratos name: console version: 0.1.0 appVersion: 0.1.0 sources: - https://github.com/cloudfoundry/stratos -icon: https://raw.githubusercontent.com/cloudfoundry/stratos/master/deploy/kubernetes/console/icon.png \ No newline at end of file +icon: https://raw.githubusercontent.com/cloudfoundry/stratos/master/deploy/kubernetes/console/icon.png +maintainers: + - name: Stratos @ SUSE + email: TODO: RC + url: https://stratos.app +keywords: + - Stratos + - Cloud Foundry + - Kubernetes + - Helm \ No newline at end of file diff --git a/deploy/kubernetes/console/templates/NOTES.txt b/deploy/kubernetes/console/templates/NOTES.txt new file mode 100644 index 0000000000..e77efa9828 --- /dev/null +++ b/deploy/kubernetes/console/templates/NOTES.txt @@ -0,0 +1,8 @@ +Thank you for installing Stratos. + +Your release is named {{ .Release.Name }} and is in the namespace {{ .Release.Namespace }}. + +To learn more about the release, try: + + $ helm status {{ .Release.Name }} -n {{ .Release.Namespace }} + $ helm get all {{ .Release.Name }} -n {{ .Release.Namespace }} \ No newline at end of file From 0ed068d9f8163bee2828b73cd73c8fd50874384a Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Thu, 3 Sep 2020 14:01:23 +0100 Subject: [PATCH 2/6] Update helm install instruction in build.sh script to helm 3 --- deploy/kubernetes/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/kubernetes/build.sh b/deploy/kubernetes/build.sh index f838cc3549..4dc645a607 100755 --- a/deploy/kubernetes/build.sh +++ b/deploy/kubernetes/build.sh @@ -296,5 +296,5 @@ printf "${RESET}" echo echo "To deploy using Helm, execute the following:" echo -echo " helm install helm-chart --namespace console --name my-console" +echo " helm install my-console ./helm-chart --namespace console" echo From 79427719675f82a6bdcea26721b2b6aa83959e0a Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Thu, 3 Sep 2020 14:01:46 +0100 Subject: [PATCH 3/6] Helm Chart Notes Fixes/Updates --- deploy/kubernetes/console/Chart.yaml | 4 ++-- deploy/kubernetes/console/templates/NOTES.txt | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/deploy/kubernetes/console/Chart.yaml b/deploy/kubernetes/console/Chart.yaml index 73d0a66b23..8c17ca14c8 100644 --- a/deploy/kubernetes/console/Chart.yaml +++ b/deploy/kubernetes/console/Chart.yaml @@ -8,10 +8,10 @@ sources: icon: https://raw.githubusercontent.com/cloudfoundry/stratos/master/deploy/kubernetes/console/icon.png maintainers: - name: Stratos @ SUSE - email: TODO: RC + email: "TODO: RC" url: https://stratos.app keywords: - Stratos - - Cloud Foundry + - "Cloud Foundry" - Kubernetes - Helm \ No newline at end of file diff --git a/deploy/kubernetes/console/templates/NOTES.txt b/deploy/kubernetes/console/templates/NOTES.txt index e77efa9828..c308c47670 100644 --- a/deploy/kubernetes/console/templates/NOTES.txt +++ b/deploy/kubernetes/console/templates/NOTES.txt @@ -1,8 +1,7 @@ -Thank you for installing Stratos. - -Your release is named {{ .Release.Name }} and is in the namespace {{ .Release.Namespace }}. +Thank you for installing Stratos. Your release is named '{{ .Release.Name }}' and is in the namespace '{{ .Release.Namespace }}'. To learn more about the release, try: - $ helm status {{ .Release.Name }} -n {{ .Release.Namespace }} - $ helm get all {{ .Release.Name }} -n {{ .Release.Namespace }} \ No newline at end of file + $ helm get values {{ .Release.Name }} -n {{ .Release.Namespace }} + $ kubectl get services -n {{ .Release.Namespace }} + $ kubectl get pods -n {{ .Release.Namespace }} \ No newline at end of file From 49fbb78713a9d70b3f9e4f2333e4ad0206c6d101 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Mon, 7 Sep 2020 13:59:03 +0100 Subject: [PATCH 4/6] Changes following review --- deploy/kubernetes/console/Chart.yaml | 6 ++--- deploy/kubernetes/console/templates/NOTES.txt | 26 ++++++++++++++++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/deploy/kubernetes/console/Chart.yaml b/deploy/kubernetes/console/Chart.yaml index 8c17ca14c8..8f87d11689 100644 --- a/deploy/kubernetes/console/Chart.yaml +++ b/deploy/kubernetes/console/Chart.yaml @@ -7,9 +7,9 @@ sources: - https://github.com/cloudfoundry/stratos icon: https://raw.githubusercontent.com/cloudfoundry/stratos/master/deploy/kubernetes/console/icon.png maintainers: - - name: Stratos @ SUSE - email: "TODO: RC" - url: https://stratos.app + - name: Stratos Maintainers + email: stratos-maintainers@suse.de + home: https://stratos.app keywords: - Stratos - "Cloud Foundry" diff --git a/deploy/kubernetes/console/templates/NOTES.txt b/deploy/kubernetes/console/templates/NOTES.txt index c308c47670..57cf064caf 100644 --- a/deploy/kubernetes/console/templates/NOTES.txt +++ b/deploy/kubernetes/console/templates/NOTES.txt @@ -1,4 +1,28 @@ -Thank you for installing Stratos. Your release is named '{{ .Release.Name }}' and is in the namespace '{{ .Release.Namespace }}'. +{{ if .Values.console.techPreview -}} +Tech Preview is enabled, extra features will be shown. + +{{ end }} + +{{- $ingress := .Values.console.ingress | default dict -}} +{{ if $ingress.enabled -}} +From outside the cluster, the server URL is: http://{{ .Values.console.ingress.host }} +{{- else }} +Get the URL by running these commands in the same shell: +{{- if contains "NodePort" .Values.console.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services console-ui-ext) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.console.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w console-ui-ext' + + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} console-ui-ext -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.console.service.servicePor }} +{{- else if contains "ClusterIP" .Values.console.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app=stratos-0,component=ui" -o jsonpath="{.items[0].metadata.name}") + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9090 +{{- end }} +{{- end }} To learn more about the release, try: $ helm status {{ .Release.Name }} -n {{ .Release.Namespace }} From c5c990f2cfde16e00e1c0a2c7ef9ba2162a078cc Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Mon, 7 Sep 2020 17:17:35 +0100 Subject: [PATCH 5/6] Changes following review --- deploy/kubernetes/console/Chart.yaml | 2 +- deploy/kubernetes/console/templates/NOTES.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/kubernetes/console/Chart.yaml b/deploy/kubernetes/console/Chart.yaml index 8f87d11689..aaea5f78e9 100644 --- a/deploy/kubernetes/console/Chart.yaml +++ b/deploy/kubernetes/console/Chart.yaml @@ -6,10 +6,10 @@ appVersion: 0.1.0 sources: - https://github.com/cloudfoundry/stratos icon: https://raw.githubusercontent.com/cloudfoundry/stratos/master/deploy/kubernetes/console/icon.png +home: https://stratos.app maintainers: - name: Stratos Maintainers email: stratos-maintainers@suse.de - home: https://stratos.app keywords: - Stratos - "Cloud Foundry" diff --git a/deploy/kubernetes/console/templates/NOTES.txt b/deploy/kubernetes/console/templates/NOTES.txt index 57cf064caf..d8dd4049d6 100644 --- a/deploy/kubernetes/console/templates/NOTES.txt +++ b/deploy/kubernetes/console/templates/NOTES.txt @@ -17,7 +17,7 @@ Get the URL by running these commands in the same shell: You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w console-ui-ext' export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} console-ui-ext -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.console.service.servicePor }} + echo http://$SERVICE_IP:{{ .Values.console.service.servicePort }} {{- else if contains "ClusterIP" .Values.console.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app=stratos-0,component=ui" -o jsonpath="{.items[0].metadata.name}") kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9090 From ce359ef3e7d0b077bd33a81ad61dc4dfb585c4d0 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Tue, 15 Sep 2020 11:52:06 +0100 Subject: [PATCH 6/6] Address PR comments, fix whitespacing --- deploy/kubernetes/console/templates/NOTES.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/deploy/kubernetes/console/templates/NOTES.txt b/deploy/kubernetes/console/templates/NOTES.txt index d8dd4049d6..0d005a46fd 100644 --- a/deploy/kubernetes/console/templates/NOTES.txt +++ b/deploy/kubernetes/console/templates/NOTES.txt @@ -1,17 +1,17 @@ -{{ if .Values.console.techPreview -}} +{{- if .Values.console.techPreview }} Tech Preview is enabled, extra features will be shown. +{{- end}} -{{ end }} - -{{- $ingress := .Values.console.ingress | default dict -}} -{{ if $ingress.enabled -}} +To access Stratos: +{{- $ingress := .Values.console.ingress | default dict }} +{{- if $ingress.enabled }} From outside the cluster, the server URL is: http://{{ .Values.console.ingress.host }} {{- else }} Get the URL by running these commands in the same shell: {{- if contains "NodePort" .Values.console.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services console-ui-ext) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT + echo https://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.console.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w console-ui-ext' @@ -20,7 +20,7 @@ Get the URL by running these commands in the same shell: echo http://$SERVICE_IP:{{ .Values.console.service.servicePort }} {{- else if contains "ClusterIP" .Values.console.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app=stratos-0,component=ui" -o jsonpath="{.items[0].metadata.name}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9090 + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 443 {{- end }} {{- end }}