diff --git a/k8s/app-deployment.yaml b/k8s/app-deployment.yaml deleted file mode 100644 index 945dab7..0000000 --- a/k8s/app-deployment.yaml +++ /dev/null @@ -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. diff --git a/k8s/app-service.yaml b/k8s/app-service.yaml deleted file mode 100644 index f1628dc..0000000 --- a/k8s/app-service.yaml +++ /dev/null @@ -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 diff --git a/k8s/namespace.yaml b/k8s/namespace.yaml deleted file mode 100644 index 03120d0..0000000 --- a/k8s/namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: aprs-app diff --git a/k8s/postgres-deployment.yaml b/k8s/postgres-deployment.yaml deleted file mode 100644 index 653037f..0000000 --- a/k8s/postgres-deployment.yaml +++ /dev/null @@ -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 diff --git a/k8s/postgres-pvc.yaml b/k8s/postgres-pvc.yaml deleted file mode 100644 index edfafd3..0000000 --- a/k8s/postgres-pvc.yaml +++ /dev/null @@ -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 diff --git a/k8s/postgres-service.yaml b/k8s/postgres-service.yaml deleted file mode 100644 index d91d3e9..0000000 --- a/k8s/postgres-service.yaml +++ /dev/null @@ -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 diff --git a/k8s/secrets.yaml b/k8s/secrets.yaml deleted file mode 100644 index 8b07c5a..0000000 --- a/k8s/secrets.yaml +++ /dev/null @@ -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 diff --git a/k8s/secrets.yaml.example b/k8s/secrets.yaml.example deleted file mode 100644 index 8b07c5a..0000000 --- a/k8s/secrets.yaml.example +++ /dev/null @@ -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