remove k8s
This commit is contained in:
parent
ce5724973c
commit
f75b373dad
8 changed files with 0 additions and 166 deletions
|
|
@ -1,53 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: aprs-app-deployment
|
||||
namespace: aprs-app
|
||||
labels:
|
||||
app: aprs-app
|
||||
spec:
|
||||
replicas: 1 # Start with 1, can be scaled later
|
||||
selector:
|
||||
matchLabels:
|
||||
app: aprs-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: aprs-app
|
||||
spec:
|
||||
initContainers:
|
||||
- name: db-migrate
|
||||
image: ghcr.io/aprsme/aprs.me:latest
|
||||
command: ["/app/bin/migrate"]
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: aprs-secrets
|
||||
containers:
|
||||
- name: aprs-app
|
||||
image: ghcr.io/aprsme/aprs.me:latest
|
||||
ports:
|
||||
- containerPort: 4000 # Default Phoenix port
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: aprs-secrets
|
||||
env: # Add non-secret env vars here if any
|
||||
- name: PHX_SERVER
|
||||
value: "true"
|
||||
- name: PORT
|
||||
value: "4000"
|
||||
# The PHX_HOST is in secrets.yaml.example, it can be moved here if not sensitive
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health # Assuming you'll add a health check endpoint
|
||||
port: 4000
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health # Assuming you'll add a health check endpoint
|
||||
port: 4000
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 15
|
||||
# Note: For the health endpoint, you might need to create a simple one in your Phoenix router
|
||||
# e.g., scope "/", AprsmeWeb do; get "/health", PageController, :health; end
|
||||
# and a `def health(conn, _params), do: json(conn, %{status: "ok"})` in PageController.
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: aprs-app-service
|
||||
namespace: aprs-app
|
||||
spec:
|
||||
selector:
|
||||
app: aprs-app
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80 # External port
|
||||
targetPort: 4000 # Container port
|
||||
type: NodePort # Or LoadBalancer if your K3s is configured for it
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: aprs-app
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres-deployment
|
||||
namespace: aprs-app
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:16
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_DB
|
||||
value: aprs_prod
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: aprs-secrets
|
||||
key: POSTGRES_USER
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: aprs-secrets
|
||||
key: POSTGRES_PASSWORD
|
||||
volumeMounts:
|
||||
- name: postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
volumes:
|
||||
- name: postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-pvc
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: postgres-pvc
|
||||
namespace: aprs-app
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi # Default size, can be adjusted
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgres-service
|
||||
namespace: aprs-app
|
||||
spec:
|
||||
selector:
|
||||
app: postgres
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
type: ClusterIP
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: aprs-secrets
|
||||
namespace: aprs-app
|
||||
type: Opaque
|
||||
stringData: # Using stringData for readability, actual secrets should be base64 encoded if using `data`
|
||||
DATABASE_URL: "ecto://postgres-service.aprs-app.svc.cluster.local/aprs_prod" # User/pass removed
|
||||
POSTGRES_USER: "your_db_user"
|
||||
POSTGRES_PASSWORD: "your_db_password"
|
||||
SECRET_KEY_BASE: "your_super_secret_key_base_here"
|
||||
# Add other secrets like APRS_CALLSIGN, APRS_PASSCODE if needed
|
||||
APRS_CALLSIGN: "NOCALL"
|
||||
APRS_PASSCODE: "NOPASS"
|
||||
PHX_HOST: "your_app_domain.com" # Replace with your actual host
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: aprs-secrets
|
||||
namespace: aprs-app
|
||||
type: Opaque
|
||||
stringData: # Using stringData for readability, actual secrets should be base64 encoded if using `data`
|
||||
DATABASE_URL: "ecto://postgres-service.aprs-app.svc.cluster.local/aprs_prod" # User/pass removed
|
||||
POSTGRES_USER: "your_db_user"
|
||||
POSTGRES_PASSWORD: "your_db_password"
|
||||
SECRET_KEY_BASE: "your_super_secret_key_base_here"
|
||||
# Add other secrets like APRS_CALLSIGN, APRS_PASSCODE if needed
|
||||
APRS_CALLSIGN: "NOCALL"
|
||||
APRS_PASSCODE: "NOPASS"
|
||||
PHX_HOST: "your_app_domain.com" # Replace with your actual host
|
||||
Loading…
Add table
Reference in a new issue