- Add registry secret template for private container registry authentication - Fix frontend deployment to use imagePullSecrets for private registry - Enhance deploy-k8s.sh with registry authentication handling - Add PVC storage size validation to prevent storage reduction errors - Add graceful StatefulSet update error handling - Fix template variable substitution for DOCKER_IMAGE - Remove conflicting static PVC file that had unprocessed template variables - Add Kustomize structure as alternative to shell script templates: - Base configuration with common resources - Development overlay with dev-specific configurations - Support for environment-specific image tags and resource limits Registry setup requires setting REGISTRY_USERNAME, REGISTRY_PASSWORD, and optionally REGISTRY_HOST in .env file for private registry authentication.
49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ${APP_NAME}-frontend
|
|
labels:
|
|
app: ${APP_NAME}
|
|
component: frontend
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: ${APP_NAME}
|
|
component: frontend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ${APP_NAME}
|
|
component: frontend
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: ${APP_NAME}-registry-secret
|
|
containers:
|
|
- name: frontend
|
|
image: ${DOCKER_IMAGE}
|
|
ports:
|
|
- containerPort: 80
|
|
envFrom:
|
|
- configMapRef:
|
|
name: ${APP_NAME}-config
|
|
resources:
|
|
requests:
|
|
memory: "32Mi"
|
|
cpu: "20m"
|
|
limits:
|
|
memory: "64Mi"
|
|
cpu: "40m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|