Files
zhenyi c2487ec0b6 feat(charts): add Helm chart for gitks Git bare repository service
- Create Chart.yaml with application metadata and keywords
- Add _helpers.tpl with name, fullname, labels, and DNS template functions
- Generate ConfigMap with all gitks configuration environment variables
- Implement StatefulSet with persistent volume claims for repository data
- Create headless service for pod DNS and cluster communication
- Add gRPC service for client connections and metrics service
- Include HorizontalPodAutoscaler for dynamic scaling
- Add PodDisruptionBudget to maintain cluster availability
- Create ServiceAccount with proper security context
- Add test connection pod using grpcurl for health checks
- Generate NOTES.txt with installation instructions and quick start guide
- Create .helmignore file to exclude common development files
- Configure persistence, resource limits, and security settings
- Add support for cluster mode with etcd service discovery
2026-06-08 21:21:15 +08:00

50 lines
2.0 KiB
Plaintext

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.