Thank you for installing gitks {{ .Chart.AppVersion }}!

gitks is a gRPC-accessible Git bare repository operations service.

{{- if .Values.gitks.etcd.endpoints }}
🚀 Cluster mode: ENABLED
   etcd endpoints: {{ .Values.gitks.etcd.endpoints }}
   Nodes will discover each other via etcd and elect a PRIMARY.
{{- else }}
⚠️  Cluster mode: DISABLED (gitks.etcd.endpoints is empty)
   Running in standalone mode — no automatic failover.
{{- end }}

📦 StatefulSet: {{ include "gitks.fullname" . }}
   Replicas: {{ .Values.replicaCount }}
   Each pod mounts its own PVC for /data/repos.

🔌 Services:
   gRPC:    {{ include "gitks.fullname" . }}:{{ .Values.service.port }}
   Metrics: {{ include "gitks.fullname" . }}-metrics:{{ .Values.metricsService.port }}
   Cluster: {{ include "gitks.headlessServiceName" . }} (headless, pod DNS)

{{- if contains "NodePort" .Values.service.type }}
  gRPC NodePort: kubectl get svc {{ include "gitks.fullname" . }} -o jsonpath='{.spec.ports[0].nodePort}'
{{- else if contains "LoadBalancer" .Values.service.type }}
  gRPC external IP: kubectl get svc {{ include "gitks.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}"
{{- else }}
  Port-forward gRPC:
    kubectl port-forward svc/{{ include "gitks.fullname" . }} {{ .Values.service.port }}:{{ .Values.service.port }}

  Port-forward metrics:
    kubectl port-forward svc/{{ include "gitks.fullname" . }}-metrics {{ .Values.metricsService.port }}:{{ .Values.metricsService.port }}
{{- end }}

📊 Metrics:
   Prometheus endpoint available at :{{ .Values.metricsService.port }}/metrics
   Metrics Service annotations include prometheus.io/scrape labels.

💡 Quick start:
   # Check pod status
   kubectl get pods -l app.kubernetes.io/instance={{ .Release.Name }}

   # View logs
   kubectl logs -f statefulset/{{ include "gitks.fullname" . }}

   # Scale up cluster
   helm upgrade {{ .Release.Name }} . --set replicaCount=5

For more information, see the project README.
