penguin/flatgit

flatgit showcase

commit ae2ca700755df37c186d45857ad98648ad940781

author斟酌 鵬兄 <tgckpg@gmail.com>
date2026-06-18T21:54:44Z
subjectAdded httproute
commit ae2ca700755df37c186d45857ad98648ad940781
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2026-06-18T21:54:44Z

    Added httproute
---
 README.md                                         |  9 +++++++
 internal/buildinfo/buildinfo_gen.go               |  4 +--
 resources/flatgit.chart/templates/deployment.yaml |  6 ++++-
 resources/flatgit.chart/templates/httproutes.yaml | 32 +++++++++++++++++++++++
 resources/flatgit.chart/values.yaml               | 28 ++++++++++++++++++--
 5 files changed, 74 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index b262594..d2ccde6 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,15 @@
 
 `flatgit` is a static Git web generator with webhook-driven updates and an optional built-in file server.
 
+## Install
+
+via helm
+```
+helm show values ./resources/flatgit.chart/ > values.yaml
+edit values.yaml
+helm upgrade --install -n <NAMESPACE> <RELEASE_NAME> ./resources/flatgit.chart/ -f values.yaml
+```
+
 ## Philosophy
 
 Git repo in, static browsable site out.
diff --git a/internal/buildinfo/buildinfo_gen.go b/internal/buildinfo/buildinfo_gen.go
index c50b854..0326bbb 100644
--- a/internal/buildinfo/buildinfo_gen.go
+++ b/internal/buildinfo/buildinfo_gen.go
@@ -2,6 +2,6 @@ package buildinfo
 
 const (
     Version     = "dev"
-    GitRevision = "34c40f8839cd8ead6a3e4900d67abf0feea76ea7"
-    Timestamp   = "20260618.204600"
+    GitRevision = "bdd09021663dcb4b6d0267105cd47964ff810c51"
+    Timestamp   = "20260618.214049"
 )
diff --git a/resources/flatgit.chart/templates/deployment.yaml b/resources/flatgit.chart/templates/deployment.yaml
index c5b3db4..84a5ffa 100644
--- a/resources/flatgit.chart/templates/deployment.yaml
+++ b/resources/flatgit.chart/templates/deployment.yaml
@@ -18,6 +18,10 @@ spec:
         app.kubernetes.io/name: {{ include "flatgit.name" . }}
         app.kubernetes.io/instance: {{ .Release.Name }}
     spec:
+{{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+{{- end }}
       securityContext:
         runAsNonRoot: {{ .Values.securityContext.runAsNonRoot }}
         runAsUser: {{ .Values.securityContext.runAsUser }}
@@ -82,4 +86,4 @@ spec:
             claimName: {{ include "flatgit.fullname" . }}-data
           {{- else }}
           emptyDir: {}
-          {{- end }}
\ No newline at end of file
+          {{- end }}
diff --git a/resources/flatgit.chart/templates/httproutes.yaml b/resources/flatgit.chart/templates/httproutes.yaml
new file mode 100644
index 0000000..e478aac
--- /dev/null
+++ b/resources/flatgit.chart/templates/httproutes.yaml
@@ -0,0 +1,32 @@
+{{- if .Values.httpRoute.enabled }}
+apiVersion: gateway.networking.k8s.io/v1
+kind: HTTPRoute
+metadata:
+  name: {{ include "flatgit.fullname" . }}
+  labels:
+    {{- include "flatgit.labels" . | nindent 4 }}
+    {{- with .Values.httpRoute.labels }}
+    {{- toYaml . | nindent 4 }}
+    {{- end }}
+  {{- with .Values.httpRoute.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+  parentRefs:
+    {{- toYaml .Values.httpRoute.parentRefs | nindent 4 }}
+
+  {{- with .Values.httpRoute.hostnames }}
+  hostnames:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+
+  rules:
+    - matches:
+        - path:
+            type: PathPrefix
+            value: {{ .Values.httpRoute.pathPrefix | quote }}
+      backendRefs:
+        - name: {{ include "flatgit.fullname" . }}
+          port: {{ .Values.service.port }}
+{{- end }}
\ No newline at end of file
diff --git a/resources/flatgit.chart/values.yaml b/resources/flatgit.chart/values.yaml
index 2c02fa3..d87080d 100644
--- a/resources/flatgit.chart/values.yaml
+++ b/resources/flatgit.chart/values.yaml
@@ -3,14 +3,38 @@ replicaCount: 1
 image:
   repository: ghcr.io/tgckpg/flatgit
   tag: dev
-  pullPolicy: Always
+  pullPolicy: IfNotPresent
 
-timezone: Asia/Tokyo
+imagePullSecrets: []
+# Example:
+# imagePullSecrets:
+#   - name: ghcr-pull-secret
+
+timezone: UTC
 
 service:
   type: ClusterIP
   port: 8080
 
+httpRoute:
+  enabled: false
+
+  # Usually same namespace, but leave configurable.
+  parentRefs:
+    - name: gateway
+      namespace: default
+      sectionName: http
+
+  hostnames: []
+  # Example:
+  # hostnames:
+  #   - git.example.com
+
+  pathPrefix: /
+
+  annotations: {}
+  labels: {}
+
 persistence:
   enabled: true
   size: 5Gi