This commit is contained in:
2026-10-22 02:06:39 +00:00
commit 05c3339f1e
82 changed files with 3202 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
apiVersion: v2
name: generic-http-service
description: One HTTP workload with stable logical-service discovery.
type: application
version: 2.0.0

View File

@@ -0,0 +1,82 @@
{{- $s := .Values.spec -}}
{{- $p := .Values.platform -}}
{{- $needsBind := false -}}
{{- range $s.runtime.ports }}{{- if lt (int .containerPort) 1024 }}{{- $needsBind = true }}{{- end }}{{- end -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $p.workloadName }}
namespace: {{ $p.namespace }}
labels:
{{- toYaml $p.labels | nindent 4 }}
annotations:
{{- toYaml $p.annotations | nindent 4 }}
spec:
replicas: {{ $s.replicas }}
{{- with (default (dict) $p.rollout).progressDeadlineSeconds }}
progressDeadlineSeconds: {{ . }}
{{- end }}
selector:
matchLabels:
{{- toYaml $p.selector | nindent 6 }}
template:
metadata:
labels:
{{- toYaml $p.labels | nindent 8 }}
annotations:
{{- toYaml $p.annotations | nindent 8 }}
spec:
automountServiceAccountToken: false
{{- if $s.runtime.runAsRoot }}
securityContext:
runAsNonRoot: false
{{- end }}
{{- with (default (dict) $p.scheduling).nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with (default (dict) $p.scheduling).tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: app
image: {{ $s.runtime.resolvedImage | quote }}
{{- with $s.runtime.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $s.runtime.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
{{- toYaml $s.runtime.ports | nindent 12 }}
{{- if $s.env }}
env:
{{- range $name, $value := $s.env }}
- name: {{ $name }}
value: {{ $value | quote }}
{{- end }}
{{- else }}
env: []
{{- end }}
resources:
{{- toYaml $p.resources | nindent 12 }}
securityContext:
allowPrivilegeEscalation: false
{{- $add := list }}
{{- if $needsBind }}{{- $add = append $add "NET_BIND_SERVICE" }}{{- end }}
{{- if $s.runtime.runAsRoot }}
{{- $add = concat $add (list "CHOWN" "DAC_OVERRIDE" "FOWNER" "FSETID" "KILL" "SETGID" "SETUID") }}
{{- end }}
{{- with $add }}
capabilities:
add:
{{- toYaml . | nindent 16 }}
{{- end }}
readinessProbe:
httpGet:
path: {{ $s.healthCheck.path | quote }}
port: {{ $s.healthCheck.port }}
initialDelaySeconds: {{ $s.healthCheck.initialDelaySeconds }}

View File

@@ -0,0 +1,34 @@
{{- $s := .Values.spec -}}
{{- $p := .Values.platform -}}
{{- if $s.exposure.public -}}
{{- $i := $p.ingress -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $p.workloadName }}
namespace: {{ $p.namespace }}
labels:
{{- toYaml $p.labels | nindent 4 }}
annotations:
{{- toYaml $p.annotations | nindent 4 }}
cert-manager.io/cluster-issuer: {{ $i.clusterIssuer | quote }}
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
ingressClassName: {{ $i.className | quote }}
tls:
- hosts:
- {{ $i.host | quote }}
secretName: {{ $p.workloadName }}-tls
rules:
- host: {{ $i.host | quote }}
http:
paths:
- path: {{ $s.exposure.path | quote }}
pathType: Prefix
backend:
service:
name: {{ $p.serviceName }}
port:
number: {{ $p.servicePort }}
{{- end }}

View File

@@ -0,0 +1,15 @@
{{- $s := .Values.spec -}}
{{- $p := .Values.platform -}}
apiVersion: v1
kind: Service
metadata:
name: {{ $p.serviceName }}
namespace: {{ $p.namespace }}
spec:
type: ClusterIP
selector:
{{- toYaml $p.selector | nindent 4 }}
ports:
- name: http
port: {{ $p.servicePort }}
targetPort: {{ (index $s.runtime.ports 0).name }}

View File

@@ -0,0 +1,3 @@
# The gateway supplies both roots. The chart never derives identity or endpoints itself.
spec: {}
platform: {}