feat: Add container registry support and Kustomize foundation
- 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.
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: ${APP_NAME}-couchdb-pvc
|
||||
labels:
|
||||
app: ${APP_NAME}
|
||||
component: database
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: ${STORAGE_CLASS}
|
||||
resources:
|
||||
requests:
|
||||
storage: ${STORAGE_SIZE}
|
||||
@@ -17,9 +17,11 @@ spec:
|
||||
app: ${APP_NAME}
|
||||
component: frontend
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: ${APP_NAME}-registry-secret
|
||||
containers:
|
||||
- name: frontend
|
||||
image: ${DOCKER_IMAGE:-gitea-http.taildb3494.ts.net/will/${APP_NAME}:latest}
|
||||
image: ${DOCKER_IMAGE}
|
||||
ports:
|
||||
- containerPort: 80
|
||||
envFrom:
|
||||
|
||||
10
k8s/registry-secret.yaml.template
Normal file
10
k8s/registry-secret.yaml.template
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: ${APP_NAME}-registry-secret
|
||||
labels:
|
||||
app: ${APP_NAME}
|
||||
component: registry
|
||||
type: kubernetes.io/dockerconfigjson
|
||||
data:
|
||||
.dockerconfigjson: ${REGISTRY_AUTH_BASE64}
|
||||
Reference in New Issue
Block a user