5565354127
Implements unified Helm chart supporting both deployment modes: - persistent: Traditional PVC-based deployment (v1.x behavior) - dynamic: Serverless Knative with auto-scaling and dynamic routing ## Chart Changes - Chart.yaml: Bump to v2.0.0-dev with deployment mode support - values.yaml: Add deploymentMode field and dynamic configuration - All templates: Conditional rendering based on deploymentMode ## Dynamic Mode Templates - knative-service.yaml: Auto-scaling dev containers with repo routing - routing-proxy.yaml: GitHub repo extraction service - dynamic-ingress.yaml: Ingress with Authentik auth support ## Usage Examples ```bash # Traditional persistent mode (default) helm install mydev ./chart --set name=mydev --set githubRepo=... # Dynamic serverless mode helm install mydev ./chart -f values-dynamic.yaml \ --set name=mydev --set dynamic.ingress.host=devcontainer.example.com # Development builds helm install mydev ./chart --set deploymentMode=dynamic \ --set image.tag=2.0.0-dev --set dynamic.ingress.host=... ``` All existing persistent deployments remain compatible (deploymentMode defaults to "persistent"). Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
{{- if and (eq .Values.deploymentMode "dynamic") .Values.dynamic.routingProxy.enabled }}
|
|
---
|
|
# Routing proxy deployment for dynamic GitHub repo extraction
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "devcontainer.fullname" . }}-routing-proxy
|
|
labels:
|
|
{{- include "devcontainer.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: routing-proxy
|
|
spec:
|
|
replicas: {{ .Values.dynamic.routingProxy.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "devcontainer.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: routing-proxy
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "devcontainer.labels" . | nindent 8 }}
|
|
app.kubernetes.io/component: routing-proxy
|
|
spec:
|
|
containers:
|
|
- name: routing-proxy
|
|
image: "{{ .Values.dynamic.routingProxy.image.repository }}:{{ .Values.dynamic.routingProxy.image.tag }}"
|
|
imagePullPolicy: {{ .Values.dynamic.routingProxy.image.pullPolicy }}
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
env:
|
|
- name: DEVCONTAINER_SERVICE_URL
|
|
value: "{{ include "devcontainer.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local"
|
|
resources:
|
|
{{- toYaml .Values.dynamic.routingProxy.resources | nindent 10 }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8080
|
|
initialDelaySeconds: 2
|
|
periodSeconds: 5
|
|
|
|
---
|
|
# Service for routing proxy
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "devcontainer.fullname" . }}-routing-proxy
|
|
labels:
|
|
{{- include "devcontainer.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: routing-proxy
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 80
|
|
targetPort: 8080
|
|
name: http
|
|
selector:
|
|
{{- include "devcontainer.selectorLabels" . | nindent 4 }}
|
|
app.kubernetes.io/component: routing-proxy
|
|
{{- end }} |