#### THIS CHART IS DEPRECATED! ####

Get the Artifactory URL to visit by running these commands in the same shell:
{{- if contains "NodePort" .Values.ServiceType }}
  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
  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.ServiceType }}
**** 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 -w {{ template "fullname" . }}' ****
  export SERVICE_IP=$(kubectl get svc {{ template "fullname" . }} --namespace {{ .Release.Namespace }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
  echo http://$SERVICE_IP:{{ .Values.httpPort }}/

{{- else if contains "ClusterIP"  .Values.ServiceType }}
  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.httpPort }}
  kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ .Values.httpPort }}:{{ .Values.httpPort }}

{{- end }}

Default credential for Artifactory:
user: admin
password: password
