X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=helm%2Finfrastructure%2Fsubcharts%2Fkong%2Ftemplates%2FNOTES.txt;h=d7ee3f30771fcde5166ffa546a5caf2d11baecc2;hb=7a43fbd4642448783aaf708d07ca883bf9bc5afd;hp=7724fdcde9295dd37350debeffe50c412d02d613;hpb=282e7af25ec053ae6d1c5a399c91c2c323f705cd;p=ric-plt%2Fric-dep.git diff --git a/helm/infrastructure/subcharts/kong/templates/NOTES.txt b/helm/infrastructure/subcharts/kong/templates/NOTES.txt index 7724fdc..d7ee3f3 100755 --- a/helm/infrastructure/subcharts/kong/templates/NOTES.txt +++ b/helm/infrastructure/subcharts/kong/templates/NOTES.txt @@ -1,81 +1,16 @@ -1. Kong Admin can be accessed inside the cluster using: - DNS={{ template "kong.fullname" . }}-admin.{{ .Release.Namespace }}.svc.cluster.local - PORT={{ .Values.admin.servicePort }} +To connect to Kong, please execute the following command -To connect from outside the K8s cluster: - {{- if contains "LoadBalancer" .Values.admin.type }} - HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-admin -o jsonpath='{.status.loadBalancer.ingress.ip}') - PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-admin -o jsonpath='{.spec.ports[0].nodePort}') - {{- else if contains "NodePort" .Values.admin.type }} - HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath='{.items[0].status.addresses[0].address}') - PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-admin -o jsonpath='{.spec.ports[0].nodePort}') +{{- if contains "LoadBalancer" .Values.proxy.type }} + HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.spec.ports[0].port}') +{{- else if contains "NodePort" .Values.proxy.type -}} + HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath='{.items[0].status.addresses[0].address}') + PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.spec.ports[0].nodePort}') +{{- end -}} +export PROXY_IP=${HOST}:${PORT} +curl $PROXY_IP - {{- else if .Values.admin.ingress.enabled }} +Once installed, please follow along the getting started guide to start using Kong: +https://bit.ly/k4k8s-get-started -use one of the addresses listed below - - {{- $path := .Values.admin.ingress.path -}} - {{- if .Values.admin.ingress.tls }} - {{- range .Values.admin.ingress.hosts }} - https://{{ . }}{{ $path }} - {{- end }} - {{- else }} - {{- range .Values.admin.ingress.hosts }} - http://{{ . }}{{ $path }} - {{- end }} - {{- end }} - - {{- else if contains "ClusterIP" .Values.admin.type }} - HOST=127.0.0.1 - - # Execute the following commands to route the connection to Admin SSL port: - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "release={{ .Release.Name }}, app={{ template "kong.name" . }}" -o jsonpath="{.items[0].metadata.name}") - kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ .Values.admin.servicePort }}:{{ .Values.admin.servicePort }} - {{- end }} - - -2. Kong Proxy can be accessed inside the cluster using: - DNS={{ template "kong.fullname" . }}-proxy.{{ .Release.Namespace }}.svc.cluster.local - {{- if .Values.proxy.tls.enabled -}} - PORT={{ .Values.proxy.tls.servicePort }} - {{- else -}} - PORT={{ .Values.proxy.http.servicePort }} - {{- end -}} - - -To connect from outside the K8s cluster: - {{- if contains "LoadBalancer" .Values.proxy.type }} - HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.status.loadBalancer.ingress.ip}') - PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.spec.ports[0].nodePort}') - - {{- else if contains "NodePort" .Values.proxy.type }} - HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath='{.items[0].status.addresses[0].address}') - PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "kong.fullname" . }}-proxy -o jsonpath='{.spec.ports[0].nodePort}') - - {{- else if .Values.proxy.ingress.enabled }} - -use one of the addresses listed below - - {{- $path := .Values.proxy.ingress.path -}} - {{- if .Values.proxy.ingress.tls }} - {{- range .Values.proxy.ingress.hosts }} - https://{{ . }}{{ $path }} - {{- end }} - {{- else }} - {{- range .Values.proxy.ingress.hosts }} - http://{{ . }}{{ $path }} - {{- end }} - {{- end }} - - {{- else if contains "ClusterIP" .Values.proxy.type }} - HOST=127.0.0.1 - - # Execute the following commands to route the connection to proxy SSL port: - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "release={{ .Release.Name }}, app={{ template "kong.name" . }}" -o jsonpath="{.items[0].metadata.name}") - {{- if .Values.proxy.tls.enabled -}} - kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ .Values.proxy.tls.servicePort }}:{{ .Values.proxy.tls.servicePort }} - {{- else -}} - kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ .Values.proxy.http.servicePort }}:{{ .Values.proxy.http.servicePort }} - {{- end -}} - {{- end }}