- Rebuild manifests/doormile/miletruth.yaml (was corrupted since the initial commit - contained pasted AI/terminal output, truncated env var names/values, duplicate keys). Rebuilt from the confirmed-live config, secrets sourced via a Secret instead of plaintext values. - Lock down the Kubernetes Dashboard: remove --enable-skip-login / --enable-insecure-login / --insecure-port=9090, remove the extra cluster-admin binding on the dashboard's own ServiceAccount, remove the now-dead insecure NodePort Service. Token-based login via the existing admin-user ServiceAccount is unaffected. - Fix the duplicate `backendRefs` key under the same HTTPRoute rule in alaska.yaml (invalid/redundant YAML). - Delete 6 redundant duplicate manifests (fiesta-sts/svc, atlantis-sts/svc, jupiter-sts/svc) that were partial, stale subsets of nearle-fiesta/atlantis/jupiter.yaml - one pair disagreed on the fiesta image tag entirely (v1.3.50 vs v1.3.67, neither of which matched what's actually live). - Reconcile nearle-fiesta.yaml and nearle-jupiter.yaml image tags to the confirmed-live versions (v1.3.78 / v2.7.55). - Add allowPrivilegeEscalation:false + drop-all-capabilities to fiesta/atlantis/jupiter/titan/ariane and the 5 specialized core workers, which previously ran with no securityContext at all. - Add terminationGracePeriodSeconds:45 to the worker StatefulSets so Kubernetes gives the new graceful-shutdown drain (see worker.py changes) enough time before SIGKILL.
168 lines
3.7 KiB
YAML
168 lines
3.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: fiesta
|
|
namespace: nearle
|
|
labels:
|
|
app: fiesta
|
|
spec:
|
|
serviceName: "fiesta"
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: fiesta
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: fiesta
|
|
spec:
|
|
tolerations:
|
|
- key: dedicated
|
|
operator: Equal
|
|
value: apps
|
|
effect: NoSchedule
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: node-role.workolik/app
|
|
operator: In
|
|
values:
|
|
- "true"
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchLabels:
|
|
app: fiesta
|
|
topologyKey: kubernetes.io/hostname
|
|
topologySpreadConstraints:
|
|
- maxSkew: 1
|
|
topologyKey: kubernetes.io/hostname
|
|
whenUnsatisfiable: ScheduleAnyway
|
|
labelSelector:
|
|
matchLabels:
|
|
app: fiesta
|
|
containers:
|
|
- name: backend
|
|
image: nearlecommerce/fiesta:v1.3.78
|
|
imagePullPolicy: Always
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
ports:
|
|
- containerPort: 1122
|
|
envFrom:
|
|
- configMapRef:
|
|
name: nearle-config
|
|
- secretRef:
|
|
name: app-secrets
|
|
env:
|
|
- name: PORT
|
|
value: "1122"
|
|
- name: NATS_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: nats-credentials
|
|
key: username
|
|
- name: NATS_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: nats-credentials
|
|
key: password
|
|
- name: gateway
|
|
image: workolik360/alaska:v1.2.0
|
|
imagePullPolicy: Always
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
ports:
|
|
- containerPort: 8000
|
|
name: http
|
|
volumeMounts:
|
|
- name: gateway-script
|
|
mountPath: /app/app.py
|
|
subPath: app.py
|
|
envFrom:
|
|
- configMapRef:
|
|
name: nearle-config
|
|
env:
|
|
- name: NATS_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: nats-credentials
|
|
key: username
|
|
- name: NATS_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: nats-credentials
|
|
key: password
|
|
volumes:
|
|
- name: gateway-script
|
|
configMap:
|
|
name: fiesta-gateway-script
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: fiesta
|
|
namespace: nearle
|
|
labels:
|
|
app: fiesta
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 80
|
|
targetPort: 1122
|
|
nodePort: 30823
|
|
protocol: TCP
|
|
name: main
|
|
- port: 8000
|
|
targetPort: 8000
|
|
name: gateway
|
|
protocol: TCP
|
|
selector:
|
|
app: fiesta
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: fiesta-route
|
|
namespace: nearle
|
|
labels:
|
|
app: fiesta
|
|
spec:
|
|
parentRefs:
|
|
- name: gateway
|
|
namespace: alaska
|
|
hostnames:
|
|
- "fiesta.nearle.app"
|
|
rules:
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /live/api/v1/mob/orders/createorder
|
|
backendRefs:
|
|
- name: fiesta
|
|
port: 8000
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /live/api/v1/web/products/create
|
|
backendRefs:
|
|
- name: fiesta
|
|
port: 8000
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: /
|
|
backendRefs:
|
|
- name: fiesta
|
|
port: 80
|