                                                                                                                             
@@@  @@@  @@@ @@@  @@@       @@@  @@@  @@@             @@@  @@@  @@@   @@@@@@   @@@   @@@@@@@@  @@@  @@@  @@@@@@@   @@@@@@   
@@@  @@@  @@@ @@@  @@@       @@@  @@@@ @@@             @@@  @@@@ @@@  @@@@@@@   @@@  @@@@@@@@@  @@@  @@@  @@@@@@@  @@@@@@@   
@@!  !@@  @@! !@@  @@!       @@!  @@!@!@@@             @@!  @@!@!@@@  !@@       @@!  !@@        @@!  @@@    @@!    !@@       
!@!  @!!  !@! @!!  !@!       !@!  !@!!@!@!             !@!  !@!!@!@!  !@!       !@!  !@!        !@!  @!@    !@!    !@!       
@!@@!@!    !@!@!   @!!       !!@  @!@ !!@!  @!@!@!@!@  !!@  @!@ !!@!  !!@@!!    !!@  !@! @!@!@  @!@!@!@!    @!!    !!@@!!    
!!@!!!      @!!!   !!!       !!!  !@!  !!!  !!!@!@!!!  !!!  !@!  !!!   !!@!!!   !!!  !!! !!@!!  !!!@!!!!    !!!     !!@!!!   
!!: :!!     !!:    !!:       !!:  !!:  !!!             !!:  !!:  !!!       !:!  !!:  :!!   !!:  !!:  !!!    !!:         !:!  
:!:  !:!    :!:     :!:      :!:  :!:  !:!             :!:  :!:  !:!      !:!   :!:  :!:   !::  :!:  !:!    :!:        !:!   
 ::  :::     ::     :: ::::   ::   ::   ::              ::   ::   ::  :::: ::    ::   ::: ::::  ::   :::     ::    :::: ::   
 :   :::     :     : :: : :  :    ::    :              :    ::    :   :: : :    :     :: :: :    :   : :     :     :: : :    
                                                                                                                             

An automated observability platform for cloud-native developers.

# kylin-insights-agent Port for receiving trace, metrics, and log

kylin-insights-agent service: kylin-insights-agent.{{ $.Release.Namespace }}
kylin-insights-agent Host listening port: {{ tpl (toString (index .Values "kylin-insights-agent" "externalAgentHttpProxyPort")) . }}

# Get the Frontend URL to visit by running these commands in the same shell
{{ if contains "NodePort" .Values.grafana.service.type }}
NODE_PORT=$(kubectl get --namespace {{ $.Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ $.Release.Name }}-frontend)
NODE_IP=$(kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}")
echo -e "Frontend URL: http://$NODE_IP:$NODE_PORT  \nFrontend auth: admin:{{ tpl .Values.frontend.password . }}"
{{ else if contains "LoadBalancer" .Values.grafana.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 {{ $.Release.Name }}-grafana'
SERVICE_IP=$(kubectl get svc --namespace {{ $.Release.Namespace }} {{ $.Release.Name }}-frontend -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
http://$SERVICE_IP:{{ .Values.grafana.service.port -}}
{{ else if contains "ClusterIP"  .Values.grafana.service.type }}
POD_NAME=$(kubectl get pods --namespace {{ $.Release.Namespace }} -l "app.kubernetes.io/name={{ template "grafana.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace  {{ $.Release.Namespace }} port-forward $POD_NAME 3000
{{- end }}
