summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-29 08:33:13 +0200
committerPaul Buetow <paul@buetow.org>2026-01-29 08:33:13 +0200
commit6fff26bf0c8bac221970e5cc10c9957c327c6740 (patch)
treebcd1b6e47ce0a51eb736f6f5a494b545f265ca2a
parent04fd17c7f7f6c489238cccc2b34f3f2b42a12c62 (diff)
Add ipv6test deployment for f3s
Amp-Thread-ID: https://ampcode.com/threads/T-019c086d-c760-779d-b740-0f748094b62a Co-authored-by: Amp <amp@ampcode.com>
-rw-r--r--f3s/argocd-apps/services/ipv6test.yaml28
-rw-r--r--f3s/ipv6test/Justfile41
-rw-r--r--f3s/ipv6test/README.md25
-rw-r--r--f3s/ipv6test/helm-chart/Chart.yaml5
-rw-r--r--f3s/ipv6test/helm-chart/templates/deployment.yaml39
-rw-r--r--f3s/ipv6test/helm-chart/templates/ingress.yaml20
-rw-r--r--f3s/ipv6test/helm-chart/templates/service.yaml15
7 files changed, 173 insertions, 0 deletions
diff --git a/f3s/argocd-apps/services/ipv6test.yaml b/f3s/argocd-apps/services/ipv6test.yaml
new file mode 100644
index 0000000..6748545
--- /dev/null
+++ b/f3s/argocd-apps/services/ipv6test.yaml
@@ -0,0 +1,28 @@
+apiVersion: argoproj.io/v1alpha1
+kind: Application
+metadata:
+ name: ipv6test
+ namespace: cicd
+ finalizers:
+ - resources-finalizer.argocd.argoproj.io
+spec:
+ project: default
+ source:
+ repoURL: http://git-server.cicd.svc.cluster.local/conf.git
+ targetRevision: master
+ path: f3s/ipv6test/helm-chart
+ destination:
+ server: https://kubernetes.default.svc
+ namespace: services
+ syncPolicy:
+ automated:
+ prune: true
+ selfHeal: true
+ syncOptions:
+ - CreateNamespace=false
+ retry:
+ limit: 3
+ backoff:
+ duration: 5s
+ factor: 2
+ maxDuration: 1m
diff --git a/f3s/ipv6test/Justfile b/f3s/ipv6test/Justfile
new file mode 100644
index 0000000..2bf9213
--- /dev/null
+++ b/f3s/ipv6test/Justfile
@@ -0,0 +1,41 @@
+NAMESPACE := "services"
+APP_NAME := "ipv6test"
+
+# Show deployment status
+status:
+ @echo "=== Pods ==="
+ @kubectl get pods -n {{NAMESPACE}} | grep ipv6test
+ @echo ""
+ @echo "=== Service ==="
+ @kubectl get svc -n {{NAMESPACE}} ipv6test-service
+ @echo ""
+ @echo "=== Ingress ==="
+ @kubectl get ingress -n {{NAMESPACE}} ipv6test-ingress
+ @echo ""
+ @echo "=== ArgoCD Status ==="
+ @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' 2>/dev/null && echo "" || echo "Not found"
+
+# View logs from ipv6test (default 100 lines)
+logs lines="100":
+ kubectl logs -n {{NAMESPACE}} -l app=ipv6test --tail={{lines}} -f
+
+# Port forward to ipv6test web UI
+port-forward port="8080":
+ @echo "Forwarding ipv6test to localhost:{{port}}"
+ kubectl port-forward -n {{NAMESPACE}} svc/ipv6test-service {{port}}:80
+
+# Trigger ArgoCD sync
+sync:
+ @echo "Triggering ArgoCD sync..."
+ @kubectl annotate application {{APP_NAME}} -n cicd argocd.argoproj.io/refresh=normal --overwrite
+ @sleep 2
+ @kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' && echo ""
+
+# Show ArgoCD application details
+argocd-status:
+ argocd app get {{APP_NAME}} --core
+
+# Restart ipv6test
+restart:
+ @echo "Restarting ipv6test..."
+ kubectl rollout restart -n {{NAMESPACE}} deployment/ipv6test
diff --git a/f3s/ipv6test/README.md b/f3s/ipv6test/README.md
new file mode 100644
index 0000000..c6a367c
--- /dev/null
+++ b/f3s/ipv6test/README.md
@@ -0,0 +1,25 @@
+# IPv6 Test
+
+A simple IPv6/IPv4 connectivity test application deployed on k3s.
+
+## Description
+
+This application displays the client's IP address and determines whether they are connecting via IPv4 or IPv6.
+
+## Deployment
+
+The application is deployed via ArgoCD using the helm chart in `helm-chart/`.
+
+## Access
+
+- URL: https://ipv6test.f3s.buetow.org
+
+## Justfile Commands
+
+```bash
+just status # Show deployment status
+just logs # View application logs
+just port-forward # Forward to localhost:8080
+just sync # Trigger ArgoCD sync
+just restart # Restart the deployment
+```
diff --git a/f3s/ipv6test/helm-chart/Chart.yaml b/f3s/ipv6test/helm-chart/Chart.yaml
new file mode 100644
index 0000000..80baa64
--- /dev/null
+++ b/f3s/ipv6test/helm-chart/Chart.yaml
@@ -0,0 +1,5 @@
+apiVersion: v2
+name: ipv6test
+description: A Helm chart for deploying IPv6 Test CGI application.
+version: 0.1.0
+appVersion: "latest"
diff --git a/f3s/ipv6test/helm-chart/templates/deployment.yaml b/f3s/ipv6test/helm-chart/templates/deployment.yaml
new file mode 100644
index 0000000..e5ad22a
--- /dev/null
+++ b/f3s/ipv6test/helm-chart/templates/deployment.yaml
@@ -0,0 +1,39 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: ipv6test
+ namespace: services
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: ipv6test
+ template:
+ metadata:
+ labels:
+ app: ipv6test
+ spec:
+ containers:
+ - name: ipv6test
+ image: r0.lan.buetow.org:30001/ipv6test:1.0.0
+ ports:
+ - containerPort: 80
+ resources:
+ requests:
+ memory: "64Mi"
+ cpu: "50m"
+ limits:
+ memory: "128Mi"
+ cpu: "100m"
+ readinessProbe:
+ httpGet:
+ path: /
+ port: 80
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ livenessProbe:
+ httpGet:
+ path: /
+ port: 80
+ initialDelaySeconds: 15
+ periodSeconds: 20
diff --git a/f3s/ipv6test/helm-chart/templates/ingress.yaml b/f3s/ipv6test/helm-chart/templates/ingress.yaml
new file mode 100644
index 0000000..bb0890a
--- /dev/null
+++ b/f3s/ipv6test/helm-chart/templates/ingress.yaml
@@ -0,0 +1,20 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: ipv6test-ingress
+ namespace: services
+ annotations:
+ spec.ingressClassName: traefik
+ traefik.ingress.kubernetes.io/router.entrypoints: web
+spec:
+ rules:
+ - host: ipv6test.f3s.buetow.org
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: ipv6test-service
+ port:
+ number: 80
diff --git a/f3s/ipv6test/helm-chart/templates/service.yaml b/f3s/ipv6test/helm-chart/templates/service.yaml
new file mode 100644
index 0000000..df2a84a
--- /dev/null
+++ b/f3s/ipv6test/helm-chart/templates/service.yaml
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: ipv6test
+ name: ipv6test-service
+ namespace: services
+spec:
+ ports:
+ - name: web
+ port: 80
+ protocol: TCP
+ targetPort: 80
+ selector:
+ app: ipv6test