Reemplaza los manifiestos sueltos (deployment/service/ingress) por un overlay de Kustomize sobre el base remoto de platform-templates. Agrega readinessProbe/livenessProbe (no tenia ninguna) y securityContext (ajustado: runAsNonRoot=false + NET_BIND_SERVICE, porque la imagen actual de docs-portal corre como root en el puerto 80 -- se resuelve del todo cuando docs-portal adopte dockerfiles/static-nginx.Dockerfile de platform-templates, cambio de imagen aparte). Validado con kubectl kustomize contra el manifiesto real desplegado antes de aplicar. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FqYP3Wf1W63Qmh7qgXAAT
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
kind: Kustomization
|
|
|
|
namespace: docs-portal
|
|
|
|
resources:
|
|
- https://gitea.cruzcloud.net/devops/platform-templates.git//k8s-manifests/base?ref=main
|
|
|
|
patches:
|
|
- target:
|
|
kind: Deployment
|
|
name: app-deployment
|
|
path: patches/deployment.yaml
|
|
- target:
|
|
kind: Service
|
|
name: app-svc
|
|
path: patches/service.yaml
|
|
- target:
|
|
kind: Ingress
|
|
name: app-ingress
|
|
path: patches/ingress.yaml
|
|
|
|
- target:
|
|
kind: Deployment
|
|
name: app-deployment
|
|
patch: |-
|
|
- op: replace
|
|
path: /metadata/name
|
|
value: docs-portal-deployment
|
|
- op: replace
|
|
path: /spec/template/spec/containers/0/ports
|
|
value:
|
|
- name: http
|
|
containerPort: 80
|
|
- target:
|
|
kind: Service
|
|
name: app-svc
|
|
patch: |-
|
|
- op: replace
|
|
path: /metadata/name
|
|
value: docs-portal-svc
|
|
- target:
|
|
kind: Ingress
|
|
name: app-ingress
|
|
patch: |-
|
|
- op: replace
|
|
path: /metadata/name
|
|
value: docs-portal-ingress
|