Optio has been installed in the {{ .Values.namespace }} namespace.

{{- if eq .Values.api.service.type "NodePort" }}

API server:  http://localhost:{{ .Values.api.service.nodePort | default .Values.api.port }}
{{- else }}

API server:  kubectl port-forward -n {{ .Values.namespace }} svc/{{ .Release.Name }}-api {{ .Values.api.port }}:{{ .Values.api.port }}
{{- end }}
{{- if eq .Values.web.service.type "NodePort" }}
Web UI:      http://localhost:{{ .Values.web.service.nodePort | default .Values.web.port }}
{{- else }}
Web UI:      kubectl port-forward -n {{ .Values.namespace }} svc/{{ .Release.Name }}-web {{ .Values.web.port }}:{{ .Values.web.port }}
{{- end }}

{{- if .Values.ingress.enabled }}

---

INGRESS

Traffic is routed via Ingress ({{ .Values.ingress.className }}).
{{- end }}
{{- if and .Values.gatewayAPI.enabled (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1") }}

---

GATEWAY API

Traffic is routed via Gateway API ({{ .Values.gatewayAPI.gatewayClassName }}).
  Gateway:   {{ .Release.Name }}-gateway
  HTTPRoute: {{ .Release.Name }}-httproute
{{- if .Values.gatewayAPI.hostname }}
  Hostname:  {{ .Values.gatewayAPI.hostname }}
{{- end }}
{{- end }}
{{- if and .Values.gatewayAPI.enabled (not (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1")) }}

---

WARNING: gatewayAPI.enabled is true but gateway.networking.k8s.io/v1 CRDs are
not installed in this cluster. No Gateway or HTTPRoute resources were created.
Install the Gateway API CRDs first:

  kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/latest/download/standard-install.yaml
{{- end }}

---

METRICS SERVER

Resource utilization on the overview page requires metrics-server.
If your cluster does not have it installed, run:

  kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

For Docker Desktop / kind / minikube, also patch with --kubelet-insecure-tls:

  kubectl patch deployment metrics-server -n kube-system --type=json \
    -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]'

Without metrics-server, CPU and memory usage will show as "N/A".
