diff --git a/k8s/prod.yaml b/k8s/prod.yaml index 9a62585..c35191b 100644 --- a/k8s/prod.yaml +++ b/k8s/prod.yaml @@ -1,13 +1,13 @@ apiVersion: v1 kind: Namespace metadata: - name: periodic-table + name: requirements-periodic-table --- apiVersion: apps/v1 kind: Deployment metadata: name: fastapi-app - namespace: periodic-table + namespace: requirements-periodic-table spec: replicas: 2 selector: @@ -18,12 +18,17 @@ spec: labels: app: fastapi-app spec: + imagePullSecrets: + - name: regcred containers: - name: fastapi-app - image: periodic-table-backend:latest # TODO: push to registry and set full image name + image: docker.io/your-dockerhub-username/periodic-table-backend:latest imagePullPolicy: IfNotPresent ports: - containerPort: 8080 + env: + - name: DATABASE_HOST + value: postgresql envFrom: - secretRef: name: periodic-table-env # Provide secrets for APP settings @@ -32,7 +37,7 @@ apiVersion: v1 kind: Service metadata: name: fastapi-app - namespace: periodic-table + namespace: requirements-periodic-table spec: selector: app: fastapi-app @@ -46,7 +51,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: frontend - namespace: periodic-table + namespace: requirements-periodic-table spec: replicas: 2 selector: @@ -57,9 +62,11 @@ spec: labels: app: frontend spec: + imagePullSecrets: + - name: regcred containers: - name: frontend - image: periodic-table-frontend:latest # TODO: push to registry and set full image name + image: docker.io/your-dockerhub-username/periodic-table-frontend:latest imagePullPolicy: IfNotPresent ports: - containerPort: 80 @@ -68,7 +75,7 @@ apiVersion: v1 kind: Service metadata: name: frontend - namespace: periodic-table + namespace: requirements-periodic-table spec: selector: app: frontend