wip: contenido inicial + test de reusable workflow / composite action

This commit is contained in:
devops committed 2026-08-17 00:12:10 -05:00
1 parent e9fe7d0567
commit 262c0f271a
22 files changed
+1480

No files matched your search

+73
View File
@@ -0,0 +1,73 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-deployment
labels:
app: app
spec:
replicas: 1
selector:
matchLabels:
app: app
template:
metadata:
labels:
app: app
spec:
imagePullSecrets:
- name: gitea-registry-secret
# Nivel Pod: nada corre como root a menos que el overlay lo
# sobreescriba explícitamente (y debería justificarlo si lo hace).
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
- name: app
# CAMBIAR: imagen real de tu app. El overlay la sobreescribe.
image: gitea.cruzcloud.net/devops/CAMBIAR-imagen:v0.0.0
ports:
- name: http
containerPort: 8080
# Nivel contenedor: complementa el runAsNonRoot de arriba.
# readOnlyRootFilesystem queda en false por default porque
# muchos runtimes (Next.js standalone, cachés de npm/pip)
# escriben en disco al arrancar -- si tu app NO escribe nada
# en runtime, ponelo en true y listo (más seguro).
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
capabilities:
drop:
- ALL
# CAMBIAR: casi seguro tu app expone un endpoint de salud
# distinto a "/" (ver README de tu arquetipo de pipeline —
# los 3 arquetipos ya documentan cuál usa cada stack).
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 5
failureThreshold: 6
# Límites conservadores para una app chica/media. Subilos en
# tu overlay si tu app realmente los necesita — pero no los
# borres: sin esto, un solo pod con un bug de memoria puede
# arrastrar al nodo entero a swap (visto en vivo con
# gitea-runner sin límites, ver docs-portal del lab).
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 500m
memory: 512Mi
+23
View File
@@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app-ingress
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
ingressClassName: traefik
rules:
# CAMBIAR: el host público real. Sigue el patrón *.cruzcloud.net
# ya usado por shop/commerce/docs — apunta a NPM -> serverlb ->
# Traefik -> este Service (ver reference_infra_topology en la
# memoria del lab si necesitás repasar la ruta completa).
- host: CAMBIAR-app.cruzcloud.net
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app-svc
port:
number: 80
+7
View File
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
- ingress.yaml
+11
View File
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: app-svc
spec:
selector:
app: app
ports:
- name: http
port: 80
targetPort: http