feat: initial tictactoe web app with CI/CD pipeline
Some checks failed
homelab-k8s-services/tictactoe/pipeline/head There was a failure building this commit
Some checks failed
homelab-k8s-services/tictactoe/pipeline/head There was a failure building this commit
- Express app serving vanilla JS 2-player TicTacToe game - Dockerfile (multi-stage node:18-slim) - Jenkinsfile (K8s pod: test → Harbor push → Helm bump → Gitea push) - Helm chart v1.0.0 with HTTPRoute for tictactoe.fireflylab.local Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
6
manifest/helm/Chart.yaml
Normal file
6
manifest/helm/Chart.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: tictactoe
|
||||
description: TicTacToe web game
|
||||
type: application
|
||||
version: 1.0.0
|
||||
appVersion: "latest"
|
||||
35
manifest/helm/templates/deployment.yaml
Normal file
35
manifest/helm/templates/deployment.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ .Chart.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Chart.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Chart.Name }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.targetPort }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: {{ .Values.service.targetPort }}
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: {{ .Values.service.targetPort }}
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
19
manifest/helm/templates/httproute.yaml
Normal file
19
manifest/helm/templates/httproute.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: envoy-gateway
|
||||
namespace: envoy-gateway-system
|
||||
hostnames:
|
||||
- "tictactoe.fireflylab.local"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
backendRefs:
|
||||
- name: {{ .Chart.Name }}
|
||||
port: {{ .Values.service.port }}
|
||||
14
manifest/helm/templates/service.yaml
Normal file
14
manifest/helm/templates/service.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ .Chart.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ .Chart.Name }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: {{ .Values.service.targetPort }}
|
||||
protocol: TCP
|
||||
10
manifest/helm/values.yaml
Normal file
10
manifest/helm/values.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
image:
|
||||
repository: harbor.fireflylab.local/library/tictactoe
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
service:
|
||||
port: 80
|
||||
targetPort: 3000
|
||||
Reference in New Issue
Block a user